Search code examples
scilabpolynomials

Multiplication of polynomials of two different variables in Scilab


Is there any specific method available to multiply two polynomials of different variable in Scilab? Because when I do multiplication in Scilab the result is coming only with one variable.

x = poly(0, "x");
y = poly(0, "y");

m1 = 1+x^2+x^3;
m2 = y;

p = m1*m2;

Result:  p  = 

   3   4
x +x  +x 

Solution

  • Scilab only supports polynomials of one variable. Since there is no concept of a polynomial of two variables, the multiplication m1*m2 should really throw an error, it appears to be an oversight if it doesn't.

    If you need to manipulate multivariable polynomials, Scilab is not the right tool to use. Consider SymPy.