How tatement to use if statement to eliminate unwanted value

조회 수: 1 (최근 30일)
sadiqa ilyas
sadiqa ilyas 2019년 9월 21일
댓글: sadiqa ilyas 2019년 9월 21일
Hi,.
I have set of values like .001,0.002,...inf
i want to find the max value from these excluding inf
X=U/10000;
i=[X]
m=max(i);
if m == Inf;
m=m(i-1);
end
How to get rid of Inf.
  댓글 수: 1
sadiqa ilyas
sadiqa ilyas 2019년 9월 21일
0.0001
0.0002
0.0003
0.0004
0.0005
0.0006
0.0007
0.0008
0.0009
0.0010
0.0011
0.0012
0.0013
0.0014
0.0015
0.0016
Inf
Values from which i have to select maximum number and exclude inf

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

채택된 답변

David Hill
David Hill 2019년 9월 21일
m=max(i(i~=Inf));

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by