Octave
Octave[edit]
GNU Octave is software featuring a high-level programming language, primarily intended for numerical computations. Octave helps in solving linear and nonlinear problems numerically, and for performing other numerical experiments using a language that is mostly compatible with MATLAB.
Preparation[edit]
In this exercise, you'll be generating graphic files by using Octave. In order to view these files, you'll save them in a special directory called "~www" which must be created in your home directory. The following instructions will instruct you on how to create this directory.
Create a directory to be served by the web server. If the directory already exists, no error will occur.
amrit-gupta@codermerlin:~$ mkdir --parents ~/www
Enter the directory.
amrit-gupta@codermerlin:~$ cd ~/www
Set the permissions so that the files can be accessed by the web server. If permission errors are encountered, re-execute this command.
amrit-gupta@codermerlin:~$ chmod -R a+rX ~/www
Graphing[edit]
- Be sure to execute
graphics_toolkit("gnuplot")
prior to graphing
Examples[edit]
3-D Sombrero Plot[edit]
tx = ty = linspace (-8, 8, 41)';
[xx, yy] = meshgrid (tx, ty);
r = sqrt (xx .^ 2 + yy .^ 2) + eps;
tz = sin (r) ./ r;
mesh (tx, ty, tz);
xlabel ("tx");
ylabel ("ty");
zlabel ("tz");
title ("3-D Sombrero plot");