How to randomly add variance in a graph plot
1 view (last 30 days)
Show older comments
I'm graphing y=x, but I want to add a second plot of black stars where y is randomly + or - 0.25 I know the code to plot is
plot (x,y2, 'k*')
but how do I randomly add noise to create y2?
0 Comments
Answers (1)
Star Strider
on 28 Sep 2015
Edited: Star Strider
on 28 Sep 2015
Experiment with the randn and rand functions to get the result you want.
2 Comments
See Also
Categories
Find more on Graph and Network Algorithms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!