how to add noise to my data
Show older comments
Hello. Suppose that I have a sensor connected to my unmanned air vehicle, that measures the height of the each point it sees on the surface. The sensor measures with %1 error, such as adding random noise to the actual height value. How can I generate such a data, say 500 values each of which is generated by %1 error?
Answers (2)
Azzi Abdelmalek
on 14 Feb 2013
Edited: Azzi Abdelmalek
on 14 Feb 2013
Example
t=0:0.1:100
y=sin(0.1*t) % Your signal
yd=y+rand(1,numel(y)).*y/100 % diturbed signal
plot(t,y,'r',t,yd,'g')
er=abs((yd-y)./y)
1 Comment
piyawat
on 3 Feb 2023
thank you!
piyawat
on 2 Feb 2023
0 votes
hello , i have a dataset that i want to add noise into to simulate how differential privacy works in smart metering. Do anyone know how i can achieve this thanks.
Categories
Find more on Waveform Generation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!