Use While loop for a matrix
古いコメントを表示
I have a variable A with 517X519 size and variable B with 517X519. I will like to use a while loop. for example, I will like to do: while A > B. so that A goes through all the cells in B (268323) and check if condition are met. I get this error message
Warning: Rank deficient, rank = 1, tol = 3.035597e-12.
Matrix dimensions must agree.
Can some please assist.
3 件のコメント
KL
2017 年 12 月 15 日
...goes through all the cells in B (268323)...
Do you want to compare every element of A with all the elements of B?
Ayodele Ogunkoya
2017 年 12 月 15 日
Walter Roberson
2017 年 12 月 15 日
It sounds as if your code uses the / operator on matrices at some point. Either you are expecting only scalars at that point but have matrices (or vectors) instead, or else you know you are operating on matrices but should have used ./ instead of /
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Operators and Elementary Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!