poly2str
Converts multivariate polynomials from arrays to strings.
Syntax
strcell = poly2str(Pset, varnames)
Description
strcell = poly2str(Pset, varnames) follows Ben Petschel (2010) algorithm
Input
Pset = cell array of polynomial coefficients where row j of Pset{i}
is [c, k1, k2, ...] representing the monomial c*x1^k1*x2^k2*...
varnames = cell array of strings of length at least the maximum
dimension of the arrays in Pset [default: {'x1', 'x2', ...}].
Output
strcell: cell array of strings, one per polynomial.
Example
poly2str({[1, 1, 2]})
returns
{'x1*x2^2'}
poly2str({[1 3;3 4;1 5]}, {'t'})
returns
{'t^5+3*t^4+t^3'}
See also
reorg2vec and str2poly.
strcell = poly2str(Pset, varnames) follows Ben Petschel (2010) algorithm
Input
Pset = cell array of polynomial coefficients where row j of Pset{i}
is [c, k1, k2, ...] representing the monomial c*x1^k1*x2^k2*...
varnames = cell array of strings of length at least the maximum
dimension of the arrays in Pset [default: {'x1', 'x2', ...}].
Output
strcell: cell array of strings, one per polynomial.
Example
poly2str({[1, 1, 2]})
returns
{'x1*x2^2'}
poly2str({[1 3;3 4;1 5]}, {'t'})
returns
{'t^5+3*t^4+t^3'}
See also
reorg2vec and str2poly.
strcell: cell array of strings, one per polynomial.
Example
poly2str({[1, 1, 2]})
returns
{'x1*x2^2'}
poly2str({[1 3;3 4;1 5]}, {'t'})
returns
{'t^5+3*t^4+t^3'}
See also
reorg2vec and str2poly.
reorg2vec and str2poly.