UP | HOME

Exercise 24 solutions

Table of Contents


Python

e24.py

# part 1

MATLAB / Octave

e24.m

% part 1

R

e24.R

# part 1
y <- rnorm(1000)
hist(y, col="blue")

# part 2
hist(y, col="blue", bins=25)

# part 3
b = seq(-4,4,0.2) # define our bin boundaries
hist(y, col="blue", breaks=b)

Paul Gribble | fall 2014
This work is licensed under a Creative Commons Attribution 4.0 International License
Creative Commons License