Creating an array out of a for loop.
Mostrar comentarios más antiguos
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
end
Struct
Any help would be great!
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Design and Simulate SerDes Systems en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!