Promble creating a variable with loop
조회 수: 4 (최근 30일)
이전 댓글 표시
Hello guys. I want to implement this code:
[nii_file,pathname] = uigetfile('*.nii','Select Time Points','MultiSelect','on')
if isequal(nii_file, 0)
disp('User selected Cancel')
return;
end
for k = 1:length(nii_file)
a.(nii_file{k}) = niftiread(nii_file{k});
end
but it gives me the error: Invalid field name: 'FileName.nii'.
The files '.nii' are matrices of 128x128x128 int16
Can it be done by this method?
Regards
댓글 수: 0
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!