# Octave: A Free, High-Level Language for Mathematics

in
A quick look at a language designed to manipulate matrices and provide other numerical functions.
Other Capabilities

Although Octave has very strong matrix capabilities, it has many other features as well. For example, it has routines to manipulate polynomials. A polynomial is entered as a vector of coefficients; so, for example, the polynomial x3+3x2+2x-1 can be represented by the vector:

```octave:19 mypoly=[1 3 2 -1]
mypoly =
1   3   2  -1
```

We can then differentiate mypoly using the command:

```octave:20 polyderiv(mypoly)
ans =
3  6  2
```
or integrate it by:
```octave:21 polyinteg(mypoly)
ans =
0.25000   1.00000   1.00000  -1.00000   0.00000
```
Note that Octave uses zero as the constant of integration. We can also evaluate the polynomial at a given value; thus, to find the value of mypoly(2) use the command:
```octave:22 polyval(mypoly,2)
ans = 23
```
If we want the roots of the polynomial, use:
```octave:23 roots(mypoly)
ans =
-1.66236 + 0.56228i
-1.66236 - 0.56228i
0.32472 + 0.00000i
```
Note that Octave is quite happy with complex numbers, even though all the examples I've given have been real. There are also routines to convolve and deconvolve polynomials, form companion matrices and characteristic polynomials, and form a partial fraction representation of the quotient of two matrices.

Other features include functions to solve systems of nonlinear equations, solve differential and differential-algebraic equations, perform quadrature and collocation, as well as statistics, control theory, signal processing, image processing and optimization routines. The manual indicates areas where the developers hope to extend Octave's capabilities.

Graphics

Octave provides graphics capabilities via the Gnuplot program, which has to be obtained separately. The advantage of this is that Octave supports all the output devices Gnuplot supports, including the Linux terminal, which might be of interest if you have a low-memory system.

Octave provides two low-level graphics functions, gplot and gsplot, that behave almost exactly like the Gnuplot functions plot and splot, and also provides several higher-level plotting functions based on the graphics functions found in Matlab 3.5. Two and three-dimensional plotting commands are also available.

If you are familiar with Gnuplot, then you will probably appreciate the flexibility offered by access to Gnuplot's commands. However, the higher-level commands offered by Octave are very easy to use and you may find you don't have to use the Gnuplot commands at all.

Conclusions

Octave is a flexible, powerful, easy-to-use, high-level language designed for numerical computations. It comes with a very readable 200+ page user manual, and a help system based around the GNU info system. The main advantage of a high-level language over a language like FORTRAN is that development time is usually considerably shorter using a high-level language. This allows for easy prototyping and experimentation.

Although the documentation doesn't claim that Octave is intended to be a Matlab clone, or Matlab compatible, Octave is probably the most Matlab-like of the freely available high level languages. It's not exactly the same, but I was able to convert a suite of Matlab m-files that perform finite element analysis of the Navier-Stokes equations to Octave very easily.

Octave has many more features than I have described here, but I've provided an overview of its main strengths. If you're looking for a language for numerical work, Octave is certainly an option. I don't think you can directly compare Octave with such languages as RLaB, SciLab and Yorick—they all do different things, and which you choose depends on what you want to do as well as personal preference. My preference is Octave.

Malcolm Murphy still wishes that he had discovered jazz before he gave up clarinet lessons at an early age. He considers himself too old (or too lazy) to start again now, so he plays the guitar instead. If you have an uncontrollable urge to send him some e-mail, his address is Malcolm.Murphy@bristol.ac.uk.

______________________

## Comment viewing options

### nice thoughts

Well, the post is actually the freshest topic on this registry related issue. jasmin live I fit in with your conclusions and will thirstily look forward to your coming updates. Just saying thanks will not just be sufficient, for the phenomenal lucidity in your writing.cameraboys.com I will right away grab your rss feed to stay abreast of any updates.

### I wish our university used

I wish our university used this as well as I have become used to it. The interface on Octave is a lot easier to use in my opinion. Matlab will just have to do sometimes though. college grants for students

### Matlab or octave

Where else could anyone get that kind of info written in such a perfect way?
Matlab or octave

