If statement - comparing single value to whole array
12 次查看(过去 30 天)
显示 更早的评论
Hello!
I'm currently trying to write an if statement that is something like this:
A = [6];
B = [1 6 4 2 4 8]
What 'if' statement can I make, that starts the conditional statement when any value within B is greater than A? I'm having trouble figuring out how to compare this single value to the entire array in B.
Thanks so much!
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!