常用小波函數(shù)及Matlab常用指令_第1頁
常用小波函數(shù)及Matlab常用指令_第2頁
常用小波函數(shù)及Matlab常用指令_第3頁
常用小波函數(shù)及Matlab常用指令_第4頁
常用小波函數(shù)及Matlab常用指令_第5頁
已閱讀5頁,還剩181頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、常用小波函數(shù)及Ma t lab常用指令一、常用小波函數(shù)與標(biāo)準(zhǔn)傅立葉變換相比,小波分析中用到的小 波函數(shù)沒有唯一性,小波函數(shù)0)具有多樣性。 由此而帶來的問題是使用不同的小波基分析同一 個(gè)問題會(huì)產(chǎn)生不同的結(jié)果,沒有一個(gè)選擇最優(yōu)小 波基的統(tǒng)一方法。目前主要是通過用小波分析方 法處理信號(hào)的結(jié)果與理論分析結(jié)果的誤差萊判定 小波基的好壞,并由此選定小波基。常用的指導(dǎo)性選擇標(biāo)準(zhǔn)有:(1) 0、“、0、/ 的支撐長度。即當(dāng)時(shí)間或頻 率趨于無窮大時(shí),上述各量從有限值收斂到0的速 度;(2) 對稱型。它在圖象處理中對于避免移相非常有用;(3) ©和0 (若存在)的消失矩階數(shù)。對于壓縮非常 有用;正則性

2、。對信號(hào)或圖象的重構(gòu)獲得較好的平滑效 果非常有用。 1、Haar 小波10<x<l/2屮h = -1/2 < 兀 W10 其他waveinfo(,haar,)HAARINFO Information on Haar waveletHaar WaveletGeneral characteristics: Compactly supported wavelet, the oldest and the simplest wavelet.scaling function phi = 1 on 0 1 and 0 otherwisewavelet function psi = 1 on

3、 0 0.5, = -1 on 0.5 1 and 0 otherwise.Family Short name ExamplesHaarhaarhaar is the same as db1Orthogo nalyesBiorthogo nalyesCompact supportyesDWTpossibleCWTpossibleSupport width Filters length Regularity Symmetry12haar is not continuousyesNumber of vanishing moments for psi圖:10.500.20.40 60.311.21.

4、40危瀏小彼的小彼函數(shù)210200.20.40 60.811.21.4在命令窗口輸入2、db系列小波i DBINFO Information on Daubechies wavelets. Daubechies WaveletsGeneral characteristics: Compactly supported wavelets with extremal phase and highest number of vanishing moments for a given support width. Associated scaling filters arei minimum-phase

5、 filters.Daubechies db Family Short name Order N1 ExamplesN strictly positive integer db1 or haar, db4, db15OrthogonalyesBiorthogo nalyesCompact supportyesDWTpossibleCWTpossibleSupport width2N-1Filters length2NRegularityabout 0.2 N for large NSymmetryfar fromNumber of vanishing moments for psiNdb少卜波

6、的尺度函數(shù)I 3、Biorthogonal(biorNr.Nd)小波系主要特點(diǎn)體現(xiàn)在具有線性相位型,主要應(yīng)用于信 號(hào)和圖象的重構(gòu)中。通常表示為biorNr. Nd形式。Nr=1Nd=1,3,5;Nr=2Nd=2,456,8Nr=3Nd=1,3,57,9;Nr=4Nd=4Nr=5Nd=5;Nr=6Nd=8FamilyShort nameOrder Nr,Nd r for rec on struction d for decompositi on General characteristics: Compactly supported biorthogonal spline wavelets fo

7、r which symmetry and exact reconstruction are possible with FIR filters (in orthogonal case it is impossible except for Haar)BiorthogonalbiorNr= 1 , Nd = 1,3, 5Nr = 2,Nd = 2, 4,6, 8Nr = 3,Nd = 1,3, 5,7, 9Nr = 4 , Nd = 4Nr = 5, Nd = 5Nr = 6 5 Nd = 8Examplesbior3.15 bior5.5Orthogonal (正交)noBiorthogona

