MATLAB程序测试

% Interference cancellation

% 悦博特北京科技有限公司 lxdawn@163.com

%
clear all, close all, clc
time = 0:0.1:10;
r = sin(time*4*pi);

% Random initialisation of the W weight and b bias
R = length(time); % number of inputs
S = R;
% p parasite signal
p = randn(size(r));

% snoised signal
t = r + 0.833*p;

% W and b initialisation
[W,b] = initlin(p,t);
figure(1),plot(time,t)
title('target to be predicted = noised signal'),xlabel('time')

[y,e] = adaptwh(W,b,p,t,0.1);

figure(2)
plot(r,':');
hold on
plot(e)
title('useful signal = error signal')
hold off

figure(3)
plot(r-e)
title('error = useful signal - reconstructed signal')
xlabel('time')
%final weight and bias
w,b

 

 

posted @   lxdawn  阅读(3)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示