How can I use variables defined MATLAB command window at MATLAB Function block at Simulink?
조회 수: 2 (최근 30일)
이전 댓글 표시
Example
MATLAB Command window >> aaa = 3;
MATLAB Function block at Simulink
function y = fcn(u)
%#codegen
c = aaa+u;
y = c
When I start simulation, Error message is announced at bellow.
関数または変数 'aaa' が未定義です。 (Function or Variable 'aaa' is not defined)
댓글 수: 0
답변 (1개)
Karin Ebenbeck
2016년 10월 13일
My solution would be this:
create a script in MATLAB in which you define the variable aaa save this script - run it and then run SIMULINK
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Event Functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!