Hello everyone,
I have a simulink file, in which I'm using a matlabFunction block, this function is calling several other functions and files including some structures in the same path, but whenever I run the simulation, the variables that are defined in the workSpace are not visible for the "matlab function" block, is there any way of changing their scope or any approach to fix this other than having to re-define all the variables locally within that block?

 채택된 답변

Fangjun Jiang
Fangjun Jiang 2021년 2월 22일

0 개 추천

Use "Edit Data" in the MATLAB Function Editor to specify those base workspace variables as the parameters

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Workspace Variables and MAT Files에 대해 자세히 알아보기

제품

릴리스

R2020a

질문:

2021년 2월 22일

댓글:

2021년 2월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by