Sombrero

From Coder Merlin
Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder

3-D Sombrero Plot[edit]

octave:2> tx = ty = linspace (-8, 8, 41);

octave:3> [xx, yy] = meshgrid (tx, ty);

octave:4> r = sqrt (xx .^ 2 + yy .^ 2) + eps;

octave:5> tz = sin (r) ./ r;

octave:6> mesh (tx, ty, tz);

octave:7> xlabel ("tx");

octave:8> ylabel ("ty");

octave:9> zlabel ("tz");

octave:10> title ("3-D Sombrero Plot");

We can now print the plot to a file with:

octave:11> print -dpng sombrero.png

It might take a few seconds to produce the file; be patient.

To enable web server access, you need to adjust the file's permissions. You can do this from within Octave using the following command:

octave:12> system("chmod -R a+rX ~/www")

When the prompt returns, you can view the file in a browser. Every user has a personal URL. Your file can be viewed here: You must be logged in to view your personal URL.