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

Kleber
Kleber 2013년 8월 22일
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