Using a for loop to create an array of file information however when I run the code I get an array of the correct size but only one cell had data in it…
struct = cell(length(fileID), 3);for j = 1:length(fileID) fID = char(fileID(j)); if exist(fID, 'file'); info = dicominfo(fID); serDes = info.SeriesDescription; instNo = info.InstanceNumber; sliceLoc = info.SliceLocation; L = length(fID); fName = fID(L-2:L); struct{k} = [fName, serDes, instNo]; else end endStruct
Any help would be great!
Best Answer