関数ワークスペースの変数をベースワークスペース上で使用したいのですが、どうすればよいですか?
23 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
関数ワークスペースの変数をベースワークスペース上で使用したいのですが、どうすればよいですか?
Risposta accettata
MathWorks Support Team
il 24 Gen 2013
ASSIGNIN 関数を使用します。
次のように MATLAB ファンクションファイル内に記述すると、関数ワークスペース上の変数 x_local をベースワークスペース上の変数 x_base に割り当てることができます。
function myfun
x_local = magic(2);
assignin('base', 'x_base', x_local)
0 Commenti
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!