Mercurial > hg > octave-terminal
changeset 13087:71ce008332e2
codesprint: Add demo block to gplot.m
* gplot.m: Add demo block and mark function tested.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sat, 03 Sep 2011 15:23:47 -0700 |
parents | 7015842c6562 |
children | 4ffea87ad71b |
files | scripts/sparse/gplot.m |
diffstat | 1 files changed, 28 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/sparse/gplot.m +++ b/scripts/sparse/gplot.m @@ -54,3 +54,31 @@ endif endfunction + + +%!demo +%! ## Binary Tree Representation +%! A = [0 1 0 0 0 0 0 +%! 1 0 1 1 0 0 0 +%! 0 1 0 0 0 0 0 +%! 0 1 0 0 1 0 0 +%! 0 0 0 1 0 1 1 +%! 0 0 0 0 1 0 0 +%! 0 0 0 0 1 0 0]; +%! +%! xy = [1, 0 +%! 1.5, 1 +%! 2, 0 +%! 2.5, 2 +%! 3.5, 1 +%! 3, 0 +%! 4, 0]; +%! +%! clf; +%! gplot (A, xy, "o-"); +%! set (get (gca, ("children")), "markersize", 12); +%! title ("gplot() of Binary Tree Adjacency matrix"); + +%% Mark graphical function as tested by demo block +%!assert (1); +