why when i import an image from my desktop the error says it doesnt exist plz help and thank u in advance
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
0 Kommentare
Akzeptierte Antwort
Voss
am 29 Nov. 2022
Bearbeitet: Voss
am 29 Nov. 2022
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 Kommentare
Walter Roberson
am 29 Nov. 2022
Also, we recommend
[filename,pathname] = uigetfile();
if isnumeric(filename); return; end %user cancel
fullfilename = fullfile(pathname,filename);
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!