Home > Blockchain >  Error Using Residue: Too Many output arguments
Error Using Residue: Too Many output arguments

Time:11-06

[r, p, k] = residue([1, -14],[1,-1,-2] );

Running the above gives me the correct output.

[a,b,c,d] = residue([2 -16 40 -42], [1 -11 39 -45]);

Running the above gives me Error using residue Too many output arguments.

Can somebody explain why the first function works but the second function gives me an error?

Thanks!

CodePudding user response:

I realize what the problem was. You have to put your output in the form [r, p, k] = residue(a, b).

The answer is in the form:

b = [2 -16 40 -42]; a = [1 -11 39 -45]; [r, p, k] = residue(b,a);

  • Related