Mercurial > octave-antonio
diff scripts/sparse/gplot.m @ 11471:994e2a93a8e2
Use uppercase 'A' to refer to matrix inputs in m-files.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sun, 09 Jan 2011 16:01:05 -0800 |
parents | be55736a0783 |
children | fd0a3ac60b0e |
line wrap: on
line diff
--- a/scripts/sparse/gplot.m Sun Jan 09 13:44:15 2011 -0800 +++ b/scripts/sparse/gplot.m Sun Jan 09 16:01:05 2011 -0800 @@ -17,9 +17,9 @@ ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} {} gplot (@var{a}, @var{xy}) -## @deftypefnx {Function File} {} gplot (@var{a}, @var{xy}, @var{line_style}) -## @deftypefnx {Function File} {[@var{x}, @var{y}] =} gplot (@var{a}, @var{xy}) +## @deftypefn {Function File} {} gplot (@var{A}, @var{xy}) +## @deftypefnx {Function File} {} gplot (@var{A}, @var{xy}, @var{line_style}) +## @deftypefnx {Function File} {[@var{x}, @var{y}] =} gplot (@var{A}, @var{xy}) ## Plot a graph defined by @var{A} and @var{xy} in the graph theory ## sense. @var{A} is the adjacency matrix of the array to be plotted ## and @var{xy} is an @var{n}-by-2 matrix containing the coordinates of @@ -32,7 +32,7 @@ ## @seealso{treeplot, etreeplot, spy} ## @end deftypefn -function [x, y] = gplot (a, xy, line_style) +function [x, y] = gplot (A, xy, line_style) if (nargin < 2 || nargin > 3 || nargout > 2) print_usage (); @@ -42,7 +42,7 @@ line_style = "-"; endif - [i, j] = find (a); + [i, j] = find (A); xcoord = [xy(i,1), xy(j,1), NaN(length(i),1) ]'(:); ycoord = [xy(i,2), xy(j,2), NaN(length(i),1) ]'(:);