HI, im new in writing graph, i have this code to create a plot by pushbutton9:
//x=0;
global b;
for i=1:100
x=[x b];
plot(handles.axes3,x,'b--');
grid;
pause(1);
end
guidata(hObject,handles); //
I try to delete plot by pushbutton10, but the plot disappeared for a moment and then appeared again, how can i fix this ????

댓글 수: 3

madhan ravi
madhan ravi 2019년 4월 11일
what does "//" mean?
HANH TRAN
HANH TRAN 2019년 4월 11일
편집: HANH TRAN 2019년 4월 11일
Just note the code i write , dont worry about it
Rik
Rik 2019년 4월 11일
// is the comment flag in C. In Matlab it will just cause a syntax error.
Since you don't show us what that pushbutton10 does, we can't tell why the plot is recreated.
Also, why are you using a global? You have the guidata struct right there to share variables between callbacks.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품

릴리스

R2017a

태그

질문:

2019년 4월 11일

댓글:

Rik
2019년 4월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by