% M3eP305.m
% Absolute frequency data.
y_abs = [1,0,0,0,2,4,5,4,8,11,12,10,9,8,7,5,4,4,3,1,1,0,1];
binwidth = 0.5;
% Define the bins.
bins = [64:binwidth:75];
% Fill the vector y_raw with the raw data.
% Start with an empty vector.
y_raw = [];
for i = 1:length(y_abs)
if y_abs(i)>0
new = bins(i)*ones(1,y_abs(i));
else
new = [];
end
y_raw = [y_raw,new];
end
% Compute the mean and standard deviation.
mu = mean(y_raw),sigma = std(y_raw)