i want to calculate euclidean distance between dataset with query where dataset (36x9) and query(3x8).
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
This is my formula :
jarak = jarak + sqrt(ZRef{j,1:8}) - ZQuery({j,1:8}.^2;
when I'm running, there is an error Cell contents reference from a non-cell array object.
Thanks you
0 Kommentare
Antworten (2)
Image Analyst
am 4 Mär. 2017
ZQuery and ZRef are not cell arrays. Try using parentheses instead of braces, and putting them in the proper locations.
jarak = jarak + sqrt((ZRef(j,1:8) - ZQuery(j,1:8)) .^ 2);
0 Kommentare
Walter Roberson
am 4 Mär. 2017
If you are more or less moving the query over the whole dataset looking for best match, then I suggest using nlfiter if you need to form an explicit euclidean distance. If you are looking for "best match" then I gather that it would typically be computed by cross-correlation.
0 Kommentare
Siehe auch
Kategorien
Mehr zu NaNs finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!