Previous Up Next

2.24.1  Convert to a symbolic polynomial : r2e poly2symb

r2e or poly2symb takes as argument

r2e or poly2symb transforms the argument into a symbolic polynomial.
Example with univariate polynomials, input :

r2e([1,0,-1],x)

or :

r2e([1,0,-1])

or :

poly2symb([1,0,-1],x)

Output :

x*x-1

Example with sparse multivariate polynomials, input:

poly2symb(%%%{1,[2]%%%}+%%%{-1,[0]%%%},[x])

or :

r2e(%%%{1,[2]%%%}+%%%{-1,[0]%%%},[x])

Output :

x^2-1

Input :

r2e(%%%{1,[2,0]%%%}+%%%{-1,[1,1]%%%}+%%%{2,[0,1]%%%},[x,y])

or :

poly2symb(%%%{1,[2,0]%%%}+%%%{-1,[1,1]%%%}+%%%{2,[0,1]%%%},[x,y])

Output :

x^2-x*y+2*y

Previous Up Next