function F = curvetan(r,t,a,b,x0,x1,y0,y1) % curvetan plots the curve r(t) for t in [a,b] and, one at a time, % tangent vectors at 100 equally spaced times in the interval [a,b]. The % plots are saved as frames with the name F for use with the command movie % or movieview or some other MATLAB movie player. The axis for each frame % is the same, with x-limits x0,x1, ylimits y0,y1. % rx = inline(vectorize(r(1))); ry = inline(vectorize(r(2))); rp = diff(r); c = (b-a)/100; T = a:0.01:b; for j = 1:100 clf plot(rx(T),ry(T),'LineWidth',2) hold on quiver(rx(a+j*c),ry(a+j*c),... subs(rp(1),t,a+j*c),subs(rp(2),t,a+j*c),1,'LineWidth',2) axis([x0 x1 y0 y1]) F(j) = getframe; end