Simulation Moving Object problem
조회 수: 2 (최근 30일)
이전 댓글 표시
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 !!
댓글 수: 0
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!