best regards

the best part of octave is it can parse matlab code , so it's very useful for students like me .however, matlab can not parse octave code .
another thing,you can type single quotes and double quotes in octave which like we know that's impossible with matlab(accept only singles quotes).
these are two big difference for me so I choose Octave over Matlab .
Orthopaedic Shoe Repairs

### Thank you for taking the

Thank you for taking the chance to deliver this affair. I’m pleased I discovered your site on this material. I’m doing research on this interest right now and this was great. Keep up the great work.I’m doing research on this interest right now and this was great. Keep up the great work !!!!!!!!
koyun oyunları

### @windows version

Octave can be used on windows using cygwin.

Very nice site.
Spray Insulation

### Didn't know that

Didn't know you could use it with windows. I'll check cygwin further. Thanks. S.T. repossessed cars insider tips
repossessed cars basics

### Great article. It's hard to

Great article. It's hard to say which one is the best.

### Fortran is my first programming language

When I was young, Fortran is my first programming language. Then I learned Matlab and Octave.. but I think Matlab is easier than Octave. thanks, Pampers Diapers

### disagree

Have to disagree Octave is far more intuitive. curtains and blinds

### Have used both, Octave and

Have used both, Octave and Matlab, but i prefer the latter, though i don't use matrixes that often. online sex cam live chat

### Thanks to your article, you

Thanks to your article, you don't know me and I live way too far away...
Why yes you can. m files work just fine with octave.

### Matlab's return is promising

Matlab's return is promising it will help in Computer Aided Designing
Devs

### There is difference between

There is difference between Matlab and Octave. Octave is open source whereas Matlab is proprietary. Matlab surly is more comfortable working whereas Octave is free, that's why I love to work with Octave.
Sam

### user friendly

which one that give you more user friendly experience?
how to get pregnant

### Doesn't this cause a conflict?

Great article but one quick question...?

"The input an' output values be optional, so it is possible t' write a function that takes no arguments an' returns no values, such as

octave:11 function hello
printf("hello\n")
endfunction"

How does this not result in conflict when compiling?

Mediation Jobs

### What is my Love?

My heart is my love
My love is my family
My family is my future
My future is my destiny
My destiny is my ambition
My ambition is my inspiration
My inspiration is my motivation
My motivation is my belief
My belief is my peace
My peace is my target
My target is heaven
My heaven is my home
My home is my eternity
My eternity is my judgment from my creator

If Tomorrow Never Comes
If I knew it would be the last time that I see you walking out of the door, I would have given you a hug and kiss and even call you back for one more.

If I knew it would be the last time I will hear your voice, I would have video taped each action and word of yours, so I could play them back day after day.

If I knew it would be the last time we would meet, I could have spared an extra minute or two to stop and say "I love you,"

If I knew it would be the last time I would be there to share your day, I could not have allowed this to slip away.

For surely there's always tomorrow to make up for an oversight, and we always get a second chance to make everything right.

The more we are still on earth living there will be always tomorrow

Send Free Texts

Send Free Texts to say good morning, good afternoon, good night, and toy I LOVE YOU

### Octave: A Free, High-Level Language for Mathematics

Yeah, I wish we had this too in our university. I imagine calculating mathematical equations in just pressing some keys in the keyboard and not solving those problems with very long solutions by hands.
computer repairs in new york

Nice article.

### ???????? ?????: ???????? ???

???????? ?????: ???????? ??? ???? ? ????????? ???????? ?? ? ???? ???????: ??? ????? ???? ????? ???? ??????? ?????????.
play blackjack safe online casino online bonus slots

### thank you

thnaks for shared ßß Our website is: http://www.cilekerotik.com

### Wow...

Wow!I am pretty new to learn about this but would like to know which one in the end is the way to go?Is it Matlab or octave?I've read that Matlab can be more powerful, is that correct?
Musikproduzent im Tonstudio

### I have been learning computer

I have been learning computer languages but never even heard about Octave. May be because it is old now and isnt used much but it is always interesting to know more. I will be digging in deep to find more information on this. electric meat slicer

### That's all we need :)

