Results 1 to 4 of 4

Thread: Control systems package for GNU Octave

  1. #1
    Join Date
    Oct 2009
    Location
    North Dakota, USA
    Beans
    2
    Distro
    Ubuntu 9.10 Karmic Koala

    Control systems package for GNU Octave

    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:

    Code:
    num1=[10]; den1=[1 2 5]; sys1=tf(num1, den1)
    An error was returned:
    Code:
    error: 'tf' undefined near line # column #
    I was frustrated because the online manual for Octave seems to clearly describe the "tf" function. Why was the tf function missing?

    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
    Code:
    $ sudo octave
    octave:1> pkg install /foo/bar/downloadedpackage.tar.gz
    The results using Octave as a direct replacement for MATLAB aren't perfect, but it's going much better with the Control package!

  2. #2
    Join Date
    May 2009
    Beans
    113

    Re: Control systems package for GNU Octave

    Did you try to get them through the Ubuntu repositories first?

    I think that the octave-control package is what you were looking for.

  3. #3
    Join Date
    Oct 2009
    Location
    North Dakota, USA
    Beans
    2
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Control systems package for GNU Octave

    Quote Originally Posted by not_a_phd View Post
    Did you try to get them through the Ubuntu repositories first?

    I think that the octave-control package is what you were looking for.
    I think I tried to apt-get octave-control. It didn't work on my 8.04 rig or my upgraded 9.10 64bit rig.

    You seem to be right, it is in the repositories for 9.10, so I don't know what went on with my PC. And it's also a package for 9.04, so those are theoretically covered too. But it's not a package under 8.04 or 8.10, hmmm.

    At least the workaround I describe seems to work on my rigs running 8.04 and 9.10. I guess before trying it it'd be a good idea to attempt

    Code:
    sudo apt-get install octave-control

  4. #4
    Join Date
    Nov 2012
    Beans
    1

    Re: Control systems package for GNU Octave

    Thanks for the help!

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •