Haar scaling & wavelet functions

2013 Aug 16 Masahiro Mizutani

HaarScale[j, k, x]=(Subscript[ϕ, j, k])[x]=(2^(j/2))ϕ[(2^j)x-k] 
ψ(x)=ϕ(2x)-ϕ(2x-1)
Haarwavelet[x, j, k] = (Subscript[ψ, j, k])[x]= (2^(j/2))ψ[(2^j)x-k]

定義

Haar scaling function

HaarScale[x]=(Subscript[ϕ, 0, k])[x]=ϕ[x-k]

HaarScale[x_Real]:=If[x<0 || 1 <x, 0,1]

Plot[HaarScale[x],{x, -1,2},AspectRatio->Automatic]

Haar wavelet function

Haarwavelet[x]=ϕ[2x] -ϕ[2x-1]

haarwavelet[x_Real]:=HaarScale[2x]-HaarScale[2x-1]

Plot[haarwavelet[x],{x,-1,2}]

正規化された一般化Haar Scaling & Wavelet関数

Mathematicaの省略可能な引数機能を使う。

正規化Haar Scaling function

Haarscale[x, j, k] =(Subscript[ϕ, j, k])[x]= (2^(j/2))ϕ[(2^j)x-k]

Haarscale[x_Real, j_Integer,k_Integer]:=2^(j/2)HaarScale[2^j x-k]

Plot[Haarscale[x,1,3],{x,-1,3}]

Plot[Haarscale[x,2,3],{x,-1,2}]

Plot[Haarscale[x,3,3],{x,-1,2}]

NIntegrate[Haarscale[x,2,3]^2,{x,0,2}]

例

f2[t_]:=-2HaarScale[t,0,-1]+2 HaarScale[t,0,0]+3HaarScale[t,0,1]+3HaarScale[t,0,2]-HaarScale[t,0,3]

Plot[f2[t],{t,-2,5}]

f3[t_]:=-2HaarScale[t,1,-1]+2 HaarScale[t,1,0]+3HaarScale[t,1,1]+3HaarScale[t,1,2]-HaarScale[t,1,3]

Plot[f3[t],{t,-2,5}]

正規化Haar wavelet function

Haarwavelet[x, j, k] =(Subscript[ψ, j, k])[x]=(2^(j/2)) ψ[(2^j)x-k] = =ϕ[(2^(j+1))x-2k] -ϕ[(2^(J+1))x-2k-1]

Haarwavelet[x_Real, j_Integer, k_Integer]:=2^(j/2)haarwavelet[2^j x-k]

Plot[Haarwavelet[x,0,3],{x,2,4}]

Plot[Haarwavelet[x,1,3],{x,-1,2}]

Plot[Haarwavelet[x,2,3],{x,-1,2}]

Plot[Haarwavelet[x,3,3],{x,-1,2}]

直交性

NIntegrate[Haarwavelet[x,2,3]^2,{x,0,2}]

Plot[{Haarscale[x,1,0],Haarwavelet[x,1,0]},{x,-1,2}]

Plot[{Haarwavelet[x,1,3],Haarwavelet[x,1,2]},{x,0,2.5}]

Plot[{Haarwavelet[x,1,3],Haarwavelet[x,2,3]},{x,0,2.5}]