fork download
  1. @(p,q)poly([roots(p);roots(q)])*p(1)*q(1)
  2.  
  3. ans([1,1], [1,4,6,4,1])
Success #stdin #stdout 0.7s 121792KB
stdin
Standard input is empty
stdout
ans =

@(p, q) poly ([roots(p); roots(q)]) * p (1) * q (1)

ans =

 Columns 1 through 3:

   1.00000 + 0.00000i   5.00000 + 0.00000i  10.00000 - 0.00000i

 Columns 4 through 6:

  10.00000 - 0.00000i   5.00000 - 0.00000i   1.00000 + 0.00000i