필터 지우기
필터 지우기

.m file variable to simulink model

조회 수: 1 (최근 30일)
RoboKid
RoboKid 2013년 11월 14일
편집: RoboKid 2015년 5월 17일
How can I use a variable used in .m file into the simulink model?

채택된 답변

Danilo NASCIMENTO
Danilo NASCIMENTO 2013년 11월 14일
You can use a block called "from workspace" in simulink source library.
  댓글 수: 2
RoboKid
RoboKid 2013년 11월 14일
Why I'm not able use one column data, for 'From workspace' block it says I need two dimensions and at least two columns.
Michael Herold
Michael Herold 2014년 9월 25일
Hi,
i'm not sure if you still have this problem, but when you use a 'From workspace' block you need a signal vector and a time vector. Otherwise the simulation would not know to which time a certain signal value belongs.
If you just have a constant signal over time, you can just put the name of your variable in workspace as value of the constant in the block. It's works also for gains and parameters of masked subsystems (like amplitude of sinus source block)

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Schedule Model Components에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by