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!