How to randomly add variance in a graph plot
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Star Strider
2015년 9월 28일
편집: Star Strider
2015년 9월 28일
Experiment with the randn and rand functions to get the result you want.
댓글 수: 2
참고 항목
카테고리
Help Center 및 File Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!