MATLAB Answers

save variables in matlab workspace

50 views (last 30 days)
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.

  0 Comments

Sign in to comment.

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 12 Nov 2012
Edited: Azzi Abdelmalek on 12 Nov 2012
value=15;
assignin('base','var',value)
% 'var' is your variable name

More Answers (1)

Walter Roberson
Walter Roberson on 12 Nov 2012
assignin('base', 'variablename', value)

  0 Comments

Sign in to comment.

Tags

Products

Community Treasure Hunt

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

Start Hunting!