|
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
|