I am trying to simulate a code which is on the official MATLAB website, but I cannot get the same output.
This is the code:
c = categorical({\'apples\',
You can try the following workaround (as mentioned here):
prices = [1.23 0.99 2.3]; bar(prices) set(gca,'xticklabel',{'apples','oranges','pears'});
So, you get rid of categorical and switch to the gca function, that allows you to change axis labels.
categorical