I just posted this answer on a separate question:
The problem is that you didn't load the optim package. When you type pkg list
you can find which ones are loaded by an asterisk in front of their names. Load a package with pkg load optim
.
Having to load a packages is that thing that many users coming from Matlab find strange but if you compare with other languages, such as Python, Perl, or C++, would you expect them to import
, use
, or #include
every libraries available in the system by default? See Octave's FAQ for more details.
If you want a package to be loaded automatically by default, the recommended action is to add the line pkg load optim
to your ~/.octaverc
file.
Finally, you have just started with Octave, you should probably have installed Octave 3.8.1.