vecCentroid

Return the centroid of a set of strings

Contents

Syntax

Description

vecCentroid(cellVec) returns the index of the vector that has the shortest overall distance to all the other vectors based on linear scaling.

Example

cellVec={[2 3 6], [1 3 2 4 8], [5 4 3 7 8 9], [1 3 5 4 3 7 8 9], [5 6 1 3 5 4 3 7 8], [7 6 4 2 3 6], [7 5 8 2 3 2 3 6]};
opt=strCentroid('defaultOpt');
minId=vecCentroid(cellVec, opt, 1);
fprintf('The centroid is %s.\n', mat2str(cellVec{minId}));
The centroid is [2 3 6].

See Also

editDistance, lcs, vecCentroid.


Top page   Next: toolboxInfo.m   Prev:vecQuantize.m