compare elements in a column and exit while loop
显示 更早的评论
hi,
i have two matrices, each of size 2xn and 2xm. i would like to select one column from each of these matrices and compare its elements. now even if any one of the elements meet the condition then i would like to exit a while loop. for example-
A=[a11 a12; a21 a22]
B=[b11 b12 b13; b21 b22 b23]
now i want to find the difference the first columns of each of the matrices. meaning (a11 vs b11) and (a21 vs b21). now if any one of these two results is below a certain value then i would like to exit the while loop.
1 个评论
"if any one of the elements meet the condition" - which condition? What is "a11, a12, ..."? Are they numbers or objects or symbolic variables?
Do you have 1 or 2 while loops?
"select one column from each of these matrices and compare its elements" - which column? Compare the elements by which operation? greater, greater equal, lower, lower equal, equal, opposite signs, higher absolute value? Please be more specific.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Multidimensional Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!