4.0

4.0 | 1 rating Rate this file 7 Downloads (last 30 days) File Size: 844 Bytes File ID: #19673

Sequency (Walsh) ordered Hadamard matrix

by Quentin Spencer

 

22 Apr 2008 (Updated 23 Jun 2008)

generate a sequency (Walsh) ordered Hadamard matrix of size N.

| Watch this File

File Information
Description

This function generates a sequency (Walsh) ordered Hadamard matrix of size N.

A previously submitted m file already implements this, but this is a much faster algorithm.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
Sequency(Walsh) ordered Hadamard matrix

MATLAB release MATLAB 7.6 (R2008a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
23 Apr 2008 Jos x@y.z

This function errors for me on "bi2de", but anyways, how does this compares to the following code:

n = 4 ; % should be power of 2
H2 = [1 1 ; 1 -1] ;
H = H2 ;
for i=2:log2(n),
   H = kron(H2,H) ;
end ;

16 Oct 2008 Thomas R

You could avoid the whole bin2dec business with

seqord = 2.^[0:(k-1)]*graycode' + 1;

20 Dec 2009 Royi Avital

Something is strange to me.
Let's say A is 4X4 matrix.
B = fwht(fwht(A)')
C = walsh(4) * A * walsh(4) /4
The problem is B doesn't equal C.
How come?

Thanks.

Please login to add a comment or rating.
Updates
23 Jun 2008

A reviewer pointed out that the previous version required the function bi2de, which is part of the communication toolbox. I have changed that function call to instead use bin2dec, which part of the base MATLAB distribution.

Tag Activity for this File
Tag Applied By Date/Time
application Quentin Spencer 22 Oct 2008 09:58:43
hadamard matrix Quentin Spencer 22 Oct 2008 09:58:43
sequency ordered Quentin Spencer 22 Oct 2008 09:58:43

Contact us at files@mathworks.com