MATLAB Answers

if with 2 conditions

조회 수: 4(최근 30일)
james sinos
james sinos 2021년 9월 19일 16:54
댓글: Image Analyst 2021년 9월 19일 18:24
i used this statement conditions before it worked well,
but this time Matlab says it work with logic condition only:
how to recover ?
thanks

답변(1개)

Image Analyst
Image Analyst 2021년 9월 19일 17:00
What does this say
whos Ree
It's probably a vector, not a scalar.
  댓글 수: 2
Image Analyst
Image Analyst 2021년 9월 19일 18:24
You might want to use any or all():
if any(Ree > 100000 & Ree < 1000000) % Check if any of them is in range.
if all(Ree > 100000 & Ree < 1000000) % Checks that ALL of them are in range.

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

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by