From 75558fc35bebe72c6db7e1b3b0c7ae214aa4fc8e Mon Sep 17 00:00:00 2001 From: Abhinav Dronamraju Date: Mon, 11 Sep 2017 17:31:44 +0530 Subject: Added test files --- 2.3-1/demos/Abhinav_Demos/test_faurre.sci | 22 +++++++++++++++ 2.3-1/demos/Abhinav_Demos/test_kalm.sci | 25 +++++++++++++++++ 2.3-1/demos/Abhinav_Demos/test_mvcorrel.sci | 31 +++++++++++++++++++++ 2.3-1/demos/Abhinav_Demos/test_strange.sci | 43 +++++++++++++++++++++++++++++ 2.3-1/demos/Abhinav_Demos/test_wiener.sci | 25 +++++++++++++++++ 5 files changed, 146 insertions(+) create mode 100644 2.3-1/demos/Abhinav_Demos/test_faurre.sci create mode 100644 2.3-1/demos/Abhinav_Demos/test_kalm.sci create mode 100644 2.3-1/demos/Abhinav_Demos/test_mvcorrel.sci create mode 100644 2.3-1/demos/Abhinav_Demos/test_strange.sci create mode 100644 2.3-1/demos/Abhinav_Demos/test_wiener.sci diff --git a/2.3-1/demos/Abhinav_Demos/test_faurre.sci b/2.3-1/demos/Abhinav_Demos/test_faurre.sci new file mode 100644 index 00000000..4c32354b --- /dev/null +++ b/2.3-1/demos/Abhinav_Demos/test_faurre.sci @@ -0,0 +1,22 @@ +// Test file for "Column" function for the data types double, float, double complex, string , uint16. +// All the below statements are added to initialize variables in different data types +//The function written doesn't work for string or character scalar as of now. + + +function test_faurre() + disp(" ** faurre ** ") + disp('Double') + n=3 + H= [ 2 1 1 ; 12 3 7; 5 1 2 ] + F=[ 0 2 21 ; 2 5.1 1; 5 6 1] + G=[ 1 2 21 ; 3 20 6; 5 6 7 ] + R0=[6 7 2; 51 1 2; 1 2 3] + [P R T]= faurre(n,H,F,G,R0) + disp(P) + disp('') + disp(R) + disp('') + disp(T) + disp('') + +endfunction diff --git a/2.3-1/demos/Abhinav_Demos/test_kalm.sci b/2.3-1/demos/Abhinav_Demos/test_kalm.sci new file mode 100644 index 00000000..006f3c99 --- /dev/null +++ b/2.3-1/demos/Abhinav_Demos/test_kalm.sci @@ -0,0 +1,25 @@ +// Test file for "Column" function for the data types double, float, double complex, string , uint16. +// All the below statements are added to initialize variables in different data types +//The function written doesn't work for string or character scalar as of now. + + +function test_kalm() + disp(" ** KALM ** ") + disp('Double') + y=[1 2 ; 3 4] + x0=[4 50; 5 6] + p0=[4 1 ; 27 8] + f=[22 0;1 3] + g= [10.1 2 ; 3 42] + h=[ 5 23 ;2 1] + q= [2 3 ; 12 3] + rr= [ 21 2 ; 100 91] + [x1,p1,x,p]= kalm(y,x0,p0,f,g,h,q,rr) + disp(x1) + disp(p1) + disp(x) + disp(p) + + + +endfunction diff --git a/2.3-1/demos/Abhinav_Demos/test_mvcorrel.sci b/2.3-1/demos/Abhinav_Demos/test_mvcorrel.sci new file mode 100644 index 00000000..bcc110c4 --- /dev/null +++ b/2.3-1/demos/Abhinav_Demos/test_mvcorrel.sci @@ -0,0 +1,31 @@ +// Test file for "Column" function for the data types double, float, double complex, string , uint16. +// All the below statements are added to initialize variables in different data types +//The function written doesn't work for string or character scalar as of now. + + +function test_mvcorrel() + disp(" ** mvcorrel ** "); + disp('Double'); + a=[1;0;3;4;5;4;0]; + b= mvcorrel(a); + disp(b); + disp('') + c=[1 0 3; 4 5 8; 1 10 25]; + d=mvcorrel(c) + disp(d) + disp('') + e=mvcorrel(1) + disp(e) + disp('Float'); + f=float([1;0;3;4;5;4;0]); + g= mvcorrel(f); + disp(g); + disp('') + h=float([1 0 3; 4 5 8; 1 10 25]); + i=mvcorrel(h) + disp(i) + disp('') + j= float(4) + k=mvcorrel(j) + disp(k) +endfunction diff --git a/2.3-1/demos/Abhinav_Demos/test_strange.sci b/2.3-1/demos/Abhinav_Demos/test_strange.sci new file mode 100644 index 00000000..35deb2ce --- /dev/null +++ b/2.3-1/demos/Abhinav_Demos/test_strange.sci @@ -0,0 +1,43 @@ +// Test file for "Column" function for the data types double, float, double complex, string , uint16. +// All the below statements are added to initialize variables in different data types +//The function written doesn't work for string or character scalar as of now. + + +function test_strange() + seq= [1 2.01 400.0; 10.912 5 9.81; 3.21 8.921 100.0] + a= strange(seq); + b= strange(seq, 'r'); + c= strange(seq, 'c'); + disp('Double') + disp(a) + disp('') + disp(b) + disp('') + disp(c) + disp('') + seq1= float(seq); + disp('') + f= strange(seq1); + g= strange(seq1, 'r'); + h= strange(seq1, 'c'); + disp('Float') + disp(f) + disp('') + disp(g) + disp('') + disp(h) + disp('') + seq2= uint16(seq); + k= strange(seq2); + l= strange(seq2, 'r'); + m= strange(seq2, 'c'); + disp('Uint16') + disp(k) + disp('') + disp(l) + disp('') + disp(m) + disp('') + + +endfunction diff --git a/2.3-1/demos/Abhinav_Demos/test_wiener.sci b/2.3-1/demos/Abhinav_Demos/test_wiener.sci new file mode 100644 index 00000000..780e9571 --- /dev/null +++ b/2.3-1/demos/Abhinav_Demos/test_wiener.sci @@ -0,0 +1,25 @@ +// Test file for "Column" function for the data types double, float, double complex, string , uint16. +// All the below statements are added to initialize variables in different data types +//The function written doesn't work for string or character scalar as of now. + + +function test_wiener() + disp(" ** WIENER ** ") + disp('Double') + y=[1 2 ; 3 4] + x0=[1 4; 3 6 ] + p0=[4 1 ; 27 8] + f=[22 0;1 3] + g= [10.1 2 ; 3 42] + h=[ 5 23 ;2 1] + q= [2 3 ; 12 3] + rr= [ 21 2 ; 100 91] + [xs,ps,xf,pf]= wiener(y,x0,p0,f,g,h,q,rr) + //disp(x1) + //disp(p1) + //disp(x) + //disp(p) + + + +endfunction -- cgit