📄 generator_noise.m
字号:
%%% generator noise random vector from variance matrix%%%
%%
%generator_noise%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% input: W square matrices and simetric matrices,
%%It is assumed that W is a covariance matriz...
%% can be improved ....
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function wt=generator_noise(W,N)
%randn('state',1)
R = chol(W);
nw=size(W,2);
wt=[];
for i=1:N
g=randn(nw,1);
xt=R'*g;
wt=[wt xt];
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -