Mercurial > hg > octave-lojdl
changeset 5378:b2a5596a3f7b
[project @ 2005-06-02 16:01:25 by jwe]
author | jwe |
---|---|
date | Thu, 02 Jun 2005 16:01:25 +0000 |
parents | bd4ee620c38a |
children | 27986bd3e238 |
files | scripts/ChangeLog scripts/plot/meshgrid.m scripts/signal/freqz.m |
diffstat | 3 files changed, 69 insertions(+), 49 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2005-05-18 Ben Barrowes <barrowes@alum.mit.edu> + + * plot/meshgrid.m: Handles 3 input arguments. + 2005-06-02 Paul Kienzle <pkienzle@users.sf.net> * signal/freqz.m: Use correct calculations when given a vector of @@ -207,37 +211,37 @@ (BINDISTSUBDIRS): Delete variable. * scripts/control/Makefile.in: Likewise. - * scripts/audio/Makefile.in (bin-dist): Delete target. + * audio/Makefile.in (bin-dist): Delete target. (BINDISTFILES): Delete variable. - * scripts/control/base/Makefile.in: Likewise. - * scripts/control/hinf/Makefile.in: Likewise. - * scripts/control/obsolete/Makefile.in: Likewise. - * scripts/control/system/Makefile.in: Likewise. - * scripts/control/util/Makefile.in: Likewise. - * scripts/deprecated/Makefile.in: Likewise. - * scripts/elfun/Makefile.in: Likewise. - * scripts/finance/Makefile.in: Likewise. - * scripts/general/Makefile.in: Likewise. - * scripts/image/Makefile.in: Likewise. - * scripts/sparse/Makefile.in: Likewise. - * scripts/io/Makefile.in: Likewise. - * scripts/plot/Makefile.in: Likewise. - * scripts/Makefile.in: Likewise. - * scripts/miscellaneous/Makefile.in: Likewise. - * scripts/linear-algebra/Makefile.in: Likewise. - * scripts/polynomial/Makefile.in: Likewise. - * scripts/quaternion/Makefile.in: Likewise. - * scripts/set/Makefile.in: Likewise. - * scripts/signal/Makefile.in: Likewise. - * scripts/specfun/Makefile.in: Likewise. - * scripts/special-matrix/Makefile.in: Likewise. - * scripts/startup/Makefile.in: Likewise. - * scripts/statistics/base/Makefile.in: Likewise. - * scripts/statistics/distributions/Makefile.in: Likewise. - * scripts/statistics/models/Makefile.in: Likewise. - * scripts/statistics/tests/Makefile.in: Likewise. - * scripts/strings/Makefile.in: Likewise. - * scripts/time/Makefile.in: Likewise. + * control/base/Makefile.in: Likewise. + * control/hinf/Makefile.in: Likewise. + * control/obsolete/Makefile.in: Likewise. + * control/system/Makefile.in: Likewise. + * control/util/Makefile.in: Likewise. + * deprecated/Makefile.in: Likewise. + * elfun/Makefile.in: Likewise. + * finance/Makefile.in: Likewise. + * general/Makefile.in: Likewise. + * image/Makefile.in: Likewise. + * sparse/Makefile.in: Likewise. + * io/Makefile.in: Likewise. + * plot/Makefile.in: Likewise. + * Makefile.in: Likewise. + * miscellaneous/Makefile.in: Likewise. + * linear-algebra/Makefile.in: Likewise. + * polynomial/Makefile.in: Likewise. + * quaternion/Makefile.in: Likewise. + * set/Makefile.in: Likewise. + * signal/Makefile.in: Likewise. + * specfun/Makefile.in: Likewise. + * special-matrix/Makefile.in: Likewise. + * startup/Makefile.in: Likewise. + * statistics/base/Makefile.in: Likewise. + * statistics/distributions/Makefile.in: Likewise. + * statistics/models/Makefile.in: Likewise. + * statistics/tests/Makefile.in: Likewise. + * strings/Makefile.in: Likewise. + * time/Makefile.in: Likewise. 2005-03-08 John W. Eaton <jwe@octave.org> @@ -682,7 +686,7 @@ 2004-04-21 David Bateman <dbateman@free.fr> - * scripts/elfun/lcm.m: Make N-d aware. + * elfun/lcm.m: Make N-d aware. * general/diff.m: Make the code N-d array aware. Allow an optional argument to define the dimension along which to perform @@ -704,7 +708,7 @@ array aware and and optional argument for the dimension along which to operate. - * scripts/signal/unwrap.m: Make N-d array aware and fix optional + * signal/unwrap.m: Make N-d array aware and fix optional argument for the dimension to be consistent with other N-d array functions. @@ -1591,7 +1595,7 @@ 2002-04-24 Bill Lash <lash@tellabs.com> - * scripts/signal/unwrap.m: New file. + * signal/unwrap.m: New file. 2002-04-23 Paul Kienzle <pkienzle@users.sf.net> @@ -1602,7 +1606,7 @@ * strings/deblank.m: Trim \0 as well as blank. - * scripts/freqz.m: Evaluate a specific range of frequencies + * freqz.m: Evaluate a specific range of frequencies expressed in radians or Hz relative to a supplied sample rate. 2002-04-04 Paul Kienzle <pkienzle@users.sf.net> @@ -2848,12 +2852,12 @@ 1999-11-02 Ben Sapp <bsapp@nua.lampf.lanl.gov> - * scripts/audio/lin2mu.m: Texinfoize doc string. - * scripts/audio/loadaudio.m: Ditto. - * scripts/audio/mu2lin.m: Ditto. - * scripts/audio/playaudio.m: Ditto. - * scripts/audio/record.m: Ditto. - * scripts/audio/saveaudio.m: Ditto. + * audio/lin2mu.m: Texinfoize doc string. + * audio/loadaudio.m: Ditto. + * audio/mu2lin.m: Ditto. + * audio/playaudio.m: Ditto. + * audio/record.m: Ditto. + * audio/saveaudio.m: Ditto. 1999-10-26 Ben Sapp <bsapp@nua.lampf.lanl.gov> @@ -4308,6 +4312,6 @@ Fri Feb 24 10:36:01 1995 John Eaton <jwe@schoch.che.utexas.edu> - * scripts/image/saveimage.m: Fix typo. + * image/saveimage.m: Fix typo. See ChangeLog.1 in the top level directory for earlier changes.
--- a/scripts/plot/meshgrid.m +++ b/scripts/plot/meshgrid.m @@ -18,11 +18,16 @@ ## 02110-1301, USA. ## -*- texinfo -*- -## @deftypefn {Function File} {[@var{xx}, @var{yy}] =} meshgrid (@var{x}, @var{y}) +## @deftypefn {Function File} {[@var{xx}, @var{yy}, @var{zz}] =} meshgrid (@var{x}, @var{y}, @var{z}) +## @deftypefnx {Function File} {[@var{xx}, @var{yy}] =} meshgrid (@var{x}, @var{y}) ## @deftypefnx {Function File} {[@var{xx}, @var{yy}] =} meshgrid (@var{x}) -## Given vectors of @var{x} and @var{y} coordinates, return two matrices corresponding -## to the @var{x} and @var{y} coordinates of a mesh. The rows of @var{xx} are copies of @var{x}, -## and the columns of @var{yy} are copies of @var{y}. +## Given vectors of @var{x}, @var{y}, and @var{z} coordinates, return +## three dimensional arrays corresponding to the @var{x}, @var{y}, and +## @var{z} coordinates of a mesh. Given only @var{x} and @var{y}, +## return matrices corresponding to the @var{x} and @var{y} coordinates +## of a mesh. The rows of @var{xx} are copies of @var{x}, and the +## columns of @var{yy} are copies of @var{y}. If @var{y} is omitted, +## then it is assumed to be the same as @var{x}. ## @end deftypefn ## ## @seealso{sombrero, plot, semilogx, semilogy, loglog, polar, mesh, @@ -30,7 +35,7 @@ ## Author: jwe -function [xx, yy] = meshgrid (x, y) +function [xx, yy, zz] = meshgrid (x, y, z) if (nargin == 1) y = x; @@ -42,8 +47,19 @@ else error ("meshgrid: arguments must be vectors"); endif + elseif (nargin == 3) + if (isvector (x) && isvector (y) && isvector (z)) + lenx = length (x); + leny = length (y); + lenz = length (z); + xx = repmat (ones (leny, 1) * x(:).', [1, 1, lenz]); + yy = repmat (y(:) * ones (1, lenx), [1, 1, lenz]); + zz = reshape (repmat (z(:).', lenx*leny, 1)(:), leny, lenx, lenz); + else + error ("meshgrid: arguments must be vectors"); + endif else - usage ("[xx, yy] = meshgrid (x, y)"); + usage ("[xx, yy, zz] = meshgrid (x, y, z)"); endif endfunction
--- a/scripts/signal/freqz.m +++ b/scripts/signal/freqz.m @@ -14,8 +14,8 @@ ## ## You should have received a copy of the GNU General Public License ## along with Octave; see the file COPYING. If not, write to the Free -## Software Foundation, 59 Temple Place - Suite 330, Boston, MA -## 02111-1307, USA. +## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +## 02110-1301, USA. ## -*- texinfo -*- ## @deftypefn {Function File} {[@var{h}, @var{w}] =} freqz (@var{b}, @var{a}, @var{n}, "whole")