Transforming workspace into table using script in MATLAB

조회 수: 2 (최근 30일)
Mounira
Mounira 2023년 12월 19일
댓글: Stephen23 2023년 12월 20일
Hello,
so I have a model in simulink Matlab, and there is a block " To workspace", that gives a data almost 15000 do the workspace, they are puttin in a atable, so i want to use these data in a script in matlab, so how can i do that?
thanks in advance

채택된 답변

Rik
Rik 2023년 12월 19일
Since it is a variable in the main workspace, it is already available in scripts.
However, you should not use scripts for serious work. Use functions instead. How you can get started with functions is one of the topics in the Onramp tutorial (which is provided for free by Mathworks).
  댓글 수: 2
Mounira
Mounira 2023년 12월 20일
yes, true, but when i copy the data and paste it in command to save it in another variable, it gives me this "ans =
1.0e+04 *"
but i want 1e+06, because i don't want to lose some data, so can you tell me how to change the default in settings or something
Stephen23
Stephen23 2023년 12월 20일
"but when i copy the data and paste it in command to save it in another variable"
Do not copy-and-paste data.
What exactly prevents you from calling a function with that array?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by