Display standard deviations and data points on a graph
26 ビュー (過去 30 日間)
古いコメントを表示
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.
0 件のコメント
回答 (1 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!