MIT6_094IAP10_assn04

# MIT6_094IAP10_assn04 - Jan 28 2010 Homework 4 6.094...

This preview shows pages 1–4. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Jan. 28, 2010 Homework 4 6.094: Introduction to Matlab 3. Histogram. Generate 1000 Poisson distributed random numbers with parameter λ = 5 ( poissrnd ). Get the histogram of the data and normalize the counts so that the histogram sums to 1 ( hist – the version that returns 2 outputs N and X, sum ). Plot the normalized histogram (which is now a probability mass function) as a bar graph ( bar ). Hold on and also plot the actual Poisson probability mass function with = 5 as a line ( poisspdf ). You can try doing this with more than 1000 samples from the Poisson distribution to get better agreement between the two. Poisson distribution and observed histogram 0 1 2 3 4 5 6 7 8 9 10 11 12 13 Value 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 Probability Experimental histogram Actual Poisson Distribution 2
Jan. 28, 2010 Homework 4 6.094: Introduction to Matlab 4. Practice with cells. Usually, cells are most useful for storing strings, because the length of each string can be unique. a. Make a 3x3 cell where the first column contains the names: ‘Joe’, ’Sarah’, and ’Pat’, the second column contains their last names: ‘Smith’, ‘Brown’, ‘Jackson’, and the third column contains their salaries: \$30,000, \$150,000, and \$120,000. Display the cell using disp . b.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 08/27/2011 for the course CS 1671 taught by Professor Smith during the Spring '11 term at Georgia Tech.

### Page1 / 10

MIT6_094IAP10_assn04 - Jan 28 2010 Homework 4 6.094...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online