【发布时间】:2011-08-01 11:36:27
【问题描述】:
有没有办法输入 if like:
var = (cond) ? true : false;
还是我们必须使用这种格式?
if (cond)
true
else
false
end
【问题讨论】:
-
但对于更一般的情况,请在此处查看一些答案:stackoverflow.com/questions/27561881/…
标签: matlab if-statement ternary-operator conditional-operator