Can I call variables from a mask dialogue box in an Embedded MATLAB function block without having to connect variable blocks
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
I'm looking to use an Embedded MATLAB Function block to calculate two output variables based on a selection of user inputs into the dialogue box.
I've chosen the Embedded MATLAB Function block due to an S-Function block seeming complicated.
As the function is developing the number of inputs to the block is becoming unwieldy, since I'm connecting constant blocks declaring the variables explicitly and connecting them. Is there a simpler way?
댓글 수: 0
채택된 답변
Kaustubha Govind
2012년 9월 11일
편집: Rik
2019년 10월 25일
Yes, you can convert your inputs to parameters (whose names must match that of the workspace variables). You simply need to change the "Scope" from Input to Parameter on the Ports and Data Manager.
댓글 수: 4
Walter Roberson
2019년 10월 25일
https://www.mathworks.com/help/simulink/ug/ports-and-data-manager.html is probably a better link
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Naming Conventions에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!