% plot_dummynode_trajectory.m

clear; close all;

[LABEL,DATA]=MBDynLoad('free_rotating_block_dummynode.mov');

x=DATA(:,2,LABEL==2);
y=DATA(:,3,LABEL==2);
z=DATA(:,4,LABEL==2);

plot3(x,y,z,'LineWidth',1)
grid on;
axis([-0.2,0.2,-0.2,0.2,-0.2,0.2]);
axis vis3d;
set(gca,'FontSize',12);
xlabel('x (m)','FontSize',12);
ylabel('y (m)','FontSize',12);
zlabel('z (m)','FontSize',12);
title('Trajectory of the block corner','FontSize',12);