当前位置:网站首页>Matlab adds noise / disturbance to data
Matlab adds noise / disturbance to data
2022-06-29 21:27:00 【Dust_ Evc】
Normally distributed noise 、 Gaussian noise :
Generate a dimension of Custom_size, The mean for Mean, The variance of Var The noise of :
Noise = Mean + sqrt(Var)*randn(Custom_size);
among ,randn()
Returns a from the standard normal distribution ( The mean for 0, The variance of 1) The resulting random scalar .
example 1:
K>> Test = 3 + sqrt(0.5)*randn(1,102400); R = [mean(Test),sum((Test(1,:)-mean(Test)).^2)/(length(Test)-1)]
R =
3.0017565021829 0.501380264755088
example 2:
K>> Test = -7 + sqrt(0.01)*randn(1,102400); R = [mean(Test),sum((Test(1,:)-mean(Test)).^2)/(length(Test)-1)]
R =
-7.00017236519557 0.0100363870325614
To raw data RawData Plus the relative error level is Error_level The noise of :
NoiseData = RawData + Error_level*randn(size(RawData));
example :
The relative error level added to the data generated by the sine function is 0.1 The noise of :
% Defined function f(x)
f = @(x) sin(x);
% Generate discrete points
x1 = 0:1/100:2*pi;
F_Noise = f(x1) + 0.1*randn(size(x1)).*f(x1);
figure
plot(x1,F_Noise)
The relative error level here 0.1 It is also the standard deviation above , namely sqrt(Var)
Reference from / Recommended reading :
https://blog.csdn.net/xiaoyang591/article/details/118544118
Noise category and Matlab Add noise _qq_45479499 The blog of -CSDN Blog _matlab noise
边栏推荐
猜你喜欢
数字密码锁verilog设计+仿真+上板验证
CORDIC based Signal Processor desgn
Alibaba cloud released the atlas of China's robot industry (2022), 122 Pages pdf
习近平在湖北武汉考察时强调 把科技的命脉牢牢掌握在自己手中 不断提升我国发展独立性自主性安全性
Navigation exercises [microcomputer principles] [exercises]
"Xiaodeng" active directory batch user creation in operation and maintenance
Implementation and Simulation of ads131a04 ADC Verilog
String字符串的存储原理
verilog实现串口通信发送到数码管
Knowledge distilling learning notes
随机推荐
How to judge the quality of conductive slip ring from its appearance
Navigation [microcomputer principle]
THREEJS基础入门
LeetCode 1. 两数之和
每周招聘|DBA数据工程师,年薪35+ ,梦起九州,星河灿烂!
Detailed explanation of key points in implementing MES system in Enterprises
Implementation and Simulation of ads131a04 ADC Verilog
LSF-bsub命令
Varnish 503 no backend connection – varnish health check
[advanced ROS] Lecture 3 ROS file system and distributed communication
"Xiaodeng" active directory password expiration notification function is available for operation and maintenance
Viewing technological changes through Huawei Corps (V): smart Park
Shutter bottomnavigationbar toggle page hold
Topic39——78. 子集
我的创作纪念日
GoAhead 翻译—Active Server Pages
What is unique about MES system?
[advanced ROS chapter] lesson 2 custom header and source file encapsulation
PostgreSQL weekly news - June 22
管理人员应具备的基本素质