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
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步