Question: Please solve the following problem in Matlab Homework Problem 31 Cell arrays Cell arrays are arrays that can store arrays and/or values of different datatypes,
Please solve the following problem in Matlab

Homework Problem 31 Cell arrays Cell arrays are arrays that can store arrays and/or values of different datatypes, and are very useful. Here we will create a cell array that keeps track of the Californin Golden Bears' 2017 football season. Cal's results are shown in the table below Home Team Away Team Home Team Score Away Team Score [Winner UNC Cal Cal Cal Cal Weber State 33 Ole Miss 27 USC 30 35 20 16 30 Cal Cal USC 20 We wish to work with cell arrays that store information in the same order as shown above. We are going to create this cell array incrementally i.e. adding one row (game) at a time. We will do this in a script file named addGameCell.m We are going to use the following input variables as described below: schedule is a cell array that holds the current data (home team, away team, home score, away score and winner) and will be expanded to include a new game hometeam is a character array of the home team awayteam is a character array of the away team homescore is the home team's final score and awayscore is the away team's final score. 3 Your code should update the variable schedule as per the following inpu t cases given below: 1. schedule 0, home team UNC, awayteam -Cal', homescore 30, awayscore - 35 For these inputs, your code should produce the following output for schedule: schedule - 1 x5 cell array UNC' 'Cal' 30 135 'Cal' 2. schedule -your schedule from case 1, hometeam Cal', awayteam -Weber State', homescore -33, awayscore - 20. For these inputs, your code should produce the following output for schedule: schedule- 2 x5 cell array UNCCal Cal 135] 1201 Cal' 'Cal' Weber State 133) 3. schedule your schedule from case 2, hometeam -Cal', awayteam -Ole Miss, homescore -27, awayscore 16. For these inputs, your code should produce the following output for schedule: schedule - 3 x5 cell array UNCCal' Cal Weber State' 133) Cal (35] Cal' [20] Cal' 116] 130] ole Miss' 1271 'Cal
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
