This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: % maximum measured mpg values. [freq,centers] = hist(mpg,16) rel_freq = freq/(length(mpg)) bar(centers,rel_freq) Sheet1 Page 2 disp(length(mpg)) disp(max(mpg)) disp(min(mpg)) disp(mean(mpg)) disp(median(mpg)) disp(std(mpg)) disp(std(mpg)^2) %use hist function to find histogram and centers %relative frequency is found by dividing histogram by total elements %plot bar graph using centers and relative frequency Sheet1 Page 3 %length function %max and min functions find %the max and min in a vector array %mean and median functions find %the mean and median in a vector %std function finds standard deviation %variance = standard deviation squared...
View Full Document
This note was uploaded on 01/22/2011 for the course ENG 006 taught by Professor Lagerstrom during the Spring '06 term at UC Davis.
- Spring '06