How to calculate the distance between matrixes
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Is it possible to determine the Euclidean distance between two matrices with different lengths?
%//// Ex:
I1 = [4, 3, 5, 2, 4]
I2 = [4, 3, 6]
The length of I1 is 5, but the length of I2 is 3. So is it possible to calculate the Euclidean distance??
Thank you
1 Commento
Andrew Newell
il 24 Apr 2017
A Euclidean distance is between two points in the same space. Here we have points in a five-dimensional space and a three-dimensional space. To make the idea of Euclidean distance meaningful, you'd have to do something like add two zeros to I2.
Risposte (1)
Jan
il 24 Apr 2017
Modificato: Jan
il 24 Apr 2017
No. The Euclidean distance requires vectors with the same number of elements.
You can define a new distance, which fills elements with zeros (but then decide, if the vector is padded on the left or the right).
What is the wanted output for the shown 2 vectors?
0 Commenti
Vedere anche
Categorie
Scopri di più su Logical in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!