if with 2 conditions
조회 수: 4 (최근 30일)
이전 댓글 표시
i used this statement conditions before it worked well,
but this time Matlab says it work with logic condition only:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/743154/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/743159/image.jpeg)
how to recover ?
thanks
댓글 수: 0
답변 (1개)
Image Analyst
2021년 9월 19일
What does this say
whos Ree
It's probably a vector, not a scalar.
댓글 수: 2
Image Analyst
2021년 9월 19일
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.
참고 항목
카테고리
Help Center 및 File Exchange에서 MATLAB Parallel Server에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!