Distance between elements of two matrices
Afficher commentaires plus anciens
Hi everybody,
I am a new MATLAB user and I have a question about how to compute a distance measure between different elements of two matrices. Let me be clearer and expose my problem as follows:
I have two matrices, X and Y, which dimensions are the same, say m-by-n (2 dimensions). X and Y contains both just 1 zero-element per row and the other elements are non-zero (it could be anything but zeros); the zero-element can be anywhere within each row and is not necessarily "located" in the same cell in X and Y. I would like to compare the "location" of each zero-element by row between X and Y, and then compute how distant they are between each-other. I actually want to know how many cells are there in-between each zero-element. Hence, I would like the distance between coordinates (in each row) and not some measure of distance between the actual value of the different elements.
I hope my post is clear enough! Thanks a lot for any help!
Réponse acceptée
Plus de réponses (1)
Arnaud Joye
le 14 Oct 2011
0 votes
Catégories
En savoir plus sur MATLAB dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!