在 MATLAB 中,你可以使用以下方法对带有噪声的正弦波数据进行降噪处理:
1. 低通滤波器
Butterworth 低通滤波器
% 数据
data = ... % 你的数据
% 参数设置
fs = 50; % 采样频率
cutoff = 1; % 截止频率
order = 6; % 滤波器阶数
% 设计低通 Butterworth 滤波器
[b, a] = butter(order, cutoff/(fs/2), 'low');
% 应用滤波器
filtered_data = filtfilt(b, a, data);
% 绘图
figure;
subplot(2,1,1);
plot(data);
title('原始数据');
subplot(2,1,2);
plot(filtered_data);
title('滤波后的数据'<