-
Notifications
You must be signed in to change notification settings - Fork 365
L_193
Joris Gillis edited this page Apr 4, 2023
·
2 revisions
Create a piecewise constant function.
::
pw_const(DM t, DM tval, DM val) -> DM pw_const(SX t, SX tval, SX val) -> SX
Create a piecewise constant function with n=val.size() intervals
Inputs:
t: a scalar variable (e.g. time)
tval: vector with the discrete values of t at the interval transitions
(length n-1)
val: vector with the value of the function for each interval (length n)
Extra doc: https://github.com/casadi/casadi/wiki/L_193
Doc source: https://github.com/casadi/casadi/blob/develop/casadi/core/matrix_decl.hpp#L635
Implementation: https://github.com/casadi/casadi/blob/develop/casadi/core/matrix_decl.hpp#L635-L639
To edit, see writing tips.