diff Cell.m @ 478:d91f27460741 feature/sublassable_cellarray

Implement size, length and transpose
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 02 Aug 2017 10:51:44 +0200
parents c91464ef1dd9
children c5705458beb1
line wrap: on
line diff
--- a/Cell.m	Wed Aug 02 10:31:48 2017 +0200
+++ b/Cell.m	Wed Aug 02 10:51:44 2017 +0200
@@ -27,6 +27,24 @@
         %     % display(A.data)
         % end
 
+        function s = size(A)
+            s = size(A.data);
+        end
+
+        function l = length(A)
+            l = length(A.data);
+        end
+
+        function B = transpose(A)
+            b = A.data.';
+            B = callConstructor(A, b);
+        end
+
+        function B = ctranspose(A)
+            b = A.data';
+            B = callConstructor(A, b);
+        end
+
         function disp(A)
             disp(A.data)
         end