How to randomly add variance in a graph plot
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Star Strider
il 28 Set 2015
Modificato: Star Strider
il 28 Set 2015
Experiment with the randn and rand functions to get the result you want.
2 Commenti
Vedere anche
Categorie
Scopri di più su 2-D and 3-D Plots 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!