如何在matlab上做一个交叉小波谱

2025-02-24 23:45:15
推荐回答(1个)
回答1:

% By lyqmath

% DLUT School of Mathematical Sciences 2008

clc; clear all; close all;
load leleccum; % 载入信号数据
s = leleccum;
Len = length(s);
[ca1, cd1] = dwt(s, 'db1'); % 采用db1小波基分解
a1 = upcoef('a', ca1, 'db1', 1, Len); % 从系数得到近似信号
d1 = upcoef('d', cd1, 'db1', 1, Len); % 从系数得到细节信号
s1 = a1+d1; % 重构信号
figure;
subplot(2, 2, 1); plot(s); title('初始电源信号');
subplot(2, 2, 2); plot(ca1); title('一层小波分解的低频信息');
subplot(2, 2, 3); plot(cd1); title('一层小波分解的高频信息');
subplot(2, 2, 4); plot(s1, 'r-'); title('一层小波分解的重构信号');