save variables in matlab workspace

23 ビュー (過去 30 日間)
satendra kumar
satendra kumar 2012 年 11 月 12 日
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 件のコメント
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 日
assignin('base', 'variablename', value)

カテゴリ

Help Center および File ExchangeWorkspace 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