8、l(雙正交的)yesCompact supportDWTCWTSupport width 2Nd+1 for dec.yes possible possible 2Nr+1 for rec.5max(2Nr52Nd)+2 butFilters length essentiallybior Nr.NdIdIreffective lengtheffective lengthof Lo_Dof Hi_Dbior 1.122bior 1.362bior 1.5102bior 2.253bior 2.493bior 2.6133bior 2.8173bior 3.144bior 3.384bior 3.

9、5124bior 3.7164bior 3.9204bior 4.497bior 5.5911bior 6.817111 Regularity for psi rec. Nr-1 and Nr-2 at the knotsi Symmetryyesi Number of vanishing moments for psi dec. Nri Remark: bior 4.4,5.5 and 6.8 are such that rec on struction andi decomposition functions and filters are close in value.圖:bior2.4

10、-解小液的尺度函數(shù)510bior2.4構(gòu)小液的尺度函數(shù)bior2.4-解小波的小波函數(shù) 4、Coiflet(coifN)小波系由Daubechies構(gòu)造,N=1,2,3,4,5.具有比dbN更好的 對稱性。從支撐長度看,具有和db3N及sym3N具有 相同的支撐長度,從消失矩的數(shù)目看,具有和db2N 和symN相同的消失矩?cái)?shù)目。圖:1.5sifa卜波的尺度函數(shù)024681012141618Coiflets coifN = 1,2, .,5 co if 2, co if 4 yes yes yes possible possible General characteristics: Compac

11、tly supported wavelets with highest number of vanishing moments for both phi and psi for a given support width. Family Short name Order NExamplesOrthog onal Biorthogonal Compact support DWTCWTSupport width Filters length Regularity Symmetry6N-16Nnear fromNumber of vanishing moments for psi 2NNumber

12、of vanishing moments for phi 2N-1 5、SymletsA(symN)小波系Symlets函數(shù)系由Daub echi es提出的近似對稱的小波 函數(shù),是對db函數(shù)的改進(jìn),N=2,3,,8osym牛、波的尺度函數(shù)511'11>01234567 General characteristics: Compactly supported wavelets with least asymmetry and highest number of vanishing moments for a given support width. Associated scal

13、ing filters are nearlinear-phase filters. i Family iShort nameSymlets symN = 2,3, .Order N Examplessym25 sym8Orthog onalBiorthog onal Compact support DWTCWTSupport widthFilters lengthRegularity SymmetryNumber of vanishingyes yes yes possible possible 2N-1 2Nnear from moments for psi NDefiniti on:Fam

14、ilyShort name Orthogo nal Biorthogo nalCompact supportDWTCWT 6、Molet(morl)小波小波函數(shù)為:0(兀)=Ce_x2/2cos5x 尺度函數(shù)不存在,不具有正交性。morl(x) = exp(-xA2/2) * cos(5x)Morlet morl no no no no possibleSupport widthinfiniteEffective support -4 4 Symmetryyes 7、Mexican Hat (mexh)小波由Gauss函數(shù)的二階導(dǎo)數(shù)構(gòu)成。20(Q =厶/氣1 F)2/2V3具有很好的時(shí)頻局部化

15、能力,尺度函數(shù)不存在,不 具有正交性。1 Definition: second derivative of the Gaussian probability density function1 mexh(x) = c * exp(-xA2/2) * (1-xA2) where c = 2/(sqrt (3)*piA1/4)FamilyShort name Orthog onal Biorthogonal Compact support DWTCWTMexican hat mexhnonono no possible infinite -5 5 yesSupport width Effectiv

16、e support Symmetrymexihat小波的小液函數(shù)I 8> Meyer小波其小波函數(shù)和尺度函 數(shù)在頻率域定義,為 具有緊支撐的正交小 波。二、小波分析工具箱常用函數(shù)介紹1、Cwt功能:一維連續(xù)小波變換 格式:(1)coefs=cwt(s,scales,5wname5)(2)coefs=cwt(sJscales/wname7plot,)S為待分析信號(hào);scales為尺度向量:可以為離散值,表示為 31,32,33,.;也可以為連續(xù)值,表示為 amin:step:amax;還可以是混合情況,需要將離散 值寫前面,連續(xù)值寫后面a1 ,a2,a3 ,amin:step:amax返回

