I want to draw the point before and Delete the next point

조회 수: 1 (최근 30일)
Amir Azadeh Ranjbar
Amir Azadeh Ranjbar 2022년 8월 19일
%______ This is to return to the previous point______________
app.i=app.i-1;
if app.i>1
addpoints(app.hnext,app.Cent_Viloc(app.i).Center(1),app.Cent_Viloc(app.i).Center(2))
text(app.UIAxes,app.Cent_Viloc(app.i).Center(1)+0.2,app.Cent_Viloc(app.i).Center(2)+0.2,...
[num2str(app.i),"Volocity : ",num2str(app.Cent_Viloc(app.i).Velocity(1))],"FontSize",10,"FontWeight",...
"bold","Color",'y',...
'BackgroundColor',[1 1 1])
drawnow
end
%%___________________________This is to return to the next point
app.i=app.i+1;
if app.i>1
addpoints(app.hnext,app.Cent_Viloc(app.i).Center(1),app.Cent_Viloc(app.i).Center(2))
text(app.UIAxes,app.Cent_Viloc(app.i).Center(1)+0.2,app.Cent_Viloc(app.i).Center(2)+0.2,...
[num2str(app.i),"Volocity : ",num2str(app.Cent_Viloc(app.i).Velocity(1))],"FontSize",10,...
"FontWeight","bold","Color",'white',...
'BackgroundColor',[0.6 0.2 0.5])
drawnow
end
%_________________________

답변 (0개)

카테고리

Help CenterFile Exchange에서 Animation에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by