summaryrefslogtreecommitdiffstats
path: root/tests/nonRegression/bug1180.sci
blob: 47ab94ac892f61959c095e8a2c8a776886de7643 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// <-- Non-regression test for bug 1180 -->
//
// <-- Bugzilla URL -->
// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1180
//
// <-- Short Description -->
//    mtlb_filter lines 
//
//    b=b*z^(max(degree(a)-degree(b),0))
//    a=a*z^(max(degree(b)-degree(a),0))
//
//    should be replaced by :
//
//    da = degree(a)
//    db = degree(b)
//    if (da-db) > 0 then b=b*z^(da-db); end 
//    if (db-da) > 0 then a=a*z^(db-da); end

// Pierre MARECHAL - Scilab Project
// Copyright INRIA
// 1er juin 2005

x = zeros(1:10);
x(5) = 1;
b = [ 0 1 0 ]
y = mtlb_filter(b,1,x);

if y==[0,0,0,0,0,1,0,0,0,0] then
	affich_result(%T,1180);
else
	affich_result(%F,1180);
end