Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
GNU Octave Beginner's Guide

You're reading from   GNU Octave Beginner's Guide Become a proficient Octave user by learning this high-level scientific numerical tool from the ground up

Arrow left icon
Product type Paperback
Published in Jun 2011
Publisher Packt
ISBN-13 9781849513326
Length 280 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Jesper Schmidt Hansen Jesper Schmidt Hansen
Author Profile Icon Jesper Schmidt Hansen
Jesper Schmidt Hansen
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

GNU Octave
Credits
About the Author
About the Reviewers
1. www.PacktPub.com
2. Preface
1. Introducing GNU Octave FREE CHAPTER 2. Interacting with Octave: Variables and Operators 3. Working with Octave: Functions and Plotting 4. Rationalizing: Octave Scripts 5. Extensions: Write Your Own Octave Functions 6. Making Your Own Package: A Poisson Equation Solver 7. More Examples: Data Analysis 8. Need for Speed: Optimization and Dynamically Linked Functions Pop quiz - Answers

Installing Octave


Octave is primarily designed to run under GNU/Linux. However, you can also run Octave under Windows with only a few glitches here and there. The installation procedure, runs very smoothly under Windows. Let us start with this.

Windows

Installing Octave on Windows is straightforward. The steps are as follows:

  1. 1. Go to the Octave-Forge web site. Here there is a hyper link to a Windows installer. Download this installer onto your desktop or any other destination you may prefer.

  2. 2. Double-click on the installer icon.

  3. 3. You will see a greeting window. Click on the Next button.

  4. 4. The next window shows you the license agreement, which I recommend that you read. Click the Next button.

  5. 5. Now, you will have the opportunity to choose where Octave will be installed. The default path is usually fine. When you are happy with the installation path, click on Next.

  6. 6. The following window asks you to choose between different versions of the FFTW3 and ATLAS numerical libraries that Octave uses for Fourier transforms and linear algebra computations. These different versions are specially designed for different CPU architectures. You can also choose any additional packages you want to install, as shown in the following screenshot. Let us not worry about the details of the FFTW3 and ATLAS libraries at the moment, and just choose the generic versions for now.

  7. 7. Choose to install all additional packages by ticking the Octave-Forge box. Click on Next and Octave will get installed.

  8. 8. After the installation, you can change the menu folder if you wish. If you want, you can also check the README file, and if not, simply uncheck the box to the left of where you are asked whether you want to see the README file. Click Next, and you are done!

Note

This installation guide has been tested on 32-bit Windows 2000, Windows XP, and Windows 7.

Notice that Octave's interactive environment (the Octave prompt) may be launched when the installer exits. To close this, simply type:

octave:1> exit

or press the Ctrl key and the D key at the same time. We shall write this combination as Ctrl + D. By the way, Ctrl + D is a UNIX end-of-file indicator and is often used as a shortcut for quitting programs in UNIX-type systems like GNU/Linux.

Alternatively, you can run Octave under Windows through Cygwin, which is similar to the GNU/Linux environment in Windows. I will not go through the installation of Cygwin here, but you may simply refer to the Cygwin web page http://www.cygwin.com.

Note

If you install Octave version 3.2.4 under Windows, I strongly recommend that you leave out the oct2mat package. This package may prevent the plotting window to update properly. For instance, when you plot a graph, it will not appear in the plotting window. This is not an issue under GNU/Linux.

GNU/Linux

On many GNU/Linux distributions, Octave is a part of the standard software. Therefore, before installing Octave, check if it already exists on your computer. To do so, open a terminal, and type the following in the terminal shell:

$ octave

If Octave is installed (properly), you should now see Octave's command prompt. Now just exit by typing the following:

octave:1> exit

Alternatively, you may use CTRL + D, that is, press the control key and the D key at the same time.

If Octave is not installed, you can often use the distribution's package management system. For example, for Ubuntu, you can use the Synaptic Package Manager, which is a graphical tool to install and remove software on the computer. Please refer the following screenshot. In case of Fedora and CentOS, you can use YUM.

Note

Make sure that your package manager also installs a plotting program with Octave, for example, gnuplot.

Building Octave from the source under GNU/Linux

If you wish, you can also build Octave directly from the source code. However, I only recommend this if Octave is not available through the system's package manager. In order to build Octave from source, you will need (at least) the following:

  • The GNU make utility

  • Fortran and C/C++ compilers (GNU Compiler Collection (known as GCC) version 4.1 or later suffice)

  • gnuplot (to be on the safe side)

Fortunately, these software packages usually come with most GNU/Linux distributions. If not, you should be able use the package manager to install them.

You have been reading a chapter from
GNU Octave Beginner's Guide
Published in: Jun 2011
Publisher: Packt
ISBN-13: 9781849513326
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at AU $24.99/month. Cancel anytime