Functions | |
endif | if (nargin==3) triplot(tri |
elseif (ischar(z)) triplot(tri | |
else | if (nargin > 4 &&isnumeric(varargin{1})) c |
varargin (1) | |
endif | newplot () |
if (nargout > 0) h | |
else | patch ("Faces", tri,"Vertices",[x(:), y(:), z(:)],"FaceVertexCData", reshape(c, numel(c), 1),"FaceColor","flat","EdgeColor","none", varargin{:}) |
endif | if (!ishold()) set(gca() |
!rand ('state', 10)%!x | |
!trisurf (tri, x(:), y(:), z(:)) | |
Variables | |
function | h |
endif | x |
endif | y |
z | |
else | c = z |
endif | view |
endif | xgrid |
endif | on |
endif | ygrid |
endif | zgrid |
endif endif endfunction!demo | !N = 10 |
!y = 3 - 6 * rand (N, N) | |
!z = peaks (x, y) | |
!tri = delaunay (x(:), y(:)) |
!rand | ( | 'state' | , | |
10 | ||||
) |
!trisurf | ( | tri | , | |
x(:) | , | |||
y(:) | , | |||
z(:) | ||||
) |
elseif | ( | ischar(z) | ) |
endif if | ( | ! | ishold() | ) |
if | ( | nargout | , | |
0 | ||||
) |
endif newplot | ( | ) |
else patch | ( | "Faces" | , | |
tri | , | |||
"Vertices" | , | |||
"FaceVertexCData" | , | |||
reshape(c, numel(c), 1) | , | |||
"FaceColor" | , | |||
"flat" | , | |||
"EdgeColor" | , | |||
"none" | ||||
) |
varargin | ( | 1 | ) |
endif endif endfunction !demo !N = 10 |
!tri = delaunay (x(:), y(:)) |
!y = 3 - 6 * rand (N, N) |
!z = peaks (x, y) |
else c = z |
endif view |
x |
y |
z |