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

조회 수: 1 (최근 30일)
Fun Dan
Fun Dan 2015년 4월 2일
댓글: Fun Dan 2015년 4월 2일
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
Fun Dan
Fun Dan 2015년 4월 2일
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.

댓글을 달려면 로그인하십시오.

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2015년 4월 2일
You can use set_param function

추가 답변 (1개)

Mahdiyar
Mahdiyar 2015년 4월 2일
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

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by