save the value in side the function file
2 ビュー (過去 30 日間)
古いコメントを表示
I have 3 m-files let say:
function [f]=fun(g)
Myy=20*x^2; % Assume we know x matrix
f=Myy;
the 2nd file is
function [c]=bisect(fun,a,b)
Ma=fun(a);
Mb=fun(b)
c=(a+b)/2;
Third file:
a= 1; b=2;
c=bisect(@fun,a,b)
If I run the third file, how do I save (store) value of f every time, a,b is changed. Thanks
0 件のコメント
回答 (2 件)
参考
カテゴリ
Help Center および File Exchange で Workspace Variables and MAT-Files についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!