determine residues in matlab

To determine residues in MATLAB, you can use the residue function. This function calculates the partial fraction decomposition of a given system representation.

The syntax of the residue function is:

main.m
[R, P, K] = residue(b, a)
26 chars
2 lines

where:

  • b is an array representing the polynomial coefficients of the numerator of the transfer function,
  • a is an array representing the polynomial coefficients of the denominator of the transfer function,
  • R is the vector of residues,
  • P is the vector of poles, and
  • K is the residue at infinity (if any).

Here's an example of how to use the residue function in MATLAB:

main.m
b = [1 4 4];
a = [1 3 2];
[R, P, K] = residue(b, a);
53 chars
4 lines

In this example, b represents the numerator coefficients [1 4 4], and a represents the denominator coefficients [1 3 2]. The residue function returns R = [-2 -1], P = [-1 -2], and K = [].

The vector R contains the residues corresponding to each pole in vector P.

Remember to provide the coefficients in descending order of powers.

I hope this helps!

related categories

gistlibby LogSnag