the if statement with and/or
3 次查看(过去 30 天)
显示 更早的评论
Is this right?
If a and b and c and d <= 100 {statement} end
2 个评论
Chad Greene
2014-6-17
Your question is not very clear. What do your data look like and what is your goal?
Geoff Hayes
2014-6-17
No, that statement is incorrect. In the Command Window, type help if or doc if for details on constructing an if statement and how relational operators are used in compound expressions.
采纳的回答
Azzi Abdelmalek
2014-6-17
编辑:Azzi Abdelmalek
2014-6-17
if a<100&b<100&c<100&d<100
%do
end
%or
if all([a b c d]<100)
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multidimensional Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!