This example looks at the expand method
View output (PDF) | source (python)
- See also
Function expand() const
Expand a function to SX.
32 x = ca.MX.sym(
"x",2,2)
33 y = ca.MX.sym(
"y",2,1)
39 f = ca.Function(
"f", [x,y],[z])
45 print(
"Expanded expression = ", fSX.str(
True))
53 linear_solver = ca.Linsol(
"linear_solver",
"csparse", x.sparsity())
54 g = linear_solver.solve(x, y)
55 G = ca.Function(
"G", [x,y], [g])
61 except Exception
as e: