필터 지우기
필터 지우기

Get a parameter from a masked subsystem

조회 수: 1 (최근 30일)
Gregory
Gregory 2013년 3월 12일
For a simulation project I use some subsystems with parameters in it. I need to get some of these parameters in Matlab as a variable (for example i have the parameter v_max). I already tried get_param but then the parameter comes as a char in matlab and i can't use it. I just want a command to get the values from parameters to matlab as a double.
Thanks!

답변 (1개)

Ryan G
Ryan G 2013년 3월 12일
Are you receiving the variable name or the value. If you receive the number you can execute
str2num();
on the result. If you receive the string v_max back you can run eval on the string to find the value
eval('v_max');

카테고리

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