How I use string in Matriz ?

1 view (last 30 days)
Kleber
Kleber on 22 Aug 2013
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.

Answers (1)

Walter Roberson
Walter Roberson on 22 Aug 2013
Use S{i} instead of S(i)
  1 Comment
Kleber
Kleber on 22 Aug 2013
Thanks a lot !
Very simple solution.
Now I can explain to my students.

Sign in to comment.

Categories

Find more on Characters and Strings in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!