필터 지우기
필터 지우기

find minimum value greater than zero in the rows

조회 수: 75 (최근 30일)
Bathrinath
Bathrinath 2014년 6월 10일
댓글: Andrei Bobrov 2014년 6월 10일
a=[9,32,7,0,0,0,0,0;15,32,9,0,0,0,0,0;25,42,0,0,0,0,0,0];i have to find out minimum value in 'a' which should be greater than zero.my answer has to be b=[7;9;25].suggest some points

채택된 답변

Andrei Bobrov
Andrei Bobrov 2014년 6월 10일
a(a == 0) = inf;
b = min(a,[],2);
  댓글 수: 3
Bathrinath
Bathrinath 2014년 6월 10일
Thank you sir
Andrei Bobrov
Andrei Bobrov 2014년 6월 10일
Thank you Image Analyst! I agree with you.

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

추가 답변 (1개)

Matt J
Matt J 2014년 6월 10일
편집: Matt J 2014년 6월 10일
The min command plus
a(a<=0)=nan;

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by