我用uigetfile
来选择多个图像。当我选择图像并按下打开按钮或按下输入键时,一切正常。但是,当我改为选择所选图像的图像,并双击,我得到这个错误:为什么在使用uigetfile选择文件时出现此错误?
Cell contents reference from a non-cell array object.
Error in Picketfence>insertpb_Callback (line 141)
file = fullfile(PathName,FileNames{i});
这里是我的代码:
c={'*.*', 'All Files(*.*)';'*.jpeg','figure (*.jpg)';'*.tif',...
'figure (*.tif)'};
[FileNames,PathName] = uigetfile(c, 'Select Images','MultiSelect','on');
if char(FileNames)
nfiles = length(FileNames);
handles.profile = zeros(1024,1024);
for i = 1:nfiles
file = fullfile(PathName,FileNames{i});
handles.profile = handles.profile+im2double(imread(file));
end
end
为什么会出现这个错误,我怎么能解决这个问题?
非常感谢。 – Mahdie