why when i import an image from my desktop the error says it doesnt exist plz help and thank u in advance
1 次查看(过去 30 天)
显示 更早的评论
采纳的回答
Voss
2022-11-29
编辑:Voss
2022-11-29
Use both output arguments from uigetfile to construct the full path name of the file:
[filename,pathname] = uigetfile();
fullfilename = fullfile(pathname,filename);
a = imread(fullfilename);
2 个评论
Walter Roberson
2022-11-29
Also, we recommend
[filename,pathname] = uigetfile();
if isnumeric(filename); return; end %user cancel
fullfilename = fullfile(pathname,filename);
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!