MATLAB Answers


comparing the values

Asked by FIR
on 15 Feb 2012

i have extracted features of 8 images

A=115.9607 118.7609 118.7595 118.7681 118.3420 118.1658 118.0285 118.0862

and one query image from same dataset


now i want to compare these two values A,query ,if the query value is present in A,i want to display the query image ,i used euc distance ,i get error ,please help



No products are associated with this question.

1 Answer

Answer by Andrei Bobrov
on 15 Feb 2012

eg: imageCells - cell array contains 8 images (double array)

t = {'descend','ascend'}
imageCells  = arrayfun(@(i1)sort(rand(200,200,3),randi(3),t{randi(2)}),1:8,'un',0)
A=[115.9607 118.7609 118.7595 118.7681 118.3420 118.1658 118.0285 118.0862];
t = abs(A - query) < 100*eps;
if any(t), imshow(imageCells{t}); end


on 15 Feb 2012

Andrei can u please tell what imagecell is ,i did not understand

on 15 Feb 2012

plz can u tell how to form it

Andrei Bobrov
on 16 Feb 2012


Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!