diff options
author | Sandeep Gupta | 2017-06-18 23:55:40 +0530 |
---|---|---|
committer | Sandeep Gupta | 2017-06-18 23:55:40 +0530 |
commit | b43eccd4cffed5bd1017c5821524fb6e49202f78 (patch) | |
tree | 4c53d798252cbeae9bcf7dc9604524b20bb10f27 /2.3-1/tests/unit_tests/float/test_float_FFTShift.sci | |
download | Scilab2C-b43eccd4cffed5bd1017c5821524fb6e49202f78.tar.gz Scilab2C-b43eccd4cffed5bd1017c5821524fb6e49202f78.tar.bz2 Scilab2C-b43eccd4cffed5bd1017c5821524fb6e49202f78.zip |
First commit
Diffstat (limited to '2.3-1/tests/unit_tests/float/test_float_FFTShift.sci')
-rw-r--r-- | 2.3-1/tests/unit_tests/float/test_float_FFTShift.sci | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/2.3-1/tests/unit_tests/float/test_float_FFTShift.sci b/2.3-1/tests/unit_tests/float/test_float_FFTShift.sci new file mode 100644 index 00000000..e3a076f8 --- /dev/null +++ b/2.3-1/tests/unit_tests/float/test_float_FFTShift.sci @@ -0,0 +1,38 @@ +//SCI2C: DEFAULT_PRECISION= FLOAT +function test_float_FFTShift() + + disp(fftshift(5.3));// d0*d0 + disp(fftshift(5.3*%i));// z0*z0 + disp(fftshift(5.3 + 5.6*%i ));// z0*z0 + + + a = fft ([10 1 15 3.5 ]); + disp(fftshift(a)); + + b = [ 14 15 2 6 ; 1 2 6 4 ; 48.5 3 9.3 1 ]; + disp(fftshift(b)); + disp(fftshift(b , 1)); + disp(fftshift(b , 2)); + //disp(fftshift(b , "all")); + + + c = [10 1 15 3.5 ]*%i; + disp(fftshift(c)); + + d = [ 14 15 2 6 ; 1 2 6 4 ; 48.5 3 9.3 1 ]*%i; + disp(fftshift(b)); + disp(fftshift(b , 1)); + disp(fftshift(b , 2)); + //disp(fftshift(b , "all")); + + + e = c + [10 1 15 3.5 ]*%i; + disp(fftshift(e)); + + f = [ 18 15 7 6 ; 1 5 6 4 ; 43.5 1 9.3 1 ] + [ 14 15 2 6 ; 1 2 6 4 ; 48.5 3 9.3 1 ]*%i; + disp(fftshift(f)); + disp(fftshift(f , 1)); + disp(fftshift(f , 2)); + //disp(fftshift(f , "all")); + +endfunction |