- #1
coffeem
- 91
- 0
Homework Statement
Plot a suitably scaled normal distribution on top of a histogram made with 100 random values.
The Attempt at a Solution
x = -2,9:0.1:2.9;
y = randn(100,1);
nd = exp(-x.^2/2)/sqrt(2*pi);
hist(y,x);
hold on;
plot(x,nd);
plot(-x,nd);
holf off;
This is not working. What am I doing wrong? Also how do I ensure that it is suitably scaled?
Thanks