is it possible to multiply 2 symbolic polynomials?

55 visualizaciones (últimos 30 días)
ali temsah
ali temsah el 12 de Mayo de 2022
Comentada: Star Strider el 13 de Mayo de 2022
for example if i have
f=[34 43 5]
%and
h=[32 34 4]
% i can use the (conv command) and obtain the resultant polynomial
fh=conv(f,h)
%what about
fsym=poly2sym(f)
%and
hsym=poly2sym(h)
is there any way i can multiply them ?

Respuesta aceptada

Star Strider
Star Strider el 12 de Mayo de 2022
The easiest way to find out is to do the experiment —
syms x
f=[34 43 5]
f = 1×3
34 43 5
%and
h=[32 34 4]
h = 1×3
32 34 4
% i can use the (conv command) and obtain the resultant polynomial
fh=conv(f,h)
fh = 1×5
1088 2532 1758 342 20
%what about
fsym=poly2sym(f,x)
fsym = 
%and
hsym=poly2sym(h,x)
hsym = 
polyprod = fsym * hsym
polyprod = 
polyprod = expand(polyprod)
polyprod = 
polyprod = simplify(polyprod,500)
polyprod = 
.
  2 comentarios
ali temsah
ali temsah el 13 de Mayo de 2022
thank you so much
Star Strider
Star Strider el 13 de Mayo de 2022
As always, my pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Polynomials en Help Center y File Exchange.

Productos


Versión

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by