Cell Array Mimic

This is a class which mimics a cell array by implementing several cell array functions.
516 Downloads
Updated 4 Jun 2010

View License

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.

Cite As

Will Jackson (2024). Cell Array Mimic (https://www.mathworks.com/matlabcentral/fileexchange/27825-cell-array-mimic), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Matrices and Arrays in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.1.0.0

Updated Copyright

1.0.0.0