How I use string in Matriz ?

I need to use strings in matriz using input, for example:
% for i=1:2
S(i)=input('Nome da loja ','s');
end
This example is very simple, but I cant do this. This example works when I type one word, but for more words doesnt works.

Respuestas (1)

Walter Roberson
Walter Roberson el 22 de Ag. de 2013

0 votos

Use S{i} instead of S(i)

1 comentario

Kleber
Kleber el 22 de Ag. de 2013
Thanks a lot !
Very simple solution.
Now I can explain to my students.

Iniciar sesión para comentar.

Categorías

Más información sobre Dynamic System Models en Centro de ayuda y File Exchange.

Productos

Etiquetas

Preguntada:

el 22 de Ag. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by