スタンドアロンアプリケーションで配列を引数として渡す方法
显示 更早的评论
function [res] = myfunc(arry,i)
res=sum(arry)/i;
disp(res);
上記のスクリプトをコンパイルして
> sh run_myfunc.sh /Applications/MATLAB_R2022a.app "1,2,3" 1
と実行したところ,答えが4.8571となり意図した動作をしません。
配列を引数に渡すにはどうすればよいのでしょうか。
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 データ型の変換 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!