How can I import the value of the Matlab simulink to the default workspace?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
How can I import the value of the Matlab simullink to the basic workspace?
0 Kommentare
Antworten (1)
Angelo Yeo
am 18 Apr. 2025
To export values in different workspace to base workspace, you can use assignin. An example is below.
function foo
n = 123;
assignin('base','baseWorkSpaceVar',n);
end
As a result, a variable called "baseWorkSpaceVar" will be saved in your base workspace with the same value as "n" in the function "foo".
0 Kommentare
Siehe auch
Kategorien
Mehr zu Simulink Functions finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!