summaryrefslogtreecommitdiff
path: root/2.3-1/tests/unit_tests/double/test_Size.sci
diff options
context:
space:
mode:
authorSiddhesh Wani2015-05-25 14:46:31 +0530
committerSiddhesh Wani2015-05-25 14:46:31 +0530
commit6a320264c2de3d6dd8cc1d1327b3c30df4c8cb26 (patch)
tree1b7bd89fdcfd01715713d8a15db471dc75a96bbf /2.3-1/tests/unit_tests/double/test_Size.sci
downloadScilab2C-6a320264c2de3d6dd8cc1d1327b3c30df4c8cb26.tar.gz
Scilab2C-6a320264c2de3d6dd8cc1d1327b3c30df4c8cb26.tar.bz2
Scilab2C-6a320264c2de3d6dd8cc1d1327b3c30df4c8cb26.zip
Original Version
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.sci41
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