How can I use variables defined MATLAB command window at MATLAB Function block at Simulink?
2 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Karin Ebenbeck
on 13 Oct 2016
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 Comments
See Also
Categories
Find more on Event Functions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!