How to randomly add variance in a graph plot
Mostrar comentarios más antiguos
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?
Respuestas (1)
Star Strider
el 28 de Sept. de 2015
Editada: Star Strider
el 28 de Sept. de 2015
0 votos
Experiment with the randn and rand functions to get the result you want.
Categorías
Más información sobre 2-D and 3-D Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!