1<x<2 for relational operators and logical operators
3 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
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 Center 和 File Exchange 中查找有关 Entering Commands 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!