No License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

3.4 | 8 ratings Rate this file 15 Downloads (last 30 days) File Size: 1.25 KB File ID: #4619 Version: 1.0




13 Mar 2004 (Updated )

Compute a n*n Haar matrix.

| Watch this File

File Information

Used in image compression, the haar transform is an alternative to the DCT transformation. This file compute an n*n Haar matrix. (same use as "dctmtx")

MATLAB release MATLAB 6.5 (R13)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (8)
22 Aug 2015 Burak Cakmak  
13 Jul 2012 Danila

Danila (view profile)

Thank you for this function!

15 May 2012 David Smith  
11 Feb 2009 tr sa

tr sa (view profile)

08 Jul 2007 liberty liberty

don't use "inf" as a variable name!!!!

05 Nov 2006 peter vnucak

nice one.rhis is my work:
function h=haAar2(N)


for k=1:N-1
k1=2^p; t1=N/k1;
k2=2^(p+1); t2=N/k2;
for i=1:t2
h(k+1,i+q*t1) = (2^(p/2))/sqrt(N);
h(k+1,i+q*t1+t2) =-(2^(p/2))/sqrt(N);


05 Nov 2006 peter vnucak

nice one

09 Jan 2005 Jerome Watkins

Properly constructs the Haar matrix. The code is not vectorized, but this is fine because you only need to call the function once and can reuse the matrix from that point onward.

Contact us