Mercurial > octave-nkf
comparison scripts/general/cart2pol.m @ 6157:045038e0108a
[project @ 2006-11-13 22:22:53 by jwe]
author | jwe |
---|---|
date | Mon, 13 Nov 2006 22:22:54 +0000 |
parents | 2618a0750ae6 |
children | bb5958d3510a |
comparison
equal
deleted
inserted
replaced
6156:a46f14cdbecd | 6157:045038e0108a |
---|---|
39 if (nargin == 2 && nargout > 2) | 39 if (nargin == 2 && nargout > 2) |
40 error ("cart2pol: number of output arguments must not be greater than number of input arguments"); | 40 error ("cart2pol: number of output arguments must not be greater than number of input arguments"); |
41 endif | 41 endif |
42 | 42 |
43 if ((! (ismatrix (X) && ismatrix (Y))) | 43 if ((! (ismatrix (X) && ismatrix (Y))) |
44 || (size (X) != size (Y)) | 44 || (! size_equal (X, Y)) |
45 || (nargin == 3 && (! (size (X) == size (Z) && ismatrix (Z))))) | 45 || (nargin == 3 && (! (size (X) == size (Z) && ismatrix (Z))))) |
46 error ("cart2pol: arguments must be matrices of same size"); | 46 error ("cart2pol: arguments must be matrices of same size"); |
47 endif | 47 endif |
48 | 48 |
49 Theta = atan2 (Y, X); | 49 Theta = atan2 (Y, X); |