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 日

0 投票

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

2 件のコメント

satendra kumar
satendra kumar 2012 年 11 月 12 日
Thanks Bud :)
Shiv Nileshkumar Matliwala
Shiv Nileshkumar Matliwala 2022 年 12 月 15 日
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 日

0 投票

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

カテゴリ

製品

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by