Description 
2D is fully functional.
3D is an reallyreally almost there implementation. It runs, and (should be) bugfree. Help is provided and code is well commented.
The last unimplemented aspect is the ability to "roll" (in addition to yaw and pitch) the 3D kernel. The math to implement it is in the code, and all you need to do is uncomment it. I didn't do it because I'm done with it and didn't feel like thinking about the math to create an appropriatelysized meshgrid.
Also included is the 2D version and a little nofrills utility to view 3D matrices.
This was created by heavily modifying 23253: gabor_fn.m by Gao Yang
>> help gabor3_fwb
Returns 3D gabor filter.
gb=GABOR_FWB(aspect,theta,bw,psi,sigma,sz)
[aspecta, aspectb]
= 2 element array giving aspect ratios for 2 minor axis
(eg: [0.5, 1], for major < minoraxis1, major = minoraxi2)
[theta,phi]
= yaw and pitch of major axis (02*pi)
roll isn't implemented, sorry.
bw = spatial bandwidth in pixels (decreasing fine detail,), (eg: >=1)
scales the frequency of the cosine modulation
psi, = phase shift, [optional, default: 0]
sigma = scales the falloff of the gaussian, (must be >=2) [default: = bw]
+ can set to 'auto' to maintain default functionality
[x y z] = size of gabor kernel created [optional, size set automatically
to 3 standard deviations of gaussian kernel]
example call: G = gabor3_fwb([1 1], [pi/4 pi/4], 10, 0, 20);
>> help gabor_fwb
Returns 2D or 3D gabor filter.
gb=gabor_fwb(aspect,theta,bw,psi,sigma,sz)
aspect = aspect ratio (ratio of x to y), (eg: 0.5, for major < minor axis)
theta = angle in rad of major axis, (02*pi)
bw = spatial bandwidth in pixels (decreasing fine detail,), (eg: >=1)
scales the frequency of the cosine modulation
psi = phase shift, [optional, default: 0]
sigma = scales the falloff of the gaussian, (must be >=2) [default: = bw]
+ can set to 'auto' to maintain default functionality
sz = size of gabor kernel created [optional, size set automatically
to 3 standard deviations of gaussian kernel]
>> help slice_slider
slice_slider(3d_volume) plots a 3d volume 1 slice at a time
on the current figure.
A slider bar allows you to slice through the volume.
Assumes that you want to look at the third dimension using
imagesc and the default colormap.
Fix it/make it better if you want to.
