How to use workspace variables in simulink's matlab function?
이전 댓글 표시
I have a structure in workspace and intend to use its variables several times in simulink function. Creating a constant block with the "par" (name of my structure in workspace) and then passing it as an input in the function block is giving me errors.
댓글 수: 2
Raj
2019년 5월 13일
Without any data, it is difficult to guess how exactly you are trying to pass the data, how you are trying to use the data in your function block and why you are getting an error. If possible share your workspace data mat file and model.
Smit Saparia
2019년 5월 13일
답변 (1개)
Sulaymon Eshkabilov
2019년 5월 13일
0 개 추천
Hi,
Here is a quick and easy solution. A small trick to make MATLAB Fcn block of Simulink to accept the data from the structure type of variable value (s) from the MATLAB workspace.
Good luck.
댓글 수: 2
Smit Saparia
2019년 5월 14일
Sulaymon Eshkabilov
2019년 5월 14일
Hi,
Use the right mouse button option - and click - Save link as ... that downloads the file (SIM_main.slx) into your computer.
Good luck.
카테고리
도움말 센터 및 File Exchange에서 Sources에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!