I am writing a few functions and scripts performing operations on files and content from files.
Often I use sprintf, uigetfile or other character/string based basic functions (even a simple isa is an example) that needs an input to be either a string or a character (sometimes even a cellstr is a good way of doing it).
Years ago when I was doing similar stuff in previous MATLAB release everything was handled in char arrays (with a little help from a cell when needed).
Nowadays it seems there's a new class in town – namely the string array.
Which is preferred and why? As far as I can tell the char is quite superior in memory usage, but are there any other advantages to using one over the other?
Best Answer