How do I plot the line of the mean value on the same graph?
1 view (last 30 days)
Show older comments
That title may not have fully conveyed my question, but here it goes.. I've created 3 random column vectors and plotted what they all look like on top of each other with this code:
c1=randn(30,1)*50; c2=randn(30,1)*50+300; c3=randn(30,1)*50+600; d1=[c1 c2 c3];
plot(d1) hold
Now I would like to plot lines which are the min, max, and mean of c1, c2, and c3 respectively. I've tried entering:
plot([0:30],mean(c1),'b')
but this only gives me 30 points and doesn't give me the option to use any line specifications, please help.
0 Comments
Answers (0)
See Also
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!