Creating an array out of a for loop.
古いコメントを表示
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!
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Design and Simulate SerDes Systems についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!