hw05problem5 - Units are inches width_maximum =...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
% ENGR 12600 Fall 2008 % Solution to Homework 5, Problem 5. % This program calculates the statistics for the width data collected in ENGR 126 class. % It also generates a histogram of the data. % ---- Input Section ---- % Read the sunflower seed data into MATLAB seed_width = xlsread('hw5problem4.xlsx','sheet1','B8:B2807'); % ---- Calculation Section ---- % Calculates the Statistics for the sunflower seed width data width_mean = mean(seed_width); % Units are inches width_stdev = std(seed_width); % Units are inches width_median = median(seed_width); % Units are inches width_minimum = min(seed_width);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: % Units are inches width_maximum = max(seed_width); % Units are inches % ---- Output Section ----% Generate and diplay histogram of seed width data hist(seed_width,20) % Formats the graph according to proper plotting format title('Histogram of the Sunflower Seed Width Data Collected by the ENGR 126 Class') ylabel('Frequency') xlabel('Sunflower Seed Width Interval (in)') %----Comments----% Having used both Excel and Matlab, what are the pros and cons to each % tool? What would cause you to choose one over the other?...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online