What does a = b > c specify in MATLAB syntax?
显示 更早的评论
My guess is that it is a shorthand for an if-else condition where a = 1 if b>c is true. Is this correct? If yes, can I replace a = b > c with a suitable if else condition?
采纳的回答
更多回答(1 个)
No, it is not a shorthand for if/else.
b>c is an expression that returns a value of true() or false(). In this case, the returned value is simply assigned to a.
类别
在 帮助中心 和 File Exchange 中查找有关 Argument Definitions 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!