& operator without if
显示 更早的评论
Why this rutine:
[0 0]<[1 1] & [0 0]<[-1 1]
return:
[0 1]
how work conditional operator & without if?
3 个评论
Stephen23
2020-5-21
These are the two inputs that you provided to the element-wise & operator:
>> [0 0]<[1 1]
ans =
1 1
>> [0 0]<[-1 1]
ans =
0 1
Are you uncertain how AND logic works? What do you expect the & operator to do?
daniel molina
2020-5-21
James Tursa
2020-5-21
& is the an element-wise operator.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Monte Carlo Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!