Special functions in Matlab
- by favala
I'm trying to get a picture like the following:
http://upload.wikimedia.org/wikipedia/en/e/e6/Airy-3d.svg
What am I doing wrong?
[x,y]=meshgrid(-1:.1:1,-1:.1:1);
surf(x,y,(2*besselj(1,2*pi*sqrt(x.^2+ y.^2)/sqrt(x.^2+ y.^2)).^2)
Also... kind of a side note, but if I used ndgrid instead of meshgrid here my x's and y's would switch right?