This preview shows pages 1–3. Sign up to view the full content.
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
- Spring '06