defining simulink variables through matlab srcript

답변 (1개)

galaxy
galaxy 2019년 10월 29일

0 개 추천

You can create variables to workspace and in simulink, enable acess to base workspace.
For create variables via script, let 's try as following
v = genvarname('name_variable', who);
eval([v '= 1']); %% assign variable value

댓글 수: 2

defined variable in matlab script is not loading to simulink model. this is the issue which i am facing
galaxy
galaxy 2019년 10월 30일
You must using "name_variable" in simulink model which same as workspace, and in model, please acess to base workspace as following
2.PNG

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

카테고리

도움말 센터File Exchange에서 Simulink Functions에 대해 자세히 알아보기

질문:

2019년 10월 29일

댓글:

2019년 10월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by