%get cereals data 
Z=csvread('Cereals no alpha.csv');
[rows,cols]=size(Z);
disp([rows,cols])
sugar=Z(:,7);
rating=Z(:,13);
[b0,b1,rsq,StdErrEst,StdRes] = linfit(sugar,rating);
disp([b0,b1,rsq,StdErrEst])
fit=b0+b1*sugar;
plot(sugar,fit)
hold on
plot(sugar,rating,'*')
hold off
for k=1:rows
    if abs(StdRes(k))>2
        disp([k,sugar(k),rating(k)])
    end
end