Error in my code
1 view (last 30 days)
Show older comments
Can anyone help i have a gui and implemented a pushe button that allows me to upload and image but everytime i get prompted with files and chose an image i get this error
3 Comments
Walter Roberson
on 15 May 2021
you need both outputs of uigetfile. I already posted the code for that.
Answers (1)
Walter Roberson
on 15 May 2021
uigetfile has two outputs. The second one is the directory. You need to put it together with the file name to get the name to pass to imread.
[f, d] = uigetfile()
fn = fullfile(d, f)
a = imread(fn) ;
0 Comments
See Also
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!