Discover MakerZone

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

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

accessing excel content nd writing d content one by one into imread instruction..

Asked by Puneeth Appi Reddy on 1 May 2013

fid=fopen('tun.xlsx','r'); [num,txt,raw] = xlsread('tun.xlsx'); fclose(fid); disp(txt); for i=1:20 A=txt(1:i); i=i+1; B=imread('A'); end basically i hav an excel file in that there are names given to 20 jpeg images, i am able to individually access each image name but i need to pass d name to imread nd perform d other processing...nd i am nt able to pass d name to imread on each induvidual iteration of i.. is der any other means of reading names nd passing dem to imread.. i gt an error as A is nt a file name in d image databse.

0 Comments

Puneeth Appi Reddy

Products

No products are associated with this question.

1 Answer

Answer by Iman Ansari on 1 May 2013
Accepted answer

Hi. You don't need to use fopen or fclose.

[~,txt,~] = xlsread('tun.xlsx'); 
disp(txt); 
for i=1:20
    A=txt{1,i}; 
    B{i}=imread(A); 
end 
imshow(B{1})

1 Comment

Puneeth Appi Reddy on 1 May 2013

ya gt it ..thanks iman

Iman Ansari

Contact us