How to apply distance formula on n-number of input data sets?

1 vue (au cours des 30 derniers jours)
Imtiaz nabi
Imtiaz nabi le 4 Jan 2023
Réponse apportée : Mandar le 3 Fév 2023
Hi there,
I am trying to apply eucledian distance fromula on different data sets but I am confused about the logic.
Let me tell you about the situation first.
let's say I have 5 data sets as follow
data1 = randn(2,11); data2 = randn(2,11); data3= randn(2,11); data4 = randn(2,11); data5 = randn(2,11);
I want the distances to be calculated in the following manner:
({data1, data2},{data1, data3},{data1,data4},{data1,data5},{data2,data3}....... {datan,datan})
I don't know how to do it?
Basically I have around 2 million airfoil shapes and I wanted to calculate the distances between all of them.
I hope you are getting what I am saying!

Réponses (1)

Mandar
Mandar le 3 Fév 2023
The “pdist” function can be a potential workaround to the above issue. The function “pdist” provides the pairwise distance between pairs of observations. Refer the link below to know more about “pdist” function.

Catégories

En savoir plus sur Statistics and Machine Learning Toolbox dans Help Center et File Exchange

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by