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.

 Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 12 Nov. 2012
Bearbeitet: Azzi Abdelmalek am 12 Nov. 2012

0 Stimmen

value=15;
assignin('base','var',value)
% 'var' is your variable name

2 Kommentare

satendra kumar
satendra kumar am 12 Nov. 2012
Thanks Bud :)
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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Walter Roberson
Walter Roberson am 12 Nov. 2012

0 Stimmen

assignin('base', 'variablename', value)

Produkte

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by