Effacer les filtres
Effacer les filtres

Descriptive statistics on scatter plot

3 vues (au cours des 30 derniers jours)
skyline le 25 Mai 2017
Modifié(e) : Abel Babu le 30 Mai 2017
Suppose I have a series x.
What I would like to do is:
- Draw a scatterplot of x - On the scatter plot, I would like to output the basic descriptive statistics such as *Mean *Std *# of samples

Réponses (1)

Abel Babu
Abel Babu le 30 Mai 2017
Modifié(e) : Abel Babu le 30 Mai 2017
If your question is along the lines of adding the mean and standard deviation as annotation over the scatter plot, try the following code snippet:
x = linspace(0,3*pi,200);
y = cos(x) + rand(1,200);
meanVal = mean(y);
stdVal = std(y);
dim = [.2 .5 .3 .3];
str = sprintf('Mean: %f\n Std: %f',meanVal,stdVal);
More about annotations can be found here: http://in.mathworks.com/help/matlab/ref/annotation.html


En savoir plus sur Scatter Plots dans Help Center et File Exchange


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by