Thread Subject: partial fraction expansion

Subject: partial fraction expansion

From: Dar'ya

Date: 2 Jul, 2009 00:14:02

Message: 1 of 2

Hello,

I am trying to do partial fraction expansion.

Here is what I input:

syms z Om f h b c d g

num=[z*Om, z*Om*f, z*Om*h];

den=[1, b+f, h+b*f+c+Om^2, b*h+c*f+Om^2*f+Om^2*b, c*h-d*g+Om^2*h+Om^2*b*f+Om^2*c, Om^2*b*h+Om^2*c*f, Om^2*c*h-Om^2*d*g];

[r,p,k]=residue(num,den)


Here I get the error:

??? Error using ==> zeros
Trailing string input must be avalid numeric class name.

Does anyone have a suggestion?

Thanks,

Dasha

Subject: partial fraction expansion

From: Sadik

Date: 2 Jul, 2009 02:00:03

Message: 2 of 2

Hi Dasha,

The problem is that, in the rest of the error message, it says:

Error in ==> roots at 23
r = zeros(0,1,class(c));

Error in ==> residue at 89
r = roots(v);

I typed

dbstop if error

before running your code again, and I found out at the site of error that class(c) is sym rather than a numeric class like double. So you will need to substitute values for the symbols. The residue function does not seem to accept symbolic expressions like that.

Hope this helps.


"Dar'ya " <dkc8r4REMOVE_THIS@missouri.edu> wrote in message <h2gu4a$ao6$1@fred.mathworks.com>...
> Hello,
>
> I am trying to do partial fraction expansion.
>
> Here is what I input:
>
> syms z Om f h b c d g
>
> num=[z*Om, z*Om*f, z*Om*h];
>
> den=[1, b+f, h+b*f+c+Om^2, b*h+c*f+Om^2*f+Om^2*b, c*h-d*g+Om^2*h+Om^2*b*f+Om^2*c, Om^2*b*h+Om^2*c*f, Om^2*c*h-Om^2*d*g];
>
> [r,p,k]=residue(num,den)
>
>
> Here I get the error:
>
> ??? Error using ==> zeros
> Trailing string input must be avalid numeric class name.
>
> Does anyone have a suggestion?
>
> Thanks,
>
> Dasha

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
partial fractio... Dar'ya 1 Jul, 2009 20:19:02
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com