Simulation Moving Object problem

4 visualizzazioni (ultimi 30 giorni)
engineerOfPhysics
engineerOfPhysics il 15 Mag 2013
Hello guys !!!!!!
for ax=1:1:100
if ax<10
c=line(x6+ax,y6+ax*tan(30*pi/180));
b=line(x5+ax,y5+ax*tan(30*pi/180));
a=line(x4+ax,y4+ax*tan(30*pi/180));
pause(0.1)
delete(a,b,c)
else
ax=-ax;
c=line(x6+ax,y6+ax*tan(30*pi/180));
b=line(x5+ax,y5+ax*tan(30*pi/180));
a=line(x4+ax,y4+ax*tan(30*pi/180));
pause(0.1)
delete(a,b,c)
end
end
I need some help. I tried to moved an object I created with three lines as you see ( written above is just a part of real code). My aim is that object will move to some direction then after a condition it will be back. But when I try the code it moves firstly there is no problem then when the condition will be active I expected that object changes the direction to back but the objcet suddenly will be at the starting point then moves to the back direction.
I do not understand where is the problem.
Thanks for all body !!

Risposte (1)

engineerOfPhysics
engineerOfPhysics il 15 Mag 2013
Hey Is there anyone to say anything ?
Where is the wrong ?? please help guys..

Categorie

Scopri di più su App Building in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by