why is my code having an error

1 view (last 30 days)
tala
tala on 17 Jan 2023
Answered: Walter Roberson on 23 Jan 2023
Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)dipfinalproject('importimage_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.
  1 Comment
Rajeev
Rajeev on 23 Jan 2023
Can you provide the exact snapshot of the error along with the script that is causing it?

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 23 Jan 2023
the most common problem in image importing callbacks, is failing to use fully qualified file names. uigetfile returns two outputs, filename and directory. The directory returned is not certain to end with a directory separator character but often does. use fullfile to put the two parts together.

Categories

Find more on Environment and Settings 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!