How to add random Noise between 2% in the dataset
조회 수: 7(최근 30일)
표시 이전 댓글
Hello I Hope you are doing well.
I have the following dataset. I Want to add random noise 2% in the data. How can i do that in MATLAB.
I also want to randomly select the noise between 0.5 to 2%.
Can anybody help me in this
답변(1개)
Jeff Miller
2022년 3월 17일
Do you mean that you want to multiply each value in the dataset by a random number between 1.005 and 1.02, with all random numbers equally likely in that range? This could be done with something like:
multiplier = 1.005 + rand(size(values))*(1.02-1.005);
values = values *. multiplier;
댓글 수: 5
Jeff Miller
2022년 3월 18일
@Stephen john Sorry I am not following you. Maybe you could give a few numerical examples?
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!