matlab gui error using axes invalid object handle
Afficher commentaires plus anciens
function spectrograma_Callback(hObject, eventdata, handles)
% hObject handle to spectrograma (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%spectrograma primul semnal cu zgomot
a=get(handles.semnal_ideal,'Value')
if a==1
q=spectrograma_semnal_ideal(0.9)
axes(handles.axes5)
plot3(q(1),q(2),q(3),'r*','MarkerSize',10)
hold on
else
b=get(handles.zgomot,'String');
zgomot=str2double(b);
for i=1:50
[solutii(i,:),output(i)]=spectrograma_semnal_zgomot(0.9,zgomot);
end
solutii_bune=find(output==1);
pozitia_sursei=sum(solutii(solutii_bune,:))/size(solutii_bune,2);
axes(handles.axes5)
plot3(pozitia_sursei(1),pozitia_sursei(2),pozitia_sursei(3),'r*','MarkerSize',10);
hold on
end
I have to make a interface and i'm stuck at this error. This error give me headaches and i can't solve it
Error using axes
Invalid object handle
can anyone help me?
Réponses (1)
Jan
le 22 Mar 2018
0 votes
axes(handles.axes5) fails, if handles.axes5 is not a valid axes object. Where did you create and define it? Has it been deleted? Did you overwrite the field in the handles struct?
5 commentaires
Jessie Bessel
le 22 Mar 2018
Modifié(e) : Jessie Bessel
le 22 Mar 2018
Jessie Bessel
le 24 Mar 2018
Modifié(e) : Jessie Bessel
le 24 Mar 2018
x Wang
le 17 Juil 2022
if
axes5
else
axes5
same thing here,how did you fix this.SOS
Catégories
En savoir plus sur Creating, Deleting, and Querying Graphics Objects dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!