Mercurial > hg > octave-lyh
diff scripts/plot/surfc.m @ 12812:4c93cc41da15 stable
codesprint: add demo for surf.m and surfc.m
author | Kai Habel <kai.habel@gmx.de> |
---|---|
date | Sat, 16 Jul 2011 20:56:20 +0200 |
parents | b0084095098e |
children | b00181c65533 |
line wrap: on
line diff
--- a/scripts/plot/surfc.m +++ b/scripts/plot/surfc.m @@ -54,3 +54,20 @@ endif endfunction + +%!demo +%! clf +%! [~,~,Z]=peaks; +%! surfc(Z); + +%!demo +%! [~,~,Z]=sombrero; +%! [Fx,Fy] = gradient(Z); +%! surfc(Z,Fx+Fy); +%! shading interp; + +%!demo +%! [X,Y,Z]=sombrero; +%! [~,Fy] = gradient(Z); +%! surfc(X,Y,Z,Fy); +%! shading interp;