compare elements in a column and exit while loop
Afficher commentaires plus anciens
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 commentaire
"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.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Multidimensional Arrays dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!