Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
4 views

Test 1

This document contains MATLAB code to plot lead and cadmium concentrations from a toxic data set against time on the same graph, with cadmium concentrations multiplied by 10 for comparison. It also generates a histogram of the entire lead concentration data set to show the distribution.

Uploaded by

Austin Razavi
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Test 1

This document contains MATLAB code to plot lead and cadmium concentrations from a toxic data set against time on the same graph, with cadmium concentrations multiplied by 10 for comparison. It also generates a histogram of the entire lead concentration data set to show the distribution.

Uploaded by

Austin Razavi
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

clc disp('Austin Razavi') disp('Problem 2') %3a plot lead concentratoins and 10*cadmium concentrations verses time on %the

same graph lead = toxic(:,3); %Lead concentrations in nanograms per gram cadmium = toxic(:,2); %Cadmium concentrations in nanograms per gram cadmium_new = cadmium*10; %10*cadmium concentrations in nanograms per gram time = toxic(:,1); %plot plot(time,lead,'-',time,cadmium_new,':') title('Lead Concentrations vs. Time, 10*Cadmium Concentrations vs. Time') xlabel('Time (years)') ylabel('Lead Concentrations, Cadmium Concentrations, (nanograms per gram)') legend('Lead Concentrations', 'Cadmium Concentratinos', 'Location', 'NorthWest') %3b figure(2) hist(lead); %histogram of lead concentration for the entire data set. xlabel ('Number of occurances') ylabel ('Concentration (nanograms per gram') title ('Lead Concentratinos for entire data set')

You might also like