Home > freetb4matlab > symbolic > poly2sym.m

poly2sym

PURPOSE ^

% Creates a symbolic polynomial expression @var{p} with coefficients @var{c}.

SYNOPSIS ^

function p = poly2sym(c,x)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {} @var{p} = poly2sym (@var{c}, @var{x})
% Creates a symbolic polynomial expression @var{p} with coefficients @var{c}.
% If @var{p} is not specified, the free variable is set to sym('x'). @var{c}
% may be a vector or a list/cell-array of symbols. @var{x} may be a symbolic
% expression or a string.
% The coefficients correspond to decreasing exponent of the free variable.
%
% Example:
% @example
% symbols
% x=sym('x'); y=sym('y');
% p = poly2sym ([2,5,-3]);         % p = 2*x^2+5*x-3
% c = poly2sym (list(2*y,5,-3),x); % p = 2*y*x^2+5*x-3
% @end example
%
% @end deftypefn
% @seealso{sym2poly,polyval,roots}

CROSS-REFERENCE INFORMATION ^

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