17、值為小波變換系數(shù)矩陣,矩陣的行數(shù)為尺度個(gè) 數(shù),每一行的值為該尺度小波變換系數(shù)在命令窗口輸入help cwt,可得指令的功能解釋。 help cwt CWT Real or Complex Continuous 1-D wavelet coefficients. COEFS = CWT(S,SCALES,'wname') computes the continuous wavelet coefficients of the vector S at real, positive SCALES, using wavelet whose name is fwname The signa

18、l S is real, the wavelet can be real or complex. COEFS = CWT(S5SCALES;wname7plot,) computes and, in addition, plots the continuous wavelettransform coefficients. COEFS =CWT(S5SCALES;wnamePLOTMODE) computes and,plots the continuous wavelet transform coefficients.i Coefficients are colored using PLOTM

19、ODE.i PLOTMODE = Ivl* (By scale) ori PLOTMODE = 'gib1 (All scales) ori PLOTMODE = 'abslvl' or 'Ivlabs' (Absolute value and By scale) ori PLOTMODE = 'absglb* or 'glbabs' (Absolute value and All scales)I %維連續(xù)小波變換I load noissin;I s=noissin(1:100);i ls=length(s);1 w=cwt(s

20、312.12,10.24,15.48,1.2,2:2:10;db 37plot); xlabel('時(shí)間')ylabel('變換尺度)Absolute Values of C弟b Coefficients for a = 12.12 10.24 15.48 1.2 2 .時(shí)間2、單尺度一維離散小波變換(2) 格式:(1) ca, cd=dwt (x, wname?)_ca, cd=dwt (x, Lo-D, Hi-D) 方式(1)直接對信號(hào)在指定的小波形式下進(jìn)行 分解,CQ為低頻系數(shù),cd為高頻系數(shù);方式(2)先利用小波濾波器指令wf訂ters求取 分解用的低通和高通濾

21、波器,然后將信號(hào)通過濾 波器進(jìn)行分解,可以達(dá)到同樣的效果。 %單尺度一維離散小波變換; load noissin; s=noissin(1:1000); subplot(411);plot(s) cal ,cd1 =dwt(s,'haar'); subplot(423);plot(ca1) ylabelChaacal)*); subplot(424);plot(cd1); ylabel('haar(cd1)'); Io_d5hi_d=wfilters('haar7d,);i ca2, cd2=dwt(s, lo_d, h i_d);i subplot(4

22、,2,5);plot(ca2)i ylabel('haar(ca2)'); subplot(4,2,6);plot(cd2)ylabel('haar(cd2)');10020030040050060070080090010000(方縣淚匸(邑u)脣 一|oo60oeo妣002C3單尺度一維離散小波逆變換idwt功能:單尺度一維離散小波逆變換X = idwt(CA,CD,'wname');X = idwt(CA,CD5Lo_R5Hi_R);X = idwt(CA3CD5'wname',L);X = idwt(CA,CD 丄 o_R,

23、Hi_R 丄)后兩種對信號(hào)中間長度為L的部分進(jìn)行重構(gòu) %單尺度一維離散小波逆變 換 load noissin; s=noissin(1:1000); subplot(6,2,1); plot(s) title('原始信號(hào)) cal Jcd1=dwt(sJ'db2'); x1 =idwt(ca1 ,cd1 ,'db2'); subplot(6,2,5) plot(x1) title('小波重構(gòu)') errxl max=max(abs(s-x1); errxl =s-x1;subplot(626) plot(errxl) title('

24、;小波重構(gòu)誤差') axis(0,1000,-2e-11,2e-11); lo_d,hi_d,lo_r,hi_r=wfilters Cdb2!);ca,cd=dwt(s4o_d,hi_d);x2=id wt(ca,cd ,lo_r,hi_r); subplot(6,2,9);plot(x2);titleC濾波器重構(gòu))errx2max=max(abs(s-x2)errx2=s-x2;subplot(6,2,10);plot(errx2) titled濾波器重構(gòu)誤差 axis(0,1000<2e-11,2e-11);原始信號(hào)05001000小波重構(gòu)ilvwvN05001000濾波器重

25、構(gòu)05001000賀10小小波重構(gòu)誤差X1O1波器重構(gòu)誤差050010004、小波濾波器wfilters格式:LoD,HiD 丄 o-R,Hi-R=wfilters(twname,)(2) f 1 ,f2=wfilters(twname,type,)i LO_D,HI_D,L0_R,HI_R = WFILTERSfwname') computes four filters associated with the orthogonal or biorthogonal wavelet named in the string 'wname'.LO_D, the decompo

26、sition low-pass filterHI_D5 the decomposition high-pass filter LO_R, the reconstruct!on lowpass filter HI_R5 the rec on structi on high-pass filter F1,F2 = WFILTERS(,wname7type,) returns the following filters:LO_D and HI_D if 'type* = 'd* (Decomposition filters)LO_R and HI_R if 'type'

27、; = 'r' (Reconstruction filters)LO_D and LO_R if 'type' = T (Low-pass filters)HI_D and HI_R if 'type' = (High-pass filters)'type'd'分解濾波器'type'二R重構(gòu)濾波器'type'=7低通濾波器 'type'二萬高通濾 波器舉例i lo_d,hi_d,lo_r,hi_r=wfilters(,haar'); figure(1); subplo

28、t(221);i stem(lo_d); title(1o-d of haar1);i subplot(222)i stem(hi_d); title('hi-d of haar') subplot(223); stem(lo);i title('lo-r of haar*)i subplot(224)i stem(hi_r)i title(*hi-r of haar*)0.8lo-d of db11.520.40.20hi-dof db1hi-r of db11.&0 0.5(>"1 111.521.55、dwtmode功能:離散小波變換拓展模

29、式格式:(1) dwtmode(2) dwtmode('mode')說明:當(dāng)對信號(hào)或圖像的邊緣進(jìn)行處理時(shí),需要 信號(hào)的邊緣進(jìn)行拓展。拓展模式有三種。該指令 在進(jìn)行離散小波變換或小波包變換時(shí),進(jìn)行模式 拓展設(shè)定。類型說明補(bǔ)零模式,缺省設(shè)定對稱延拓模式,即把邊緣值進(jìn)行復(fù)制平滑模式,對信號(hào)邊 緣進(jìn)行某種平滑處理6、wavedec功能:多尺度一維小波分解(一維多分辨分析函 數(shù))格式:(1) c, 1二wavedec (x, n, ' wnaine?)(2) c, 1二wavedec(x, n, Lo-D, Hi-D)用小波或分解濾波器對信號(hào)X進(jìn)行一維多尺度分解, n為尺度和正整

30、數(shù)。輸出參數(shù)c是由冋,叫皿戸,cdj組成,L是由叫的長度叫的長度,cd/的長度,的長度組成。s:c:L:舉例I %多尺度一維離散小波變換; load sumsin;| s=sumsin;I subplot(611) plot(s); title('原始信號(hào)') c)l=wavedec(s,3,'db1'); subplot(613)I plot(c);title(信號(hào)S3尺度分解');信號(hào)陽尺度分解L= 12512525050010007、appcoef功能:提取一維小波變換低頻系數(shù) 格式:(1) A=appcoef(c,l,wname,N)(2) A=

31、appcoef(c,l,'wname')(3) A=appcoef(c,l,Lo-R5Hi-R)(4) A=appcoef(c5l5Lo-R5Hi-R ,N)說明:該函數(shù)是一個(gè)一維小波分解函數(shù),用于從小波分解結(jié)構(gòu)C,L中提取一維信號(hào)的低頻 系數(shù)。格式(1)計(jì)算尺度N時(shí)的低頻系數(shù),格式(2)用于提取最后一個(gè)尺度的低頻系數(shù),格式(3)和(4)用濾波器提取低頻系數(shù)。舉例%提取一維小波變換低頻 系數(shù);load leleccum;s=leleccum(1:2000) subplot(421)plot(s);title('原始信號(hào)') c,l=wavedec(s535

32、9;db1'); cal =appcoef(c,l,'db1 ',1);i subplot(445)i plot(cal) ylabelfcal*);i ca2=appcoef(c,l5'd b12);i subplot(4,8,17)i plot(ca2);ylabel('ca2');原始信號(hào)enn8、Detcoef功能:提取一維信號(hào)小波變換高頻系數(shù)格式:(1) d=detcoef(c,l,N)提取N尺度的高頻系 數(shù)。(2) d=detcoef(c,l),提取最后一尺度的 高頻系數(shù)。i subplot(445)i plot(cdl)i ylab

33、el('ccH');i cd2=detcoef(c5l,2);i subplot(4,8,17)i plot(cd2); iylabelCcd2');舉例%提取一維小波變換高 頻系數(shù);load leleccum;s=leleccum(1:2000) subplot(421) plot(s);title('原始信號(hào)') c,l=wavedec(s535,dbr); cd1=detcoef(c,l51);原始信號(hào)0500九、Waverec功能:多尺度一維小波重構(gòu) 格式:(1) x=waverec(c, I, JwnameJ)(2) x=waverec(c5l

34、5Lo-R5Hi-R)(3) x= waverec (wavedec (x,N/wavename5)/ wavename5)】說明:該函數(shù)用指定的小波函數(shù)或重構(gòu)濾波器對 小波分解結(jié)構(gòu)(C,L)進(jìn)行多尺度一維小波重構(gòu)。舉例:«subplot(312) plot(a) title('重構(gòu)信號(hào)) err=s-a; subplot(313) plot(err) titlef 誤差')1 %多尺度一維小波重 構(gòu);I load leleccum;I s=leleccum(1:3920)i subplot(311) plot(s); titlef原始信號(hào)')i c5l=wa

35、vedec(s53,'d b5J;i a=waverec(c5l,'db5')原始信號(hào)0JO050010001500 重嚮啓 T 2500300035004000I十、upwlev功能:單尺度一維小波分解的重構(gòu)格式:(1) nc, nl, ca=upwlev (c, 1, ? wname?)(2) nc, nl, ca=upwlev (c, 1, Lo-R, Hi-R)說明:該函數(shù)用于對小波分解結(jié)構(gòu)C,L進(jìn)行單尺 度重構(gòu),返回上一尺度的分解結(jié)構(gòu)并提取最后一 尺度的低頻分量。%單尺度一維小波分解的重構(gòu);load sumsin;s=sumsi n;subplot(611)p

36、lot(s);title(源始信號(hào)')c,l=wavedec(s,3,'db1');subplot(613)plot(c)title('尺度3的小波分解結(jié)構(gòu))等效于質(zhì)J©陽vedec(s越觸站)xlabel('尺度3的低頻系數(shù)和尺度3、2、1的高頻系數(shù)')nc,nl=upwlev(c,l,'db1'); subplot(615);plot(nc);title('尺度2的小波分解結(jié)構(gòu)Jxlabel('尺度2的低頻系數(shù)和尺度2、1的高頻系數(shù)')原始信號(hào)50-5IIIIIIIII010020030040

37、06006007008009001000g |iiiiiii_ '01002003004005006007008009001000尺度了的低頻系數(shù)和尺度弘N 1的高頻系數(shù)尺度3的小波分解結(jié)構(gòu)50-50AAAA/VWVWWWWVWVW尺度2的小波分解結(jié)構(gòu)2003004005006007008009001000尺度2的低頻系數(shù)和尺度N 1的高頻系數(shù)L= 1251252505001000十一、Wrcoef功能:對一維小波系數(shù)進(jìn)行單支重構(gòu)I 格式:x=wrcoef(,type,,c,wname;N) x=wrcoef(£type,c,l,Lo-R,Hi-R,N)(3) x=wrcoe

38、f(ttype,c,l,wname,) x=wrcoef(ttype,c,l,Lo-R,Hi-R)說明:對一維信號(hào)的分解結(jié)構(gòu)C,L用指定的小波 函數(shù)或重構(gòu)濾波器進(jìn)行重構(gòu)。當(dāng)'type二a,時(shí),對 信號(hào)的低頻部分進(jìn)行重構(gòu),此時(shí)N可以為0;當(dāng) 'type二cT時(shí),對信號(hào)的高頻部分進(jìn)行重構(gòu),此時(shí) N為正整數(shù)。原始信號(hào)%對一維小波系數(shù)進(jìn)行單支重構(gòu); load sumsin;s=sumsi n;subplot(611) plot(s);title。原始信號(hào)) c5l=wavedec(s5 5,'sym4); a5=wrcoef(,a,c,l/sym4,5);subplot(613

39、) plot(a5) title('低頻部分重構(gòu)信號(hào)') a51 =wrcoef(,dc,l/sym4,J5);subplot(615) plot(a51) title('高頻部分重構(gòu)信號(hào)')5 !jjjjjjjj0仍 YYYY 單杯巧Iiiiiiiii01002003004005006007008009001000低頻部分重構(gòu)信號(hào)22I|iiiiiii'01002003004005006007008009001000高頻部分重構(gòu)信號(hào)十二、upcoef功能:格式:一維系數(shù)的直接小波重構(gòu)(1) y=upcoef('0',x,'wna

40、me',N)(2) y=iipcoef('0',x,'wname',N丄)(3) y=upcoefCO,x,Lo-R,Hi-R,N)(4) y=upcoef(<0,x,Lo-R,Hi-R,N,L)(5) y=upcoef(<0,x,wname,)(6) y=upcoefCO,x,Lo-R,Hi-R)說明:該函數(shù)用于一維小波分析,它用來計(jì)算向 量X (信號(hào)系數(shù))向上N步的重構(gòu)小波系數(shù),N為正 整數(shù)。如果0 = 2,對低頻系數(shù)進(jìn)行重構(gòu);如果0 = d,對高頻系數(shù)進(jìn)行重構(gòu);對于(2)和(4),則 是對向量X中間長度為L部分進(jìn)行重構(gòu)。原始信號(hào)尺度1的

41、低頻系數(shù)宛1向上一步重構(gòu)信號(hào)cd1=detcoef(c,l,1);scd1 =upcoef('d',cd1 ,'db6',1); subplot(626);plot(scd1); title('尺度1的高頻系數(shù)ccM 向上一步重構(gòu)信號(hào)'); axis(0,2000,-20,20); f1,f2=wfilters('db6','r'); ca2=appcoef(c,l/db6',2); 10Qlsca2=upcoef('a',ca2,f1 ,f2,2); 'subplot(629) ;

42、plot(sca2);title('尺窿2的低頻系數(shù)ca2 向上2步重構(gòu)信號(hào),);axis(0,2000,200,600); Load leleccum; s= leleccum(1:2000); Plot(s) titlefM 始信號(hào)); c,l=wavedec(s,3,'db6'); cal =appcoef(c,l,'db6',1); seal =upcoef('a',ca1 ,'db6',1); subplot(622) ;plot(sca1); title('尺度1的低頻系數(shù)cal 向上一步重構(gòu)信號(hào)

43、9;); axis(0,2000,200,600); seal I=upcoef('a',ca1 ,'db6',1I subplot(625) ;plot(sca11); title(lca1 向上一步只取 1000 點(diǎn)重構(gòu)信號(hào)');axis(0,2000,200,600);原始信號(hào)尺度1的低頻系數(shù)宛1向上一步重構(gòu)信號(hào)600向上一步只取1000點(diǎn)重構(gòu)信號(hào)尺度1的高頻系數(shù)旳1向上一步重構(gòu)信號(hào)400600100016002000尺度2的低頻系數(shù)向上2步重構(gòu)信號(hào)原始信號(hào)尺度1的低頻系數(shù)宛1向上一步重構(gòu)信號(hào)十三、wpdec功能:一維小波包的分解格式:(1) T=

44、wpdec(X, NJwname; E, P)說明:wpdec是一個(gè)一維小波包分解函數(shù)。I它根據(jù)小波函數(shù)'wname?(參見wfilters)、炳標(biāo)準(zhǔn)E和參數(shù)P對信 號(hào)X進(jìn)行N層小波包分解,并返回小波包分解結(jié)構(gòu)T, T為樹結(jié)構(gòu)。1 E is a string containing the type of entropy (see WENTROPY):E = 'shannon; 'threshold1,五orm; log energy*, 'sure "user'.I P is an optional parameter: 'shanno

45、n* or log energy1: P is not usedI 'threshold* or 'sure': P is the threshold (0 <= P) ,norm,: P is a power (1 <= P)'user':P is a string containing the name of an user-defined function. load noisdopp; x=noisdopp; t=wpdec(x,35'db1 ','shannon'); plot(t)0.9 -0.8

46、-0.7 -0.6 -0.5 -0.4 -0.3 -0.2 -0.1 -01110.81Tree Decompositiondata for node: or (0,0).108 -6 -4 -20-2-4 -6 -8data for node: or (0,0).data for node: or (0,0).1°2004006008001000Tree DecompositionTree Decompositiondata for node: (2) or (1,1).3r2 -1 -0-1-2-3 -4 -100 200300400500data for

47、node: or (2,0).20-15 -'105 -0-5 -10-15 I11150100150200250Tree Decompositiondata for node: (5) or (2,2).3 I 1>210-1-2-341111150100150200250data for node: or (2,3).4111132 -1 -0 -1-2-3iiii50100150200#data for node: or (3,0).20 1 1 1 1 1Tree Decomposition#data for node: or (3,0).20 1 1 1 1 1#dat

48、a for node: or (3,0).20 1 1 1 1 1(0,0)15 -10 -5 -0-5 -10 -15 -20 -25111120406080100121十四、wprec功格舉能:一維小波分解的重構(gòu)x=wprec(t)load noisdopp; x=noisdopp; figure(1); subplot(211); plot(x) titleCJM 始信號(hào)') t=wpdec(x,3,'db1'shannon'); x1=wprec(t) subplot(212)plot(x1)title(重新信號(hào)')原始信號(hào)重構(gòu)信號(hào)十五、wpco

49、ef功能:計(jì)算小波系數(shù)格式:(1)x=wpcoef (t, n)I (2) x=wpcoef (t)說明:wpcoef是一個(gè)一維或二維的小波包 分析函數(shù)。格式(1)返回與節(jié)點(diǎn)n對應(yīng)的 系數(shù)。如果n不存在,x = ;1 x=wpcoef (t)等效于x= wpcoef (t, 0)load noisdopp; x=no isdopp;figure(1) subplot(311) plot(x) title(源始信號(hào)) t=wpdec(x,3,'db1 ','sha nnon'); cfs21 =wpcoef(t,2,1 ); cfs22=wpcoef(t,2,2)

50、;cfs31 =wpcoef(t,3,1 ); cfs32=wpcoef(t,3,2);subplot(323); plot(cfs21); title('小波包2,1的系數(shù)J; subplot(324); plot(cfs22);title('小波包2,2的系數(shù)J; subplot(325); plot(cfs31);title('小波包3,1的系數(shù)*);subplot(326); plot(cfs32);title('小波包3,2的系數(shù)J;原始信號(hào)10小波包即的系數(shù)十六、wprcoef功能:小波包分解系數(shù)的重構(gòu);格式:x= wprcoef (t, n)說明:

51、wprcoef是一個(gè)一維或二維的小波包 分析函數(shù),計(jì)算節(jié)點(diǎn)n的小波包分解系數(shù)的 董初信號(hào)。1 X= wprcoef (t) = wprcoef (t, 0)該函數(shù)一次只能對一個(gè)節(jié)點(diǎn)進(jìn)行重構(gòu),不能 同時(shí)對多點(diǎn)進(jìn)行重構(gòu),可以通過多次調(diào)用 實(shí)現(xiàn)。 load noisdopp;x=noisdopp(1:1000); figure(1) subplot(311) plot(x) title('原始信號(hào)')i t=wpdec(x53,'db1 Vshannon*);i refs=wprcoef(t,2,0);i cfs21 =wpcoef(t,2,0); subplot(312) plot(cfs21) titled小波包節(jié)點(diǎn)(2, 0)系數(shù)') subplot(313) plot(rcfs)titled重構(gòu)小波包節(jié)點(diǎn)(2, 0)信號(hào))

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論