Calculate 2 and 3 standard deviations
Mostrar comentarios más antiguos
I'm working on calculating 2 and 3 standard deviations to plot on a graph. I'm using the functions mean() and std() for mean and standard deviation calculations. What I'm not understanding is if using std() function provides 1 standard deviation, why use (mean + 2*std()) and (mean + 3*std()) to get the 2 and 3 standard deviations? Would it not be (2*std()) for 2 standard deviations and (3*std()) (that is, without the mean value)? From reading other similar questions/answers here, (mean + 2*std()) and (mean + 3*std()) seems to be correct, but I'm not following why.
2 comentarios
Sunshine
el 28 de Mayo de 2020
Steven Lord
el 29 de Mayo de 2020
ax.XTick is not a function that sets the ticks. Either assign to that property or use the xticks function.
ax.XTick = [-3*pi -2*pi -pi 0 pi 2*pi 3*pi]; % or
xticks([-3*pi -2*pi -pi 0 pi 2*pi 3*pi]);
Or to simplify things a little:
ax.XTick = pi*(-3:3);
xticks(pi*(-3:3));
If you look at the See Also section at the end of the documentation page for the xticks function you'll see other similar functions that will be of use to you.
doc xticks
Respuestas (0)
Categorías
Más información sobre Surface and Mesh Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!