How I use string in Matriz ?

1 回表示 (過去 30 日間)
Kleber
Kleber 2013 年 8 月 22 日
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 日
Use S{i} instead of S(i)
  1 件のコメント
Kleber
Kleber 2013 年 8 月 22 日
Thanks a lot !
Very simple solution.
Now I can explain to my students.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by