Confused about how to define a variable? please help!
1 view (last 30 days)
Show older comments
Part II: Plot the bacteria for Madison Park Beach
-Create a variable called dayMadison to hold the day numbers of Madison Park Beach.
-Create a variable called eColiMadison to hold the Madison Park Beach E. coli counts and a variable called coliformMadison to hold the Madison Park Beach fecal coliform counts.
-Create a new figure that plots day (x-axis) versus the counts of both types of bacteria for Madison Park Beach. Label it correctly.
-Label the tick marks corresponding to the first and fifteenth of each month. Use the set command and not plottools (For reference, day numbers 3, 20, 34, 50, 64, 81, and 95 correspond to 5/15, 6/1, 6/15, 7/1, 7/15, 8/1, and 8/15, respectively.)
0 Comments
Answers (1)
Image Analyst
on 20 Feb 2014
How are you getting the data? Just typing it in? Using xlsread() to pull it out of a workbook? Using csvread to pull it out of a csv file? How did your instructor give you the data? Then just plot the data
plot(dayMadison, eColiMadison, 'rs', 'MarkerSize', 15, 'LineWidth', 2);
hold on;
plot(dayMadison, coliformMadison, 'b*', 'MarkerSize', 20, 'LineWidth', 2);
legend('eColiMadison', 'coliformMadison');
Or you might want to use plotyy(). Look up tickmarks in the help to see how to change the day numbers from their values to the 5/15 etc. that they want.
0 Comments
See Also
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!