error while using imshow function.
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
%I have an empty "axes1" in GUI. I also have an picture in C directory. I want that while fig file opens, this picture can be automatically embed into this axes1. I wrote this code but it fails.
%filename=logo.png
imshow(logo, 'Parent', handles.axes1)
% I wrote this code at the end of my function (% --- Executes just before my_guide_name is made visible.
function my_guide_name_OpeningFcn(hObject, eventdata, handles, varargin)
2 Commenti
Risposta accettata
Dishant Arora
il 13 Lug 2013
Modificato: Dishant Arora
il 13 Lug 2013
You should specify full image name(extension too ) within singles quotes. You are getting this error because logo is a predefined command in MATLAB. so you must enclose the name in quotes: 'logo.png'
Moreover,if your image is in directory other than your work directory you should move the image in your work directory or you can use imread to read that image:
I = imread('pathName\fileName');
imshow(I)
3 Commenti
Dishant Arora
il 13 Lug 2013
I told you to enclose the name in single quotes:
imshow('neu.png', 'Parent', handles.axes1)
Più risposte (1)
Yohana denia
il 11 Set 2020
Hello, can i ask u? what's the problem with this?
Error: File: imshow.m Line: 677 Column: 1
The function "adjustXYData" was closed with an
'end', but at least one other function definition
was not. To avoid confusion when using nested
functions, it is illegal to use both conventions in
the same file.
0 Commenti
Vedere anche
Categorie
Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!