Effacer les filtres
Effacer les filtres

How to subtract vectors of different length(Euclidean distance)

1 vue (au cours des 30 derniers jours)
Emmanuel
Emmanuel le 26 Oct 2016
Modifié(e) : Emmanuel le 26 Oct 2016
I am trying to find euclidean distance between a vector C = [11,2;13,44;5,6] for every center C= [2,4;3,7].
Here I need to compare euclidean distance of every row of A with every row of C and store the index of C. I am trying not to use for loops. I am unable to subtract vectors of different lengths. How do I go about it?
NOTE: I can not use high level functions like pdist(). I need to do it by matrix manipulation

Réponses (0)

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by