%% Expansion with Numerator Degree Greater Than Denominator Degree
% When the degree of the numerator is greater than the degree of the denominator, the output k is a vector that represents the coefficients of a polynomial in s.
% Perform the following partial fraction expansion of F(s) using residue.
% F(s) = \frac{b(s)}{a(s)} = \frac{2s^4+s}{s^2+1} = \frac{0.5-1i}{s-1i} + \frac{0.5+1i}{s+1i} + 2s^2-2.

b = [2 0 0 1 0];
a = [1 0 1];
[r,p,k] = residue(b,a)

% k represents the polynomial 2s^2-2.
% Copyright 2015 The MathWorks, Inc.