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

1 vue (au cours des 30 derniers jours)
Amir Azadeh Ranjbar
Amir Azadeh Ranjbar le 19 Août 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
%_________________________

Réponses (0)

Catégories

En savoir plus sur Animation dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by