How to add random Noise between 2% in the dataset

조회 수: 7(최근 30일)
Stephen john
Stephen john 2022년 3월 17일
댓글: Jeff Miller 2022년 3월 18일
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
  댓글 수: 2
Stephen john
Stephen john 2022년 3월 18일
@Walter Roberson if you share for both methods ,i will be very grateful

댓글을 달려면 로그인하십시오.

답변(1개)

Jeff Miller
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
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!

Translated by