%%% another 3D vectorfield plot
% rha on vaio 28 feb 2004
% cf cooper p. 221
u = inline('1 + 0*x', 'x', 'y', 'z')
v = inline('x + y.^2', 'x', 'y', 'z')
w = inline('z', 'x', 'y', 'z')
x = linspace(-2,3,6);
y = linspace(-1,2,6);
[X,Y] = meshgrid(x,y);
for z = -1:.4:1
    Z = z+0*X;
    U = u(X,Y,Z);
    V = v(X,Y,Z);
    W = w(X,Y,Z);
    quiver3(X,Y,Z,U,V,W)
    hold on
end