To find variable storing max and min value

조회 수: 2 (최근 30일)
Akshay Math
Akshay Math 2020년 2월 26일
댓글: Adam 2020년 2월 26일
I have three variables say a=1 b=2 c=3 i want to find the variable storing minimum and maximum value so how to write the matlab code in matlab function block
  댓글 수: 1
Adam
Adam 2020년 2월 26일
If the values are comparable enough for min and max across them to mean something then you should put them all in a single array, then simply return the indices into that array with
[~, idxMin] = min( myArray );
[~, idxMax] = max( myarray );

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by