Thanks. It works<br><br><div class="gmail_quote">On Wed, Dec 3, 2008 at 1:07 PM, Habib Jreige <span dir="ltr"><<a href="mailto:habib.jreige@scilab.org">habib.jreige@scilab.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">In your example the first two arguments should be
polynomial not a scalar vectors.</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">try this :</font></span></div>
<div dir="ltr" align="left"><span><font face="Arial" size="2"><font color="#0000ff" face="Times New Roman" size="3">After : h=L*firpm(60,[0
2/(fs_in*L) 4/(fs_in*L) 0.5]*2,[1 1 0 0],[1 1]);</font></font></span></div>
<div dir="ltr" align="left"><span><font face="Arial" size="2"><font color="#0000ff" face="Times New Roman" size="3">hp=poly(h,'x','coeffs');</font></font></span></div>
<div dir="ltr" align="left"><span><font face="Arial" size="2"><font color="#0000ff" face="Times New Roman" size="3">1p=poly(1,'x','coeffs');</font></font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff">Then
: x_ef=rtitr(hp,1p,x_e);<br></font></span></div>
<div dir="ltr" align="left"><span></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"><font color="#000000" face="Times New Roman" size="3"></font><br> </font></span></div><br>
<div dir="ltr" align="left" lang="fr">
<hr>
<font face="Tahoma" size="2"><b>De :</b> Nick Othieno
[mailto:<a href="mailto:nickothieno@gmail.com" target="_blank">nickothieno@gmail.com</a>] <br><b>Envoyé :</b> mercredi 3 décembre 2008
07:14<br><b>À :</b> <a href="mailto:users@lists.scilab.org" target="_blank">users@lists.scilab.org</a><br><b>Objet :</b>
[scilab-Users] Help with rtitr error in Scilab<br></font><br></div><div><div></div><div class="Wj3C7c">
<div></div>Hi guys,<br><br>I am trying to run the following code in
scilab:<br><br><br>L=3; M=2; fs_in=6;
Ts_in=1/fs_in;<br>t_in=[0:Ts_in:5];x_in=sin(2*%
<div class="gmail_quote">pi*t_in)+2*cos(4*%pi*t_in);<br>getf("spfsr.sci");<br>getf("firpm.sci");<br>x_e=expander(x_in,L);<br>t_cont=[0:0.01:5];
x_cont=sin(2*%pi*t_cont)+2*cos(4*%pi*t_cont);<br>h=L*firpm(60,[0 2/(fs_in*L)
4/(fs_in*L) 0.5]*2,[1 1 0 0],[1 1]);<br>x_ef=rtitr(h,1,x_e);<br><br>but I get
the following
error:<br><br><br>-->x_ef=rtitr(h,1,x_e);<br>
!--error 60<br>argument with incompatible dimensions <br><br><br>The values in
x_e are:<br><br>-->x_e<br> x_e
=<br><br><br> column 1 to
14<br><br> 2. 0. 0.
- 0.1339746 0. 0. -
0.1339746 0. 0.
2. 0. 0. - 1.8660254
0.<br><br> column 15 to
28<br><br> 0. - 1.8660254
0. 0. 2.
0. 0. - 0.1339746 0.
0. - 0.1339746 0. 0.
2.<br><br> column 29 to
42<br><br> 0. 0. -
1.8660254 0. 0. -
1.8660254 0. 0.
2. 0. 0. - 0.1339746
0. 0.<br><br>
column 43 to 56<br><br> - 0.1339746 0.
0. 2. 0. 0. -
1.8660254 0. 0. -
1.8660254 0. 0.
2. 0.<br><br>
column 57 to 69<br><br> 0. - 0.1339746
0. 0. - 0.1339746 0.
0. 2. 0. 0. -
1.8660254 0.
0.<br><br> column 70 to
83<br><br> - 1.8660254 0.
0. 2. 0. 0. -
0.1339746 0. 0. -
0.1339746 0. 0.
2. 0.<br><br>
column 84 to 93<br><br> 0. - 1.8660254
0. 0. - 1.8660254 0.
0. 2. 0. 0.
<br><br><br><br>and values in h are:<br><br>-->h<br> h
=<br><br><br> column 1 to
8<br><br> - 0.0000037 - 0.0000535 -
0.0000966 0.0000195
0.0003521 0.0005352 - 0.0000530 -
0.0013496<br><br> column 9
to 16<br><br> - 0.0018804 0.0001157
0.0039041 0.0051475 - 0.0002160 - 0.0094187
- 0.0119515
0.0003552<br><br> column 17 to
24<br><br> 0.0200286 0.0247607 -
0.0005242 - 0.0391450 - 0.0477507
0.0007027 0.0736679
0.0904745<br><br> column 25 to
32<br><br> - 0.0008623 - 0.1452481 -
0.1894378 0.0009731
0.4053300 0.8221257
0.9989871
0.8221257<br><br> column 33 to
40<br><br> 0.4053300 0.0009731 -
0.1894378 - 0.1452481 - 0.0008623
0.0904745 0.0736679
0.0007027<br><br> column 41 to
48<br><br> - 0.0477507 - 0.0391450 -
0.0005242 0.0247607
0.0200286 0.0003552 - 0.0119515 -
0.0094187<br><br> column 49 to
56<br><br> - 0.0002160 0.0051475
0.0039041 0.0001157 - 0.0018804 - 0.0013496
- 0.0000530
0.0005352<br><br> column 57 to
61<br><br> 0.0003521 0.0000195 -
0.0000966 - 0.0000535 - 0.0000037 <br><br><br>Does
anyone have any idea as to why rtitr is giving me the
error?<br><br><br>-->x_ef=rtitr(h,1,x_e);<br>
!--error 60<br>argument with incompatible dimensions
<br><br><br><br>Regards,<br><font color="#888888"><br>Nick</font></div></div></div></div>
</blockquote></div><br>