problem in showing result

조회 수: 1 (최근 30일)
shirin mhd
shirin mhd 2022년 3월 24일
댓글: shirin mhd 2022년 3월 25일
Hi everyone
I've written this code (this is part of my main code).
x11Range=[minValue11, maxValue11];
minValue11<= x11 <= maxValue11
and the result after run is:
ans =
(610000 <= x11) <= 33683000
but i expect this answer (without any paranthesis):
610000 <= x11 <= 33683000
I dont understand why paranthesis is in result.
im using R2015b version.
I really appreciate your help.
  댓글 수: 1
Jan
Jan 2022년 3월 24일
편집: Jan 2022년 3월 24일
The question is not clear. Where does "(610000 <= x11) <= 33683000" appear? Which code does produce this answer?
Posting the relevant part of your code would be useful.

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

채택된 답변

Jan
Jan 2022년 3월 24일
Matlab evaluates an expression from left to right. So there is no difference between
610000 <= x11 <= 33683000
and
(610000 <= x11) <= 33683000
Do you want to check, if all values of X11 are between the given values? Then:
610000 <= x11 & x11 <= 33683000
  댓글 수: 1
shirin mhd
shirin mhd 2022년 3월 25일
thanks alot.I understand the concept.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by