Works fine except the labels for the positive & negative 1.96*SD is not placed exactly right. You need to correct the text function calls and offset the y coordinate by diffmean like this:
Works fine except the labels for the positive & negative 1.96*SD is not placed exactly right. You need to correct the text function calls and offset the y coordinate by diffmean like this:
text (maxx, twosdev+diffmean, ' 1.96 sd ', 'Color', 'b' , 'FontSize', 12, 'FontWeight', 'bold');
text (maxx, -twosdev+diffmean, ' -1.96 sd', 'Color', 'b' , 'FontSize', 12, 'FontWeight', 'bold');
Dan