Filter löschen
Filter löschen

How can I pull or link a matrix output from m-file into simulink?

1 Ansicht (letzte 30 Tage)
I have an output in matrix format in m-file. For example, I have the values a11, a12, a21, a22 calculated already, and I want to link it to an existing simulink diagram as a transfer function so that anytime I open or run the simulink file, it would pull the data from the m-file and run the simulation. Thank you.
  1 Kommentar
Fun Dan
Fun Dan am 2 Apr. 2015
Thank you Azzi and Mahdiyar for your prompt response. I have tried both options but I am not able to relate them to what I am planning to do. Therefore, I decided to attach a sketch of the question. Probably that would give you more information as well.
I appreciate your time and efforts.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 2 Apr. 2015
You can use set_param function

Weitere Antworten (1)

Mahdiyar
Mahdiyar am 2 Apr. 2015
Hi Dan
I think that it would be better if you save the variables as a matrix in the workspace and then use the block named "From Workspace".
Regards

Kategorien

Mehr zu Programmatic Model Editing finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by