save variables in matlab workspace

23 次查看(过去 30 天)
I have a function which calls a script. There are some variables in script. I want to save them to my command window. How can i do that. Any help fellas.

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2012-11-12
编辑:Azzi Abdelmalek 2012-11-12
value=15;
assignin('base','var',value)
% 'var' is your variable name
  2 个评论
Shiv Nileshkumar Matliwala
Is there any way to load the variable directly to base workspace ? becuase Its not possible to do this
assignin('base','var')
I want to do like above.

请先登录,再进行评论。

更多回答(1 个)

Walter Roberson
Walter Roberson 2012-11-12
assignin('base', 'variablename', value)

类别

Help CenterFile Exchange 中查找有关 Workspace Variables and MAT-Files 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by