Question: The m-file create_cell_example.m creates a cell array with the average monthly precipitation values for three cities. The array also contains the names of the cities,

The m-file create_cell_example.m creates a cell array with the average monthly precipitation values for three cities. The array also contains the names of the cities, the names of the precipitation types and strings containing abbreviations of the months of the year. Start with the template file cell_exercise_template.m to create an m-file (named cell_exercise_LastName.m) that produces a bar chart of the average monthly rainfall and snowfall for Minneapolis. You must use cell-array indexing to access the strings for use in the title, legend and x-axis tick labels.

Here is the create_cell_example.m

The m-file create_cell_example.m creates a cell array with the average monthly precipitation

Here is the cell_exercise_template.m that needs to be used to that produces the rain and snow for Minneapolis

values for three cities. The array also contains the names of the

???????

cities = {"New Orleans"Minneapolis"San Diego'); precip-type = {'rain','snow'); months = {Jan,Feb"Mar"Apr',May,Jun, JulAug,Sep,"Oct, Nov,"Dec'); 96 City 1: New Orleans % average monthly rainfall (inches) precip-amt(1,1,:-[5.05 6.01 490 4.50 4.56 5.84 6.12 6.17 5.51 3.05 4.42 5.75; % average monthly snowfall (inches) precip-amt(1,2,:) = zeros(1,12); 6 City 2: Minneapolis % average monthly rainfall (inches) precip-amt(2,1,:) = [0.95 0.88 1.94 2.42 3.39 4.05 3.53 3.62 2.72 219 1.55 1.08]; % average monthly snowfall (inches) precip_amt(2,2:) [12.1 7.8 10.2 2.5 0.010. 0 0 0.010.6 9.3 11.5]; 6 City 3: San Diego % average monthly rainfall (inches) precip_amt(3,1:) [1.80 1.53 1.77 0.79 0.19 0.07 0.02 0.10 0.24 0.37 1.45 1.57] % average monthly snowfall (inches) precip-amt(3,2,:) = zeros(1,12); 96 Place city name strings in cell(1) 6 Place precipitation type name strings in cell(2) 96 Place month name strings in cell(3) % Place precipitation amounts in cell(4) avg-precip = (cities,precip-type,months,precip-amt); clear cities precip_type months precip_amt

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!