summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunil Shetye2018-07-31 23:22:15 +0530
committerSunil Shetye2018-08-01 00:52:29 +0530
commit15aa4ec879a3c640da1bcea26c58cd1513f83534 (patch)
tree55d12287e661fc290fb41ba28e82a46d603ccce1
parent944486c1f980b87cf6a6d561fb3de057ddff0bb5 (diff)
downloadFOSSEE-Signal-Processing-Toolbox-15aa4ec879a3c640da1bcea26c58cd1513f83534.tar.gz
FOSSEE-Signal-Processing-Toolbox-15aa4ec879a3c640da1bcea26c58cd1513f83534.tar.bz2
FOSSEE-Signal-Processing-Toolbox-15aa4ec879a3c640da1bcea26c58cd1513f83534.zip
incorporate changes in test1.sce by Sonu Sharma
use ieee(2) mode instead of ieee(1) mode reduce messages
-rw-r--r--macros/bilinear.sci4
-rw-r--r--macros/fir1.sci1
-rw-r--r--macros/residued.sci2
-rw-r--r--macros/residuez.sci5
-rw-r--r--test1.sce2
-rw-r--r--test3.sce1
6 files changed, 7 insertions, 8 deletions
diff --git a/macros/bilinear.sci b/macros/bilinear.sci
index 9030bfd..d1ee3f7 100644
--- a/macros/bilinear.sci
+++ b/macros/bilinear.sci
@@ -51,7 +51,7 @@ function [Zz, Zp, Zg] = bilinear(Sz, Sp, Sg, T)
funcprot(0);
[nargout nargin] = argn();
- ieee(1);
+ ieee(2);
if nargin==3
T = Sg;
@@ -113,5 +113,5 @@ function [Zz, Zp, Zg] = bilinear(Sz, Sp, Sg, T)
[Zz, Zp] = zp2tf(Zz, Zp, Zg);
Zz = prepad(Zz, length(Zp));
end
-
+ieee(0);
endfunction
diff --git a/macros/fir1.sci b/macros/fir1.sci
index 05532db..636d6f8 100644
--- a/macros/fir1.sci
+++ b/macros/fir1.sci
@@ -94,7 +94,6 @@ function b = fir1(n, w, varargin)
x=exp(-1*%i*%pi*w_o)
// z=[1 -exp(-1*%i*%pi*w_o)];
- disp(x)
nc = length(b);
if(isscalar(x) & nc>0 & (x~=%inf) & or(b(:)~=%inf))
// Make it scream for scalar x. Polynomial evaluation can be
diff --git a/macros/residued.sci b/macros/residued.sci
index 9b4a386..cbcbebc 100644
--- a/macros/residued.sci
+++ b/macros/residued.sci
@@ -87,7 +87,7 @@ function [r, p, f, m] = residued(b, a, toler)
//
[nargout,nargin]=argn();
- if nargin<3,
+ if nargin==3,
warning("tolerance ignored");
end
NUM = b(:)';
diff --git a/macros/residuez.sci b/macros/residuez.sci
index f3a5172..cee301f 100644
--- a/macros/residuez.sci
+++ b/macros/residuez.sci
@@ -47,10 +47,11 @@
[nargout,nargin]=argn();
- if nargin<3
+ if nargin==3
warning("tolerance ignored");
end
- NUM = B(:)'; DEN = A(:)';
+ NUM = B(:)';
+ DEN = A(:)';
// Matlab's residue does not return m (since it is implied by p):
[r,p,f,m]=residue(conj(mtlb_fliplr(NUM)),conj(mtlb_fliplr(DEN)));
p = 1 ./ p;
diff --git a/test1.sce b/test1.sce
index bae700d..7b9885d 100644
--- a/test1.sce
+++ b/test1.sce
@@ -725,6 +725,6 @@ if(res~=[])
disp("One or more tests failed")
exit(1)
else
- disp("All test cases passed")
+ disp("pass")
exit
end
diff --git a/test3.sce b/test3.sce
index 5b349e2..7d3dbac 100644
--- a/test3.sce
+++ b/test3.sce
@@ -817,7 +817,6 @@ end
-disp("all worked!!")
////////////////////////////////////////////////////