フィルターのクリア

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 Center および File ExchangeData Types についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by