covert matlab program to simulink block
Mostrar comentarios más antiguos
hi all, i am constructing a feedback loop in simulink . the loop contains certain matlab programs. i want to know whether i can implement the matlab code or the executable file in simulink block so that it executes in simulink.
thanks in advance.
with regards, shiksha
1 comentario
shiksha
el 19 de Feb. de 2014
Respuesta aceptada
Más respuestas (2)
Mischa Kim
el 18 de Feb. de 2014
1 voto
Shiksha, yes, provided I correctly understand your question.
You can include MATLAB functions in Simulink models (e.g., by using a MATLAB function block from the library [User-Defined Functions]). When you run the Simulink model the model-embedded MATLAB functions are automatically executed.
Does this answer your question?
2 comentarios
shiksha
el 19 de Feb. de 2014
Mischa Kim
el 20 de Feb. de 2014
Absolutely. You can have multiple MATLAB functions inside a Simulink model, simply drag the MATLAB function block from the Library as many times as you need, or, copy-paste the block inside the model.
You can also call MATLAB functions (say, e.g., from one of these functions blocks) that are not part of the Simulink model.
Muruganandham Subramanian
el 21 de Feb. de 2014
1 voto
Try using 's-function' block (Level-1).
Categorías
Más información sobre Modeling en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!