做压缩感知构建小波基矩阵时没有像构建cos余弦基那么方便,可以直接采用'dct(N)' 获得,笔者在不断的搜寻下汇总了3个方法(已知长度,展开水平,和小波类型生成小波基矩阵),供大家参考,
1. 压缩感知稀疏基之离散小波变换_彬彬有礼的专栏-CSDN博客
function [ ww ] = dwtmtx( N,wtype,wlev )
%DWTMTX Discrete wavelet transform matrix
% This function generates the transform matrix ww according to input
% parameters N,wtype,wlev .
%Detailed explanation goes here
% N is the dimension of ww
% wtype is the wavelet type
% wlev is the number of decomposition level
%NOTE: The extension mode must be Periodization('per')
[h,g]= wfilters(wtype,'d'); %Decomposition low&high pass filter
L=length(h); %Filter length
h_1 = fliplr(h); %Flip mat