<< CMeans CLUSTER FuzzyCMeans >>

CLUSTER >> CLUSTER > CreateDistanceMatrix

CreateDistanceMatrix

calculates the distances between vectors.

Calling Sequence

[DistanceMatrix] = CreateDistanceMatrix(Source, Destination, NormType)

Parameters

Source:

matrix

Destination:

matrix

NormType:

norm of vectors, must be a scalar greater than zeros, can be %inf

DistanceMatrix:

matrix that contains the distances between the vectors of Source (rows) and Destination (columns)

Description

This function calculates the distances between the rows of Source and the rows of Destination.The result is a matrix. The rows correspond to the to the vectors of Source. The columns correspond to the vectors of Destination.

Examples

global CLUSTER_PATH;
Source = read_csv(CLUSTER_PATH + 'demos\IrisData.csv', ascii(9));
Samples = strtod(Source(:, 1 : 4));
Centers = SelectRandomly(Samples, 5);
Distances = CreateDistanceMatrix(Samples(1 : 5, :), Centers, 2)

See also

Authors

Bibliography

Richard O. Duda, Peter E. Hart, David G. Stork, 'Pattern Classification', John Wiley & Sons Inc., New York, Chichester, Weinheim, Brisbane, Singapore, Toronto, Second Edition, 2001


Report an issue
<< CMeans CLUSTER FuzzyCMeans >>