Error in my code

1 view (last 30 days)
schadrac Divova
schadrac Divova on 14 May 2021
Commented: Walter Roberson on 15 May 2021
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
schadrac Divova
schadrac Divova on 15 May 2021
Hi Gotjen thank you so much for replying i feel as though i'm have a lil bit of trouble understanding. if you could be as to more helpful to me i would very much appriciate if you could contact me @ schadracdivovaa@gmail.com I would begrateful for you help as this is my final year project and really need this to work. as requested this is is import_image_callback
Walter Roberson
Walter Roberson on 15 May 2021
you need both outputs of uigetfile. I already posted the code for that.

Sign in to comment.

Answers (1)

Walter Roberson
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) ;

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!