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 CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by