필터 지우기
필터 지우기

Why i can't request user sting input?

조회 수: 2 (최근 30일)
jy tan
jy tan 2012년 3월 12일
n = input('Enter the number of students');
for i=1:1:n
name(i) = input('What is your name? :','s');
end

채택된 답변

Image Analyst
Image Analyst 2012년 3월 12일
Since the names may be different lengths name needs to be a cell array. Try name{i} instead of name(i).

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Types에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by