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

1 Ansicht (letzte 30 Tage)
Amir Azadeh Ranjbar
Amir Azadeh Ranjbar am 19 Aug. 2022
%______ 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
%_________________________

Antworten (0)

Kategorien

Mehr zu Animation finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by