manually coding partial fractions

조회 수: 1 (최근 30일)
callum linnegan
callum linnegan 2020년 4월 24일
답변: Star Strider 2020년 4월 24일
Hi i was wondering if there is a way to maunually code partial fractions, i want to be able time the LHS denominator to the RHS and then group the values in terms of x^3,x^2 and x.
This is the question i am trying to solve.
I have done the first part by hand and used matlab to check my answer but i cant find a way to group the terms.
If anyone could help or direct me in the right direction it would be much Appreciated.
syms A1 A2 A3 A4
eqn1 = 2*A1 + A4 == 3;
eqn2 = A3 - 2*A4 == -2;
eqn3 = -A1 -2*A3 + A4 == -3;
eqn4 = -A1 + A3 ==2;
[M,B] = equationsToMatrix([eqn1,eqn2,eqn3,eqn4],[A1,A2,A3,A4])
X = linsolve(M,B)

답변 (1개)

Star Strider
Star Strider 2020년 4월 24일
The Symbolic Math Toolbox partfrac function (introduced in R2015a) will do exactly what you want:
syms x
Eq = (2*x^5 -2*x^4 + 2*x^3 + 3) / (2*x^4 - 2*x^3 - x^2 + 1);
Eqpf = partfrac(Eq, x)
Eqpf = vpa(Eqpf)
producing:

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by