image thumbnail
from Multiple simulations in 2-D by Zhi Han
Simulating a 2-D system for multiple initial points

plotstates_vdp(x, tout)
function plotstates_vdp(x, tout)
n = size(x,2);
xp = x(:,1:n/2);
xp = [xp, xp(:,1)];
yp = x(:,n/2+1: end);
yp = [yp, yp(:,1)];
zp = tout;
zp = repmat(zp,1,size(yp,2));

s = surf(xp,yp,zp);
light;
set(s, 'EdgeColor','none', 'FaceColor','r');

set(s, 'FaceLighting','phong');

axis square;
box on;

xlabel('x');
ylabel('y');
zlabel('t');

Contact us at files@mathworks.com