You set the error bar extents with the 3rd and 4th arguments to the errorbar
function. So instead of just giving the standard deviation you can set the limits specifically for example:
nSD=3; % number of standard deviations to show
errorbar(X,Y,Y-nSD*SD,Y+nSD*SD);
Or as used in the OP's question the 3rd input can be used alone to set the standard deviation, in which case the function uses [Y-SD,Y+SD]
as the error bar extents,
So the above is actually the same as just telling the function the standard deviation is increased by a factor of nSD
so a silmpler alternative would be to use:
errorbar(X,Y,nSD*SD)