That's all we need, another high-level Maths language. I find C difficult enough to deal with. My Dad was right, should have done law rather than engineering :)

### which one?

So in the end which one is the way to go? Matlab or octave? Both have benefits
Hearing Loss Treatment

### I agree with David

I totally agree with David that it's almost mandatory that you also install the octave-forge package...

### Octave is great

"I'd say there's a *big* difference between Matlab and Octave. Octave is Open Source, that means it's free as opposed to Matlab which you have to pay for. Very powerful."

Absolutely agree with this. I love Matlab but the flexibility that I have with Octave is awesome.

article submission service

### Octave VS Matlab - Big Difference

I'd say there's a *big* difference between Matlab and Octave. Octave is Open Source, that means it's free as opposed to Matlab which you have to pay for. Very powerful.

### Coding Style

I see about the Visual Basic notation like if .. else .. end, but Octave, like Matlab uses C oriented notations also, for example a ! in Octave is a NOT, as it is in C, instead of <> in VB. Also you can use all the C based = symbols like: `+=', `-=', `*=', `/=', `^=', `.*=', `./=', and `.^='.

### Octave Origins

From what I'm getting, James B. Rawlings and John W. Eaton at the University of Texas were the first to start development of Octave, clear back in 1988. In '92 James Rawlings started development full time. How does open source software put food on the table. I'm still puzzled.

### Almost VB Style

This is my first introduction to either Matlab or Octave. The format almost has a Visual Basic feel to it; not like C at all. Then again, maybe just the function definitions. For me, the advantage would be to do server side math, thereby not relying on flaky client side Javascript, which is anything but precision.

### Octave is no doubt an equally

Octave is no doubt an equally impressive piece of software and just as functional as Matlab. I've used both and have no preference either way as they both work in very similar manners. There is no doubt that Octave is a great alternative to Matlab and gets the job done just as well. backpacking Europe

As of August 1, 2010 the newest version 3.3.52 is available in BETA for people interested in helping test. Be sure to download it and give it a spin: Octave Downloads.

### Windows Version

MatLab is indeed a great high level program (language?) for doing precision math. It's available for Windows or Linux. I didn't see if Octave is also available for both.

### mathlab is still better

I have used both programs and I think mathlab is still much than octave.

### I am starting to learn about

I am starting to learn about this but would like to know that this will be used for quite some time down the road. I see this is dated 1997, has there been any changes to this, or is there any news of switching to a different system? custom t-shirts

### Changes

I see this is dated 1997, has there been any changes to this, or is there any news of switching to a different system? I am starting to learn about this but would like to know that this will be used for quite some time down the road. Outdoor Pool Furniture

I admire the valuable information you offer in your articles. I will bookmark your blog and have my children check up here often. I am quite sure they will learn lots of new stuff here than anybody else! Colorado Personal Injury

### You don't know me and I live

You don't know me and I live way too far away... but my name is Peter. I'm doing an undergrad I.T. degree and this semester I'm doing a subject on Pattern Recognition (eventually using Neural Networks). The subject demands use of Matlab and for some reason, our I.T. faculty seems to be fairly poor at supporting anything Linux (except for network admin and programming based subjects). iphone headphones

### Matlab OR Octave

the best part of octave is it can parse matlab code , so it's very useful for students like me .however, matlab can not parse octave code .
another thing,you can type single quotes and double quotes in octave which like we know that's impossible with matlab(accept only singles quotes).
these are two big difference for me so I choose Octave over Matlab .
router wireless reviews

### I tried Octave

I tried Octave once , it's unbelievable .
very very useful for people who use Matrix (resolve Jordan and Gauss problem easily)

### I wish our university had

I wish our university had Octave installed. But most machines in Ottawa are Windows.

### I wish we had it too

Yeah, I wish we had this too in our university. I imagine calculating mathematical equations in just pressing some keys in the keyboard and not solving those problems with very long solutions by hands.

### Great

Thank you for such a fantastic blog. Where else could anyone get that kind of info written in such a perfect way? I have a presentation that I am presently working on, and I have been on the look out for such information. Local Marketing

### You have a lot of resources

I always consult linuxjournal so many things about my job, and my school.