View License

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

» Watch video

Highlights from
Hankel transform

4.5 | 8 ratings Rate this file 24 Downloads (last 30 days) File Size: 136 KB File ID: #13371 Version: 1.0

Hankel transform



13 Dec 2006 (Updated )

Efficient implementations of the Hankel transform and the inverse Hankel transform, respectively.

| Watch this File

File Information

The Hankel transform of order n transforms rotationally symmetric inputs in a computationally efficient manner. In particular, the Hankel transform of order 0 is equivalent to the two-dimensional Fourier transform of a rotationally symmetric input. This package contains four implementations of the Hankel transform and the inverse Hankel transform, respectively.

"hat" and "ihat" perform the Hankel transform of order n with a direct integration using a matrix product. "ht" and "iht" perform the Hankel transform of order 0 by integrating the Bessel kernel a priori. "dht" and "idht" implement the quasi-discrete Hankel transform of integer order n. And, last but not least, "fht" and "ifht" implement the quasi fast Hankel transform of order n.

For more implementation details, please refer to the online documentation at

MATLAB release MATLAB 6.0 (R12)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (15)
18 May 2016 Ryan Grecco

17 May 2016 Ryan Grecco

I am attempting to use the quasi fast Hankel transform (fht.m) to help create a plane wave spectrum representation of a Bessel beam and I'm getting the following error towards the end of my MATLAB code:

Error using feval
Argument must contain a string or function_handle.

Error in fht (line 77)

Error in Bessel_FFT2 (line 30)

I inputted the radially dependent function "h", the maximum radius "R", and the maximum spatial frequency "K" using the following code:

% Initial Beam Parameters
c0 = 299792458; % speed of light in a vacuum
f = 2.45*10^9; % microwave frequency
w = 2*pi*f; % angular frequency
alpha = 0.0174533; % angle
syms r;
R = 25; % maximum radius
kk_z = (w*cos(alpha))/c0; % longitudinal wave number
kk = kk_z/cos(alpha); % wave number
K = w/c0; % maximum spatial frequency
kk_rho = kk*sin(alpha); % radial wave number

% Truncate
N = 2^20; % Number of samples

% Define Arrays
h = zeros(1,N);

% Define electric and magnetic field equations
h = cos(alpha)*besselj(1,r*kk*sin(alpha));


Anyone have any thoughts on how I can alter my code to avoid this error? Any help would be greatly appreciated.


Comment only
22 Aug 2015 Ahmed Fasih

Actually, author is currently at EPFL:

Comment only
22 Aug 2015 Ahmed Fasih

Link from Wayback Machine: folks, this is why you should put your code on Github. Or something.

Comment only
15 Aug 2015 Pradeep Kumar

ya d given link is not working n file do't open..

17 Jul 2015 Kyle Wilkin

The link for implementation details is not working. Does anyone have an updated link?

Comment only
26 Jun 2014 Ruibin Liu

Hi, I used a=[1 0 0 0 0 0 0] as the signal vector and tested it with hat.m just as b=hat(a), and the result is b=[0.5554 0.5554 0.5554 0.5554 0.5554 0.5554 0.5554]. But the inverse transform c=ihat(b) gives out c=[0.3198 0.1040 -0.0382 0.0163 -0.0057 0.0006 0.0005]. Why is that? Why c is not equal to a?

Comment only
15 May 2014 Spencer

Hi Xuesong. The "Undefined function" is because Matlab will not add folders titled "private" to the search path. Perhaps the name of that folder should be changed.

18 Mar 2014 NN

NN (view profile)

Great Submission, it helped quite a bit.

22 Aug 2013 Xuesong Hu

Hi, when I run the code, it returned to this error "Undefined function 'frdr' for input arguments of type 'double'". Does anyone know how to fix that?

Thank you very much in advance.

12 Apr 2013 Toader

Toader (view profile)

I studied hat.m and ihat.m functions. They work fine if the order it's very small, but the more I increase the order it's not working properly. Why?
Thank you.

Comment only
14 Jun 2012 Michael

Seems to work nicely, but what is the scaling for (the absolute value of) the output for ht.m?

25 Jan 2012 Nicolas Grisouard

19 Mar 2009 John Ferguson

Update for documentation:

Comment only
12 Mar 2007 Eunmi Choi

Thank you!

Contact us