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.

 채택된 답변

Birdman
Birdman 2017년 12월 15일

0 개 추천

P=vpa(P,3)

댓글 수: 5

pravin behera
pravin behera 2017년 12월 15일
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 2017년 12월 15일
편집: Birdman 2017년 12월 15일
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 2017년 12월 15일
it works for polynomials, but for matrix polynomials it doesnt. Is there any simple way ?
Birdman
Birdman 2017년 12월 15일
I do not know. You may open a new question about it in forum.
pravin behera
pravin behera 2017년 12월 15일
thanks.. your answer helped a lot

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Polynomials에 대해 자세히 알아보기

제품

질문:

2017년 12월 15일

댓글:

2017년 12월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by