I want to print a table via uitable
, with the data for the table-entries stored in a matrix called plot
. Every entry should be a string, consisting of 2 chars i.e. p0
or u1
,...
The matrix should be filled in two nested for-loops.
But whenever I want to store a string as an element. i.e. plot(i,j)='a1'
i get the error
"??? Assignment has more non-singleton rhs dimensions than non-singleton subscripts"
on the other hand, when i initialize a matrix completely at the beginning i.e.
plot=['aa' 'ab';'ba' 'bb']
it seems to work just fine.
I would be very thankful for any ideas concerning the problem. Would there be any way to solve the problem with a cell array?