if at least one number >

조회 수: 3 (최근 30일)
Tomas
Tomas 2013년 11월 23일
댓글: Tomas 2013년 11월 23일
I have A=[ 11 12 17]
number=13; W={}; if (A>=number)
W{1}{1}=A;
else
A;
end
I want it so that if there was at least one number in A > as number,then A stored in cell W
Thanks

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 11월 23일
A=[ 11 12 17]
number=13;
W={};
if any(A>number)
W{1}=A;
end
  댓글 수: 1
Tomas
Tomas 2013년 11월 23일
Thanks

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Construct and Work with Object Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by