Matlab newbie - what is wrong with this function?
이전 댓글 표시
I am trying to open multiple data files at once and store them in a single array. When I use the 'Multiselect' option from uigetfile I get an error with fopen which I don't get when I only select a single file. I am hoping someone can tell me how to properly use fopen in this situation and I am trying to avoid individually selecting each file. DO I need a for loop or something? Here is my function (starting after "end"):
if true
% code
end
[FileName,PathName] = uigetfile('\\PDNAS02\Home\My Documents\qual lum stability\032113\*.lum', 'MultiSelect', 'on', 'Select an LUM File...\n');
file = strcat(PathName,FileName)
fild = fopen(file,'r');
img = fread(fild,[1392,1040],'float32');
img = rot90(flipdim(img,2));
and here is the error it shows me after trying to execute it selecting multiple files at the uigetfile step
"Error using fopen First input must be a file name of type char, or a file identifier of type double.
Error in read_LUM_all (line 16) fild = fopen(file,'r');"
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!