MATLAB Answers


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

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.



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'); 
for i=1:20

  1 Comment

ya gt it ..thanks iman

Join the 15-year community celebration.

Play games and win prizes!

Learn more
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

MATLAB Academy

New to MATLAB?

Learn MATLAB today!