Home > freetb4matlab > plot > contourc.m

contourc

PURPOSE ^

% Compute isolines (contour lines) of the matrix @var{z}.

SYNOPSIS ^

function [cout, lev] = contourc (varargin)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {[@var{c}, @var{lev}] =}  contourc (@var{x}, @var{y}, @var{z}, @var{vn})
% Compute isolines (contour lines) of the matrix @var{z}. 
% Parameters @var{x}, @var{y} and @var{vn} are optional.
%
% The return value @var{lev} is a vector of the contour levels.
% The return value @var{c} is a 2 by @var{n} matrix containing the
% contour lines in the following format
%
% @example
% @group
% @var{c} = [lev1, x1, x2, @dots{}, levn, x1, x2, @dots{} 
%      len1, y1, y2, @dots{}, lenn, y1, y2, @dots{}]
% @end group
% @end example
%
% @noindent
% in which contour line @var{n} has a level (height) of @var{levn} and
% length of @var{lenn}.
% 
% If @var{x} and @var{y} are omitted they are taken as the row/column 
% index of @var{z}.  @var{vn} is either a scalar denoting the number of lines 
% to compute or a vector containing the values of the lines.  If only one 
% value is wanted, set @code{@var{vn} = [val, val]};
% If @var{vn} is omitted it defaults to 10.
%
% For example,
% @example
% @group
% x = 0:2;
% y = x;
% z = x' * y;
% contourc (x, y, z, 2:3)
%      @result{}   2.0000   2.0000   1.0000   3.0000   1.5000   2.0000
%      2.0000   1.0000   2.0000   2.0000   2.0000   1.5000
%
% @end group
% @end example
% @seealso{contour}
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003