Call a script via a function?
2 ビュー (過去 30 日間)
古いコメントを表示
Hi.
Can I call (run) a script in a function? My inputs are elements of a 10x10 matrix. How would I write the output?
0 件のコメント
採用された回答
per isakson
2015 年 2 月 2 日
編集済み: per isakson
2015 年 2 月 2 日
Look at this
>> cssm
ans =
Greeting from the script
where cssm is the function
function out = cssm()
cssm_script
end
and where cssm_script is the script
% cssm_script
out = 'Greeting from the script';
The script is running in the workspace of the calling function. The effect is the same as if the code of the script was copy&pasted into the calling function.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Statistics and Machine Learning Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!