How can I import the value of the Matlab simulink to the default workspace?

조회 수: 3 (최근 30일)
채린
채린 2025년 4월 17일
답변: Angelo Yeo 2025년 4월 18일
How can I import the value of the Matlab simullink to the basic workspace?

답변 (1개)

Angelo Yeo
Angelo Yeo 2025년 4월 18일
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".

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by