Display standard deviations and data points on a graph

69 visualizzazioni (ultimi 30 giorni)
I have calculated the mean and standard deviations. I am attempting to display the mean and standard deviations along the x-axis. I would like to display the datapoints (which are 1 thru 5) along the y axis. My goal is to display the individual datapoints in the graph, showing where they fall around the mean and standard deviations. I am now getting the error: vectors must be the same length. What should I do to get rid of the error and display these approximate 100 datapoints correctly? Please let me know what I'm doing wrong.
x = [0 stdP1w1 meanP1 stdP1sig2];
y = datap1;
plot(x,y)
xticks([0 stdP1w1 meanP1 stdP1sig2])
xticklabels({'0','\sigma', 'mu','2\sigma'})
yticks ([0 1 2 3 4 5])
Error using plot
Vectors must be the same length.

Risposte (1)

Manas Meena
Manas Meena il 10 Feb 2021

Categorie

Scopri di più su Graphics Object Identification in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by