Prev: reshuffle different parts within a sinus to construct a new one
Next: m-file function to find inverse matrix
From: Walter Roberson on 27 Jan 2010 19:57 Brice wrote: > I hope someone can help me figure this out. I have this code snippet: > > FP = {'live1_1187R.jpg' 'live1_1188L.jpg' > 'C:\Users\Brice\Documents\MATLAB\OrthoPix\'}; So FP is a cell > Slide = FP > PathName1 = FP(size(FP,2)) And there you access FP using (), so the result will be a cell; hence PathName1 will be a cell. > num_images = size(Slide,2)-1 > CountList=zeros(num_images,1); > for i=1:num_images %Begins the analysis for all images > if iscell(Slide) I = imread([PathName1 > Slide{1,i}]) %%other code And in the imread() call, you have [PathName1 Slide{1,i}] which is asking to concatenate a cell and a string. The result of that concatenation is going to be a cell, so you are passing imread() a cell instead of a string for the file name. > end > > And I can't figure out the error I'm getting: %( > ??? Conversion to logical from cell is not possible. > > Error in ==> imread at 331 > if (strfind(filename, '://')) > > Error in ==> RESEARCHmode at 41 > I = imread([PathName1 Slide{1,i}]) > %) > > All the other instances of this error I've researched all had > incorrectly used () instead of {}, but I already have {} used. The > "other code" is just output for the naming of the images, so I know that > is not the issue. Any help is appreciated! |