??? Error using ==> eq Matrix dimensions must agree
Afficher commentaires plus anciens
[row, column]=find(My_matrix== pnode); I try to use this command and i get this error
??? Error using ==> eq Matrix dimensions must agree
What should i do?How i should write the syntaxis of it?
3 commentaires
Adam
le 15 Avr 2015
What are the dimensions of My_matrix and pnode? I assume they are not the same size since you get that error and in that case it is impossible for any of us to know what your intention is in trying to test equality between them just from the information you have given.
Giannakis Stoukas
le 15 Avr 2015
Giannakis Stoukas
le 15 Avr 2015
Réponses (1)
John D'Errico
le 15 Avr 2015
Modifié(e) : John D'Errico
le 15 Avr 2015
Your matrices are not compatible in size. READ THE ERROR MESSAGE!
Try this:
whos MY_matrix pnode
What does it tell you?
3 commentaires
Giannakis Stoukas
le 15 Avr 2015
Giannakis Stoukas
le 15 Avr 2015
Modifié(e) : John D'Errico
le 15 Avr 2015
John D'Errico
le 15 Avr 2015
I see that the last line has
find(My_matrix==node);
Even if pnode is a scalar, node may well not be so, since it was created from a previous call to find.
Catégories
En savoir plus sur Statistics and Machine Learning Toolbox 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!