save variables in matlab workspace
21 views (last 30 days)
Show older comments
satendra kumar
on 12 Nov 2012
Commented: Shiv Nileshkumar Matliwala
on 15 Dec 2022
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
Accepted Answer
Azzi Abdelmalek
on 12 Nov 2012
Edited: Azzi Abdelmalek
on 12 Nov 2012
value=15;
assignin('base','var',value)
% 'var' is your variable name
2 Comments
Shiv Nileshkumar Matliwala
on 15 Dec 2022
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.
More Answers (1)
See Also
Categories
Find more on Debugging and Analysis in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!