Skip to main content

8.3) Editing and Visualising Cell Arrays


We can also add and change data of a cell array using similar syntax. For example:

[matlab]
>> a{2,3}=4
a=
'one' 'two' 'three'
[ 1] [ 2] [ 4]
>> a{1,1}='four'
a=
'four' 'two' ';three'
[ 1] [ 2] [ 4]
[/matlab]

Matlab offers a number of methods to help you visualize your cell arrays

[matlab]
>> celldisp(a) % displays the cell array as text
>> cellplot(a) % graphical plot of the cell array
[/matlab]