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.

回答(1 个)

Walter Roberson
Walter Roberson 2013-8-22

0 个投票

Use S{i} instead of S(i)

1 个评论

Thanks a lot !
Very simple solution.
Now I can explain to my students.

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Dynamic System Models 的更多信息

产品

标签

提问:

2013-8-22

Community Treasure Hunt

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

Start Hunting!

Translated by