Filter löschen
Filter löschen

Display standard deviations and data points on a graph

20 Ansichten (letzte 30 Tage)
Sunshine
Sunshine am 29 Mai 2020
Beantwortet: Manas Meena am 10 Feb. 2021
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.

Antworten (1)

Manas Meena
Manas Meena am 10 Feb. 2021

Kategorien

Mehr zu Graphics Object Identification finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by