简体   繁体   English

与白噪声产生有关的误差

[英]error related to white noise generation

i have a problem and please help me to fix it.suppose that we have following data 我有问题,请帮我解决。假设我们有以下数据

f1=100;
 f2=200;
 T=1./f1;
 N=3;
 m=500;
 t=(0:(N*T)/m:(N*t))';
 wn=rand(length(t),1).*2-1;

but when i tried to see value of wn,it shows me following one 但是当我尝试查看wn的值时,它向我显示了以下内容

0.6294

i need it for following code 我需要以下代码

x = 20.*sin(2.*pi.*f1.*t) + 30.*cos(2.*pi.*f2.*t) + A3.*wn;

A3 is amplitude for white noise.but main problem is follwing A3是白噪声的幅度,但主要问题是跟随

1.should not wn be array instead of scalar? 1. wn应该不是数组而不是标量吗?

2.why it shows me the same value of wn at each time i type wn? 2.为什么每次输入wn时都显示相同的wn值?

as you see this is model of two deterministic periodic model +white noise 如您所见,这是两个确定性周期模型+白噪声的模型

t=(0:(N*T)/m:(N*t))';

t is using itself in it's definition. t在定义中使用了自己。 That can't be right. 那是不对的。 I would suspect if you called clear and then run this script that line would error. 我怀疑如果您调用clear ,然后运行此脚本,该行将出错。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM