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

조회 수: 1 (최근 30일)
Imtiaz nabi
Imtiaz nabi 2023년 1월 4일
답변: Mandar 2023년 2월 3일
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!

답변 (1개)

Mandar
Mandar 2023년 2월 3일
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.

카테고리

Help CenterFile Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by