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/double/test_Size.sci | |
download | Scilab2C-b43eccd4cffed5bd1017c5821524fb6e49202f78.tar.gz Scilab2C-b43eccd4cffed5bd1017c5821524fb6e49202f78.tar.bz2 Scilab2C-b43eccd4cffed5bd1017c5821524fb6e49202f78.zip |
First commit
Diffstat (limited to '2.3-1/tests/unit_tests/double/test_Size.sci')
-rw-r--r-- | 2.3-1/tests/unit_tests/double/test_Size.sci | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/2.3-1/tests/unit_tests/double/test_Size.sci b/2.3-1/tests/unit_tests/double/test_Size.sci new file mode 100644 index 00000000..c9866ff4 --- /dev/null +++ b/2.3-1/tests/unit_tests/double/test_Size.sci @@ -0,0 +1,41 @@ +function test_Size() + disp(size(4)); + disp(size([1 2])) + disp(size(2+3*%i)); + disp(size([1 2 3 ; 4 5 6])); + disp(size([1 2 3 ; 4 5 6]*%i)); + e = %pi ; + disp(size(e)); // d0Sized0 + + f = e * %i; + disp(size(f));// z0Sized0 + + a = [1 2 3 ; 4 5 6]; + disp(size(a));// d2Sized0 + + b = [1 2 3 ; 4 5 6] * %i; + disp(size(b));// z2Sized0 + +// with a second argument + o=1; + + disp(size(4,1)); + disp(size(2+3*%i,1)); + disp(size([1 2 3 ; 4 5 6],o)); + disp(size([1 2 3 ; 4 5 6]*%i,1)); + e = %pi ; + disp(size(e,1)); // d0Sized0 + + f = e * %i; + disp(size(f,1));// z0Sized0 + + a = [1 2 3 ; 4 5 6]; + disp(size(a,o));// d2Sized0 + + b = [1 2 3 ; 4 5 6] * %i; + disp(size(b,1));// z2Sized0 + + + + +endfunction |