MATLAB: A matrix of strings

matrix

Hi all
I want to make a 3-by-3 matrix with the elements of strings.
for example: a=[ok ok ok; no no no ;ok ok ok ];
How can I do it?
thanks,

Best Answer

use cell array
b = {'ok' 'no'}
a = b([1;2;1]*ones(1,3))