필터 지우기
필터 지우기

How to add 5% random Noise to the dataset in MATLAB

조회 수: 21 (최근 30일)
Med Future
Med Future 2022년 2월 26일
댓글: Image Analyst 2022년 3월 1일
Hello Everyone, I hope you are doing well.
I have the dataset attached below. i want to add 5% random Noise to the dataset. How can i do that in matlab
Any help appreciated :)
  댓글 수: 2
Jan
Jan 2022년 2월 26일
5% of what? Giving a percentage is a realtive expression. Then you have to define to which value this relation belongs to: 5% of maximum absolute value of the signal, 5% of each current value, 5% standard-deviation of the signal, 5% of the range, ...?
The actual data do not matters, but the definition of what you want to do is important.
Med Future
Med Future 2022년 2월 27일
@Jan 5% percent of the curent value. Like if we have value of 200 the range should be between 205 and 195

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

답변 (1개)

Image Analyst
Image Analyst 2022년 2월 27일
Did you try
s = load('datasetvalue.mat')
dataset = s.dataset;
[rows, columns] = size(dataset)
noise = 0.1 * dataset .* (rand(rows, columns) - 0.5);
noisyData = dataset + noise;
  댓글 수: 13
Med Future
Med Future 2022년 3월 1일
@Image Analyst have you seen my above data, the 51 column has different value did it uniformly distributed?
Image Analyst
Image Analyst 2022년 3월 1일
Yes, here is your data. It is not uniform. What is your definition of uniform?
You can make uniformly distributed data with rand, but if you're varying the mean value depending on another value (the pixel value in your data) then it's no longer uniform. You would have to have the mean and stardard deviation of the noise be not dependent on your signal values.

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

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by