Is there a block in Simulink to load equations in state variables ?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I remember having seen some time ago a custom block in Simulink, that allowed to place a system of equations written in the format of state variables (in several lines). I haven't found it again and I don't see it in the repositories. I would be very grateful if someone could tell me about it.
My best regards.
0 comentarios
Respuestas (3)
Paul
el 7 de Sept. de 2021
This one?
1 comentario
Paul
el 10 de Sept. de 2021
One can enter user defined differential equations in a Matlab Function block. The body of the function would look like:
function xdot = pendulum(x)
g = -9.81;
L = 1;
xdot(1) = x(2);
xdot(2) = -g/L*sin(x(1));
end
Mabe this is what you're looking for?
In any case, if you respond to this comment, please don't start a new answer. Instead, just type your response in the area underneath this comment that says in light gray "Comment on this answer ..."
Ver también
Categorías
Más información sobre General Applications en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!