Mercurial > hg > octave-lyh
comparison scripts/plot/comet.m @ 11587:c792872f8942
all script files: untabify and strip trailing whitespace
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 20 Jan 2011 17:35:29 -0500 |
parents | fd0a3ac60b0e |
children | 72c96de7a403 |
comparison
equal
deleted
inserted
replaced
11586:12df7854fa7c | 11587:c792872f8942 |
---|---|
1 ## Copyright (C) 2008-2011 Ben Abbott | 1 ## Copyright (C) 2008-2011 Ben Abbott |
2 ## | 2 ## |
3 ## This file is part of Octave. | 3 ## This file is part of Octave. |
4 ## | 4 ## |
5 ## Octave is free software; you can redistribute it and/or modify it | 5 ## Octave is free software; you can redistribute it and/or modify it |
6 ## under the terms of the GNU General Public License as published by | 6 ## under the terms of the GNU General Public License as published by |
7 ## the Free Software Foundation; either version 3 of the License, or (at | 7 ## the Free Software Foundation; either version 3 of the License, or (at |
19 ## -*- texinfo -*- | 19 ## -*- texinfo -*- |
20 ## @deftypefn {Function File} {} comet (@var{y}) | 20 ## @deftypefn {Function File} {} comet (@var{y}) |
21 ## @deftypefnx {Function File} {} comet (@var{x}, @var{y}) | 21 ## @deftypefnx {Function File} {} comet (@var{x}, @var{y}) |
22 ## @deftypefnx {Function File} {} comet (@var{x}, @var{y}, @var{p}) | 22 ## @deftypefnx {Function File} {} comet (@var{x}, @var{y}, @var{p}) |
23 ## @deftypefnx {Function File} {} comet (@var{ax}, @dots{}) | 23 ## @deftypefnx {Function File} {} comet (@var{ax}, @dots{}) |
24 ## Produce a simple comet style animation along the trajectory provided by | 24 ## Produce a simple comet style animation along the trajectory provided by |
25 ## the input coordinate vectors (@var{x}, @var{y}), where @var{x} will default | 25 ## the input coordinate vectors (@var{x}, @var{y}), where @var{x} will default |
26 ## to the indices of @var{y}. | 26 ## to the indices of @var{y}. |
27 ## | 27 ## |
28 ## The speed of the comet may be controlled by @var{p}, which represents the | 28 ## The speed of the comet may be controlled by @var{p}, which represents the |
29 ## time which passes as the animation passes from one point to the next. The | 29 ## time which passes as the animation passes from one point to the next. The |
53 elseif (nargin == 3) | 53 elseif (nargin == 3) |
54 x = varargin{1}; | 54 x = varargin{1}; |
55 y = varargin{2}; | 55 y = varargin{2}; |
56 p = varargin{3}; | 56 p = varargin{3}; |
57 endif | 57 endif |
58 | 58 |
59 oldh = gca (); | 59 oldh = gca (); |
60 unwind_protect | 60 unwind_protect |
61 axes (h); | 61 axes (h); |
62 newplot (); | 62 newplot (); |
63 theaxis = [min(x), max(x), min(y), max(y)]; | 63 theaxis = [min(x), max(x), min(y), max(y)]; |