comparison Cell.m @ 483:025f084187d1 feature/sublassable_cellarray

Add some documentation and minor clean up
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 02 Aug 2017 14:49:56 +0200
parents b90f8108ea5f
children 2ce903f28193
comparison
equal deleted inserted replaced
482:b90f8108ea5f 483:025f084187d1
1 % Cell is a reimplementation of matlabs cell array with the benefit that it is subclassable
2 % It might be used for giving a typename to a cellarray to increase readability of the code.
1 classdef Cell 3 classdef Cell
2 properties 4 properties
3 data 5 data
4 end 6 end
7
5 methods 8 methods
6 function obj = Cell(data) 9 function obj = Cell(data)
10 default_arg('data', {});
7 if ~iscell(data) 11 if ~iscell(data)
8 class(data)
9 error('Input argument to Cell must be a cell array'); 12 error('Input argument to Cell must be a cell array');
10 end 13 end
11 14
12 obj.data = data; 15 obj.data = data;
13 end 16 end