⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 p9_15.dir

📁 Programs for the book Advanced Engineering Mathematics using MATLAB, 2ndEd.
💻 DIR
字号:
% Diary file pfe.dir  3/6/97
help pfe
  PFE.M
   Partial fraction expansion of polynomial P/Q
  CALL: [K,S,p]= pfe
  INPUTS:  From Keyboard as array [a0 a1 ... an]
 	   P Numerator polyomial coefficients in decending order
           Q Denominator polynomial coefficients in decending order
  OUTPUTS: K Column vector of coefficients
           S Column vector of roots of the denominator
           p Coefficients of polynomial if P/Q is not proper fraction	al


% Problem 9_15 a 
% Use conv to multiply polynomials
pt=[1 2]          %(s+2)
pt =
     1     2
pt1=conv(pt,pt)
pt1 =
     1     4     4
pt2=conv(pt1,pt)
pt2 =

     1     6    12     8              %  % (s+1)^3

% Multiply p1,p2 and p3               |
p11=conv(p1,p2)
p11 =

     1     1

p=conv(p11,p3)
p =

     1     7    18    20     8

% Then multiply by s   ie [1 7 18 20 8 0] coefficients          
[K2,S2,p2] = pfe
Coefficients of numerator in decending order = [1 3] 
P =
     1     3

Coefficients of denominator in decending order = [1 7 18 20 8 0] 
Q =

     1     7    18    20     8     0

K2 =
    1.6250    13/8
    1.2500
    0.5000
   -2.0000
    0.3750    3/8

S2 =
   -2.0000
   -2.0000
   -2.0000
   -1.0000
         0

p2 =     []

diary off% P9_15b

[K5,S5,P5] = pfe


Coefficients of numerator in decending order = [1 1 1] 
P =

     1     1     1

Coefficients of denominator in decending order = [1 2 2 0] 
Q =
     1     2     2     0

K5 =

   0.2500 + 0.2500i
   0.2500 - 0.2500i
   0.5000          

S5 =
  -1.0000 + 1.0000i
  -1.0000 - 1.0000i
        0          
P5 =

     []

diary off

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -