Euclidean distance between the rows of the matrix and the vector
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello everyone,
I have a probelm with euclidean distance. I have a matrix A[30x4800] and vector B[1x4800]. I have count euclidean distance beetwen all rows of matrix A and vector B. In result i should get vector C[30x1] (i guess). I tried this
C=sqrt(sum((A-B).^2));
but i gave me C[1x4800]
Do you have any idea what is wrong?
Thank you in advance!
0 commentaires
Réponses (1)
Voir également
Catégories
En savoir plus sur Statistics and Machine Learning Toolbox 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!