%shotcuts for components of vector state x1 = x(:,1); x2 = x(:,2); %Let's produce an animated plot: figure axis([-1 5 -2 2]); link1 = line('xdata', [0, 0], 'ydata', [-2, 2]); link2 = line('xdata', [0, x1(1)], 'ydata', [0,0], 'Marker', 'o', 'MarkerSize', 30); for i=1:length(x1) set(link2,'xdata', [0, x1(i)]); drawnow; end