struggling to translate matlab commands to scilab

classic Classic list List threaded Threaded
1 message Options
wernher korff wernher korff
Reply | Threaded
Open this post in threaded view
|

struggling to translate matlab commands to scilab

hi there,

i'm new to scilab and have been using matlab for a while, i have the
following code in matlab:

------------------------------------

numf = [7 9 12]
denf = conv(poly([0 -7]), [1 10 100])
[K, p, k] = residue(numf, denf);

------------------------------------

and translated it to scilab as:

------------------------------------

numf = [7 9 12]
denf = convol([0 -7], [1 10 100])
denf = poly(denf, "s", "coeff")

------------------------------------

[K, p, k] = residu(numf, denf)

when running this code i get the error message :

[K, p, k] = residu(numf, denf)
                                   !--error 39
Incorrect number of input arguments.

at line       9 of exec file called by :    
exec("/tmp/SD_11581_/ch2p7.sce");
while executing a callback

can someone help me out to get the scilab code to do what the matlab
code does, that is: find the residue, poles and constants.

thanks,
Wernher