Scilabs pdiv gives different result to Matlabs deconv

Discussion in 'Scilab' started by albert stanton, Sep 10, 2004.

  1. Hi,

    I'm converting a Matlab function to Scilab which uses Matlabs deconv
    function, I used Scilabs pdiv function in place of deconv, however I
    get different results. can anyone explain why?

    In Matlab:

    a=[5 23 12 8];
    b=[5 2 7];
    [q,rem]=deconv(a,b)

    q =

    1.00000 4.20000

    rem =

    0.00000 0.00000 -0.34000 -2.14000

    In Scilab:

    z=poly(0,"z")
    a=5+23*z+12*z^2+8*z^3;
    b=5+2*z+7*z^2;
    [rem,q]=pdiv(a,b)

    q=

    1.3877551 + 1.1428571z

    rem =

    - 1.9387755 + 14.510204z


    best regards

    Albert
     
    albert stanton, Sep 10, 2004
    #1
    1. Advertisements

  2. I realise now that polynomials in Matlab are in descending order and
    ascending order in Scilab.

    Anyway, Scilab 3.0 is great.

    Best regards

    Albert
     
    albert stanton, Sep 11, 2004
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.