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 exercise_template.m to create an m-file (named exercise_.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.

% cell_exercise.m

clear all close all

% Call the m-file that creates the cell array create_cell_example

% assign the array of rain/snow values from City 2 to a 2x12 matrix ap2(1:2,:) = ????????

% create a bar chart of both the rain and snow values for City 2 bar(1:12,????) % set the XTickLabel for gca to use the month abbreviations set(gca,'XTickLabel',??????) % specify the ylabel ????? % Specify the title using the name string for City 2 title(horzcat('Average Monthly Precipitation for ',????????)) % Set the legend utilizing the precipitation name strings ?????

______________________________________________________________________

%% create_cell_example.m clear all close all

% Call the m-file that creates the cell array create_cell_example

% assign the array of rain/snow values from City 2 to a 2x12 matrix ap2(1:2,:) = ????????

% create a bar chart of both the rain and snow values for City 2 bar(1:12,????) % set the XTickLabel for gca to use the month abbreviations set(gca,'XTickLabel',??????) % specify the ylabel ????? % Specify the title using the name string for City 2 title(horzcat('Average Monthly Precipitation for ',????????)) % Set the legend utilizing the precipitation name strings ?????

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!