I was using GNU Octave today to follow some MATLAB examples given in my university course on control systems.
One of the examples was to input a basic transfer function. When I tried to type in:
An error was returned:
num1=; den1=[1 2 5]; sys1=tf(num1, den1)
I was frustrated because the online manual for Octave seems to clearly describe the "tf" function. Why was the tf function missing?
error: 'tf' undefined near line # column #
After searching for a while, I found this mailing list posting, where I discovered the stock installation of Octave in the Ubuntu repositories does not include control system functions.
To get these functions, you have to download and install them from Octave-Forge. There are a number of add-on packages available that are not in the default install.
In this case, I wanted the Controls packge, which is at http://octave.sourceforge.net/control/index.html.
Once I had the .tar.gz I went to the command line and did
The results using Octave as a direct replacement for MATLAB aren't perfect, but it's going much better with the Control package!
$ sudo octave
octave:1> pkg install /foo/bar/downloadedpackage.tar.gz