1<x<2 for relational operators and logical operators

조회 수: 5 (최근 30일)
Ahmed Ashour
Ahmed Ashour 2020년 5월 2일
댓글: Ahmed Ashour 2020년 5월 2일
Hi i have been playing around with this expression and i haven't gotten any where with it
if i have an array A = [ 0 1 2 3 4 ];
what does it mean when i say B = 1<A<4
i thought maybe it works as or |
but when i try B= 1<A<1
i got a different answer, so i'm lost and need more help

채택된 답변

Walter Roberson
Walter Roberson 2020년 5월 2일
Associate from the left.
1<A<4 is 1<A computed first, giving 0 (false) or 1 (true), and the result of that is tested < 4

추가 답변 (0개)

카테고리

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

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by