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

3 visualizzazioni (ultimi 30 giorni)
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!

Risposte (1)

Mandar
Mandar il 3 Feb 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.

Prodotti


Release

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by