Creating an array out of a for loop.
Afficher commentaires plus anciens
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!
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Design and Simulate SerDes Systems dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!