Consider the following MATLAB code:
f = figure;uit = uitable(f);text1 = ['ab cd ef g' newline];text2 = 'ab cd ef gh';text3 = '01234567891';d = {text1,52,true; text2,40,true; text3,25,false};uit.Data = d;
The 'newline' concatenated at the end of the char array 'text1' is to simulate a line of text being read in from a file.\n
Why does the variable 'text1' appear as 1X11 char in the MATLAB Workspace and the 'uitable' while 'text2' and 'text3' show up with the characters they contain?
Best Answer