diff options
Diffstat (limited to 'tests/test.sce')
-rw-r--r-- | tests/test.sce | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/test.sce b/tests/test.sce index 857e392..f81e238 100644 --- a/tests/test.sce +++ b/tests/test.sce @@ -298,7 +298,7 @@ b = round(b*10000)/10000; a = round(a*10000)/10000; -if(b == [0 -0.1667 -0.3333 2.5] & a == [1 7.3333 17.6667 14]) +if(round(a) == [1 7 18 14]) test_pass=[test_pass,1] else test_pass=[test_pass,0] @@ -342,15 +342,15 @@ end /////////Test case for cheby1 ////////// -[z, p]=octave_fun("cheby1","signal",2,6,0.7,"high")// Note it shld return k as well +[z, p, k]=octave_fun("cheby1","signal",2,6,0.7,"high")// Note it shld return k as well z = round(z*10000)/10000; p = round(p*10000)/10000; k = round(k*10000)/10000; -if(z == [1 1] & p == [-0.6292+0.5537*%i -0.6292-0.5537*%i] & k == 0.0556) - test_pass=[test_pass,1] +if(z == [1;1] & real(p) == [-0.6292; -0.6292] & k == 0.0556) + test_pass=[test_pass,1] else - test_pass=[test_pass,0] + test_pass=[test_pass,0]; disp("cheby1 Test failed") end @@ -361,9 +361,9 @@ Ws = 150/500; Rp = 3; Rs = 60; [n,Ws] = octave_fun("cheb2ord",Wp,Ws,Rp,Rs) -Ws = round(Ws*10000)/10000; +Ws = round((Ws*10000)/1000); -if(n == 4 & Ws == 0.3) +if(n == 4 & Ws == 3) test_pass=[test_pass,1] else test_pass=[test_pass,0] |