How to approximate polynomial?

P =((8700286382685963*x1)/9007199254740992 - (4662469420320393*x2)/18014398509481984)^2 + ((2331234710160197*x1)/9007199254740992 - (8700286382685971*x2)/9007199254740992)^2
I have a polynomial P, i want to get an expression in which this expression is approximated to 2 digits after decimal.

 Respuesta aceptada

Birdman
Birdman el 15 de Dic. de 2017

0 votos

P=vpa(P,3)

5 comentarios

pravin behera
pravin behera el 15 de Dic. de 2017
but still here it shows the terms for which the coefficients is 1e-13. I want to remove those having very less value
Birdman
Birdman el 15 de Dic. de 2017
Editada: Birdman el 15 de Dic. de 2017
syms x
P=135135123123*x^2/3423423652357654754635+3*x+5
P=double(sym2poly(P));
i=1:numel(P)-1;
ind=[find(P(i)>=1e-4) numel(P)];
P=poly2sym(P(ind))
This is an approach.
pravin behera
pravin behera el 15 de Dic. de 2017
it works for polynomials, but for matrix polynomials it doesnt. Is there any simple way ?
Birdman
Birdman el 15 de Dic. de 2017
I do not know. You may open a new question about it in forum.
pravin behera
pravin behera el 15 de Dic. de 2017
thanks.. your answer helped a lot

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Polynomials en Centro de ayuda y File Exchange.

Productos

Etiquetas

Preguntada:

el 15 de Dic. de 2017

Comentada:

el 15 de Dic. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by