Why Does Accessing Tick Label Elements Return Error Message?

In R2014a and earlier, the XTickLabel, YTickLabel, and ZTickLabel properties of the axes contained the tick label values in either a character array or a cell array. Starting in R2014b, these properties always contain the tick labels in a cell array. Access elements of the array using cell array indexing with curly braces {}.

Using matrix indexing to access the elements returns an error message:

plot(0:10,0:10);
ax = gca;
xticks = get(ax,'XTickLabel');
xticks(1) = 'start';
Conversion to cell from char is not possible.
Use cell array indexing with curly braces {} to access tick label elements.
plot(0:10,0:10);
ax = gca;
xticks = get(ax,'XTickLabel');
xticks{1} = 'start';
set(ax,'XTickLabel',xticks) % set tick labels to updated values

See Also