distance metric Subscripted assignment error

3 visualizaciones (últimos 30 días)
sm m
sm m el 11 de Jul. de 2015
Editada: sm m el 11 de Jul. de 2015
Hi
My test feature vector is 'testpg' and trained feature vector is 'trainpg' and both are of dimension 2000*1 .I am aiming to find the distance between the two histogram feature vectors and hence i do
distance = norm(trainpg-testpg)
Next I compare it to a scalar threshold value to check whether it satisfies my condition , The above code works well as i get a scalar value of this distance ie : for eg distance = 5.4 which is a scalar
But when I change code to use any other histogram based distance metric it doesn't work
The new code I used is
distance = pdist2(trainpg,testpg, 'chisq')
d = size(distance)
Here I am getting subscripted assignment dimension mismatch error as the dimensions of my distance are now 2000*2000 instead of 1*1
How could I get scalar value for the distances?

Respuestas (0)

Categorías

Más información sobre Dimensionality Reduction and Feature Extraction en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by