undefined function or variable 'basefilename'
이전 댓글 표시
답변 (2개)
Walter Roberson
2020년 10월 30일
[file, filepath] = uigetfile({'.png'; '.jpg'}, 'select one or more files', 'D:\', 'Multiselect', 'on');
file = cellstr(file); %uigetfile returns char if user selected only one
FileNames = fullfile(filepath, file); %no loop needed
fullFileName = FileNames{1};
ImageArray = imread(fullFileName);
Your most immediate problem was the typing mistake of basefilename instead of baseFileName, but you had other problems as well.
Steven Lord
2020년 10월 30일
0 개 추천
The variable basefilename used on line 8 of your code is not the same as the variable baseFileName defined on line 7. Case matters.
카테고리
도움말 센터 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
