Error using built-in residue function
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Upon generating the code below I get an error which points to a line of code within the function .M file:
{START CODE} den1=conv([1 4],[1 4])
den1 =
1 8 16
EDU>> den2=conv([1 4],[1 4])
den2 =
1 8 16
EDU>> den3=conv(den1,den2)
den3 =
1 16 96 256 256
EDU>> den=conv(den3,[1 1])
den =
1 17 112 352 512 256
EDU>> num = [0 5]
num =
0 5
EDU>> [res, pole, rem] = residue(num, den) ??? Error using ==> poly Too many output arguments.
Error in ==> residue at 128 v = poly(p); {END CODE}
Sometimes when I run the code with different vectors stored as "num" & "den" the error points to line 139, which I presume to be a result of the roots its testing for.
I'm running MATLAB R2011a on a Mac OSX 10.8 (Mountain Lion). I've even tested a classmates script .M file, which worked just fine on his computer; however, I ran into the same issue when I ran his script on my machine. Here's that script:
{START CODE} num = [5]; den1 = [1 4]; den2 = [1 4]; d1d2 = conv(den1,den2); den3 = [1,1]; dentotal = conv(d1d2,den3);
[r,p,k]=residue(num,dentotal) {END CODE}
Any ideas? Thanks. Kaleb
0 commentaires
Réponse acceptée
Walter Roberson
le 11 Fév 2013
Please use
which -all poly
to find out whether you have a poly.m that is overriding the expected poly function.
1 commentaire
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!