Writing and applying user-supplied functions

In Chapter 3, we saw how to "build" mathematical functions directly via the Octave command prompt. Here we will do the same thing, but we will do it properly this time and use Octave functions.

Consider the following vector valued function which we will call the Sel'kov function (an explanation follows later):

Writing and applying user-supplied functions

(5.1)

b is some positive real number that we can vary as we like. We can write Equation (5.1) in a slightly different way by letting (x,y)=(x1,x2)=x:

Writing and applying user-supplied functions

(5.2)

When we write an Octave function for Equation ...

Get GNU Octave now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.