a matrix of strings

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,

 Respuesta aceptada

Andrei Bobrov
Andrei Bobrov el 30 de En. de 2012

0 votos

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

Más respuestas (0)

Categorías

Más información sobre Characters and Strings en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

som
el 30 de En. de 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by