Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

switch case in MATLAB

Status
Not open for further replies.

royvincent

Member level 2
Joined
Jan 28, 2010
Messages
52
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
India
Activity points
1,610
Hai

Every time I get an image, I need to compare it with a lot of existing images and take an appropriate decision. But, the 'elseif' statement makes it very slow. But I cant use switch case because the switch expression needs to be a scalar or string. How can I do my comparison in a faster way?

Please help. :-(

Thanks
 

I am just using the following commands:

eg;

a=imread('abc.jpg');
b=imread('xyz.jpg');
.
.
.
.

new=imread('New_Image.jpg');

%the following code is for comparison (which I like to do with switch case)

if(new==a)
.......
elseif(new==b)
.......
.
.
.
.
end;

can I do this with switch statement?

Thanks
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top