[scilab-Users] Help with rtitr error in Scilab

Nick Othieno nickothieno at gmail.com
Wed Dec 3 13:03:29 CET 2008


Thanks. It works

On Wed, Dec 3, 2008 at 1:07 PM, Habib Jreige <habib.jreige at scilab.org>wrote:

>  In your example the first two arguments should be polynomial not a scalar
> vectors.
>
> try this :
> After : h=L*firpm(60,[0 2/(fs_in*L) 4/(fs_in*L) 0.5]*2,[1 1 0 0],[1 1]);
> hp=poly(h,'x','coeffs');
> 1p=poly(1,'x','coeffs');
>
> Then : x_ef=rtitr(hp,1p,x_e);
>
>
>
>
>  ------------------------------
> *De :* Nick Othieno [mailto:nickothieno at gmail.com]
> *Envoyé :* mercredi 3 décembre 2008 07:14
> *À :* users at lists.scilab.org
> *Objet :* [scilab-Users] Help with rtitr error in Scilab
>
> Hi guys,
>
> I am trying to run the following code in scilab:
>
>
> L=3; M=2; fs_in=6; Ts_in=1/fs_in;
> t_in=[0:Ts_in:5];x_in=sin(2*% pi*t_in)+2*cos(4*%pi*t_in);
> getf("spfsr.sci");
> getf("firpm.sci");
> x_e=expander(x_in,L);
> t_cont=[0:0.01:5]; x_cont=sin(2*%pi*t_cont)+2*cos(4*%pi*t_cont);
> h=L*firpm(60,[0 2/(fs_in*L) 4/(fs_in*L) 0.5]*2,[1 1 0 0],[1 1]);
> x_ef=rtitr(h,1,x_e);
>
> but I get the following error:
>
>
> -->x_ef=rtitr(h,1,x_e);
>                            !--error 60
> argument with incompatible dimensions
>
>
> The values in x_e are:
>
> -->x_e
>  x_e  =
>
>
>          column  1 to 14
>
>     2.    0.    0.  - 0.1339746    0.    0.  - 0.1339746    0.    0.
> 2.    0.    0.  - 1.8660254    0.
>
>          column 15 to 28
>
>     0.  - 1.8660254    0.    0.    2.    0.    0.  - 0.1339746    0.    0.
> - 0.1339746    0.    0.    2.
>
>          column 29 to 42
>
>     0.    0.  - 1.8660254    0.    0.  - 1.8660254    0.    0.    2.
> 0.    0.  - 0.1339746    0.    0.
>
>          column 43 to 56
>
>   - 0.1339746    0.    0.    2.    0.    0.  - 1.8660254    0.    0.  -
> 1.8660254    0.    0.    2.    0.
>
>          column 57 to 69
>
>     0.  - 0.1339746    0.    0.  - 0.1339746    0.    0.    2.    0.    0.
> - 1.8660254    0.    0.
>
>          column 70 to 83
>
>   - 1.8660254    0.    0.    2.    0.    0.  - 0.1339746    0.    0.  -
> 0.1339746    0.    0.    2.    0.
>
>          column 84 to 93
>
>     0.  - 1.8660254    0.    0.  - 1.8660254    0.    0.    2.    0.    0.
>
>
>
> and values in h are:
>
> -->h
>  h  =
>
>
>          column 1 to 8
>
>   - 0.0000037  - 0.0000535  - 0.0000966    0.0000195    0.0003521
> 0.0005352  - 0.0000530  - 0.0013496
>
>          column  9 to 16
>
>   - 0.0018804    0.0001157    0.0039041    0.0051475  - 0.0002160  -
> 0.0094187  - 0.0119515    0.0003552
>
>          column 17 to 24
>
>     0.0200286    0.0247607  - 0.0005242  - 0.0391450  - 0.0477507
> 0.0007027    0.0736679    0.0904745
>
>          column 25 to 32
>
>   - 0.0008623  - 0.1452481  - 0.1894378    0.0009731    0.4053300
> 0.8221257    0.9989871    0.8221257
>
>          column 33 to 40
>
>     0.4053300    0.0009731  - 0.1894378  - 0.1452481  - 0.0008623
> 0.0904745    0.0736679    0.0007027
>
>          column 41 to 48
>
>   - 0.0477507  - 0.0391450  - 0.0005242    0.0247607    0.0200286
> 0.0003552  - 0.0119515  - 0.0094187
>
>          column 49 to 56
>
>   - 0.0002160    0.0051475    0.0039041    0.0001157  - 0.0018804  -
> 0.0013496  - 0.0000530    0.0005352
>
>          column 57 to 61
>
>     0.0003521    0.0000195  - 0.0000966  - 0.0000535  - 0.0000037
>
>
> Does anyone have any idea as to why rtitr is giving me the error?
>
>
> -->x_ef=rtitr(h,1,x_e);
>                            !--error 60
> argument with incompatible dimensions
>
>
>
> Regards,
>
> Nick
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20081203/ac9d1352/attachment.htm>


More information about the users mailing list