%How to make a distribution
mydist = makedist('Normal', 'mu',65,'sigma',2);
%how to generate random data from a distribution
mydata = random(mydist,100,1);
%plot the data on a histogram
hist(mydata)
%how to fit data to a distribution, you need not use this in the HW
myfit = fitdist(mydata,'Normal');

%generate random numbers between 0 and 1
rnums = rand(100,1);
%generate the y data
y = rnums*4 + 1;

%generate the fit type object for our fit
f2 = fittype('a*x + b','coefficients',{'a','b'},'independent',{'x'});
%do our fit
[coefs,stats] = fit(rnums,y,f2)
%to look at our parameters we can do coefs.a, or coefs.b

