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.m26 chars2 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, andK is the residue at infinity (if any).Here's an example of how to use the residue function in MATLAB:
main.m53 chars4 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!
gistlibby LogSnag