I have this math problem in which I am trying to expand a rational function of the form into something that looks like this:
where the numerators and p are constants. To take an example, I have the following function and when I tried to expand this manually, I found this result:
Now, that was a relatively easy example and I may need MATLAB in order to quicken my calculations when I deal with higher order denominators and the function residue() allows that. In the console, I tried this:
>>N = [2];>>D = [1 12 36 0];>>[r p y] = residue(N,D)r =-0-0556-0.33330.0556p=-6-60y=[]
Now, the solution found by residue() certainly agrees with the one I found manually, but I need exact not numerical solutions with decimal points. I was searching on the forum before asking my question, then found this thread. Basically, it suggests to use symbolic arithmetic with the sym command.
Therefore, I tried to proceed as such but the residue() command only accepts inputs which are floats. Here is the error message I received:
Best Answer