File Exchange

image thumbnail

Cell Array Mimic

version 1.1 (3.72 KB) by

This is a class which mimics a cell array by implementing several cell array functions.

0 Downloads

Updated

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.

Comments and Ratings (0)

Updates

1.1

Updated Copyright

MATLAB Release
MATLAB 7.10 (R2010a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video