필터 지우기
필터 지우기

Simulation Moving Object problem

조회 수: 2 (최근 30일)
engineerOfPhysics
engineerOfPhysics 2013년 5월 15일
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 !!

답변 (1개)

engineerOfPhysics
engineerOfPhysics 2013년 5월 15일
Hey Is there anyone to say anything ?
Where is the wrong ?? please help guys..

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by