Creating a 3D plot of a trajectory for multiple robots in formation

2 次查看(过去 30 天)
I am working with 3 mobile robots that form a triangle. they start at arbitrary initial conditions then form. I want to create a 3-D plot of how the robot positions change time. In a sense that I want to plot their formation at each time step t. For now i can plot robot final positions. see the figure and code snippet. Please advise on how to create this 3-D plot.
oend=length(t1); plot(real(robot1),imag(robot1),'-b',real(robot2),imag(robot2),'-g',... real(robot3),imag(robot3),'-r'), hold on plot(real(robot1(oend)),imag(robot1(oend)),'*',real(robot2(oend)),imag(robot2(oend)),'*',... real(robot3(oend)),imag(robot3(oend)),'*'), z=[robot1(oend) robot2(oend) robot3(oend) robot1(oend)]; plot(real(z),imag(z)), hold off

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Robotics 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by