No BSD License  

Highlights from
haarmtx

3.0

3.0 | 5 ratings Rate this file 37 Downloads (last 30 days) File Size: 1.25 KB File ID: #4619

haarmtx

by Frédéric Chanal

 

13 Mar 2004 (Updated 16 Mar 2004)

Compute a n*n Haar matrix.

| Watch this File

File Information
Description

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  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (5)
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.

05 Nov 2006 peter vnucak

nice one

05 Nov 2006 peter vnucak

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

%N=2^n;
h=zeros(N,N);
h(1,1:N)=ones(1,N)/sqrt(N);

for k=1:N-1
  p=fix(log(k)/log(2));
  q=k-(2^p);
  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);
  

  end
end

08 Jul 2007 liberty liberty

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

11 Feb 2009 tr sa  
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
audio processing Frédéric Chanal 22 Oct 2008 07:16:17
video processing Frédéric Chanal 22 Oct 2008 07:16:17
haar Frédéric Chanal 22 Oct 2008 07:16:17
signal processing Frédéric Chanal 22 Oct 2008 07:16:17
transformation Frédéric Chanal 22 Oct 2008 07:16:17
wavelet Frédéric Chanal 22 Oct 2008 07:16:17
haar fasfa xxx 03 Nov 2010 09:27:47

Contact us at files@mathworks.com