Cell arrays cc4m_logo_inline

TitleAvoid using cell arrays except for harnessing character arrays or objects of different classes.
Severity level5 if the code is meant for code generation, otherwise 7
DescriptionDo not use cell arrays for anything other than character arrays of objects of different classes.
RationaleCell arrays may be disadvantageous for the performance of the code. Readability is decreased as well when cell arrays are used instead of regular, homogeneous arrays.


data    = {12, 3; 4, 5};
names   = {"Neo", "Trinity", "Smith"};

Instead use:

data    = [12, 3; 4, 5];
names   = ["Neo", "Trinity", "Smith"];