compare elements in a column and exit while loop
Ältere Kommentare anzeigen
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 Kommentar
"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.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Multidimensional Arrays finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!