Cell Array Mimic
by Will
03 Jun 2010
(Updated 04 Jun 2010)
This is a class which mimics a cell array by implementing several cell array functions.
|
Watch this File
|
| File Information |
| Description |
CAindex mimics a cell array by overloading the following functions,
'CAindex'
'ctranspose'
'disp'
'end'
'horzcat'
'numel'
'plot'
'size'
'subsasgn'
'subsref'
'transpose'
'vertcat'
The attached test file illustrates the different operations it can perform. The way it differs from a normal cell array is that I can call it like this,
C('ColumnTitle')
which is the same as
CELLARRAY(:,x)
if the element in CELLARRAY(1,x) is 'ColumnTitle'
Also,
C{'FirstColumnTitle'}
works similarly.
This was motivated by the desire to mimic a cell array with only subtle differences which is one of the more challenging things to do with MATLAB classes. |
| MATLAB release |
MATLAB 7.10 (R2010a)
|
| Other requirements |
MATLAB R2008a, which introduced MATLAB classes, is required to run this code. |
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Updates |
| 04 Jun 2010 |
Updated Copyright |
|
Contact us