Mercurial > hg > octave-nkf
diff scripts/general/interpft.m @ 6702:b2391d403ed2
[project @ 2007-06-12 21:39:26 by dbateman]
author | dbateman |
---|---|
date | Tue, 12 Jun 2007 21:39:27 +0000 |
parents | 376e02b2ce70 |
children | 8b0cfeb06365 |
line wrap: on
line diff
--- a/scripts/general/interpft.m +++ b/scripts/general/interpft.m @@ -101,10 +101,9 @@ %! ti = t(1) + [0 : k-1]*dt*n/k; %! y = sin (4*t + 0.3) .* cos (3*t - 0.1); %! yp = sin (4*ti + 0.3) .* cos (3*ti - 0.1); -%! plot (ti, yp, 'g;sin(4t+0.3)cos(3t-0.1);', ... -%! ti, interp1 (t, y, ti, 'spline'), 'b;spline;', ... -%! ti, interpft (y ,k), 'c;interpft;', ... -%! t, y, 'r+;data;'); +%! plot (ti, yp, 'g', ti, interp1(t, y, ti, 'spline'), 'b', ... +%! ti, interpft (y, k), 'c', t, y, 'r+'); +%! legend ('sin(4t+0.3)cos(3t-0.1','spline','interpft','data'); %!shared n,y %! x = [0:10]'; y = sin(x); n = length (x);