Using For Loop To Enter a User Input into an Array
1 次查看(过去 30 天)
显示 更早的评论
I'm having problems getting a grasp on for loops. I'm trying to create a small data chart of sorts that asks the user for their name, phone number, and age, but I'm having trouble writing the for loop to add to the array.
So right now, it's a single row
Name Phone Number Age
Now I know I need a for loop nested within another for loop, but not sure to go about writing it to come out like:
Name Phone Number Age
John 7144359691 32
Sarah 3862211756 24
etc...etc...
Any suggestions?
2 个评论
回答(1 个)
KSSV
2016-10-29
[num,txt,raw] = xlsread(filename);
raw has all the information you are looking for.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!