Trying to print the following range of labels in a figure:
aux = {'ca155.mat','ca154.mat','ca159.mat','ca146.mat','ca148.mat','ca004.mat'};
But I need it upper case and without the extension, so I use
text(0,0,upper(sprintf([aux{i},'\b\b\b\b'])));
In the command window I get the correct output such as for i=1, i.e. CA155. However the text function on a figure doesn't work and produces:
CA155.MAT[][][][]
Except instead of brackets there are closed rectangles (I couldn't copy the character).
How can I fix this?
aux{1}(1:end-4)removes the last 4 characters from a string.