Mercurial > octave
comparison scripts/plot/mesh.m @ 1611:b1b68110d125
[project @ 1995-11-03 06:38:41 by jwe]
author | jwe |
---|---|
date | Fri, 03 Nov 1995 06:38:41 +0000 |
parents | 84bd88b8acee |
children | 26a5b528968c |
comparison
equal
deleted
inserted
replaced
1610:26a096727e89 | 1611:b1b68110d125 |
---|---|
38 endif | 38 endif |
39 elseif (nargin == 3) | 39 elseif (nargin == 3) |
40 if (is_vector (x) && is_vector (y) && is_matrix (z)) | 40 if (is_vector (x) && is_vector (y) && is_matrix (z)) |
41 xlen = length (x); | 41 xlen = length (x); |
42 ylen = length (y); | 42 ylen = length (y); |
43 if (xlen == rows (z) && ylen == columns (z)) | 43 if (ylen == rows (z) && xlen == columns (z)) |
44 if (rows (x) == 1) | 44 if (rows (x) == 1) |
45 x = x'; | 45 x = x'; |
46 endif | 46 endif |
47 len = 3 * ylen; | 47 len = 3 * ylen; |
48 zz = zeros (xlen, ylen); | 48 zz = zeros (xlen, ylen); |
59 set nocontour; | 59 set nocontour; |
60 set parametric; | 60 set parametric; |
61 set view 60, 30, 1, 1; | 61 set view 60, 30, 1, 1; |
62 gsplot (zz); | 62 gsplot (zz); |
63 else | 63 else |
64 msg = "mesh: rows (z) must be the same as length (x) and"; | 64 msg = "mesh: rows (z) must be the same as length (y) and"; |
65 msg = sprintf ("%s\ncolumns (z) must be the same as length (y)", msg); | 65 msg = sprintf ("%s\ncolumns (z) must be the same as length (x)", msg); |
66 error (msg); | 66 error (msg); |
67 endif | 67 endif |
68 else | 68 else |
69 error ("mesh: x and y must be vectors and z must be a matrix"); | 69 error ("mesh: x and y must be vectors and z must be a matrix"); |
70 endif | 70 endif |