Calling max value of variable from another function
古いコメントを表示
I have made a function named "example.m" in which I have created two variables "x" and "y" both have certain range.
function [x,y,T] = example(v,sigma,G,N,K)
x=0:0.01:2;
y=(G*N^2*x/sigma)-(K+v);
end
Now in another function, named "loadvalues.m" I need to call the maximum value of "y" along with the corresponding value of "x" both of them are loaded in another variable named "loady" and "loadx" respectively. Can someone please tell me how to do this?
1 件のコメント
jack carter
2017 年 8 月 13 日
編集済み: jack carter
2017 年 8 月 13 日
採用された回答
その他の回答 (1 件)
Image Analyst
2017 年 8 月 13 日
Try this
MaxY = max(loady);
カテゴリ
ヘルプ センター および File Exchange で MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!