Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Need HELP getting started with octave.

  1. Jul 26, 2005 #1


    User Avatar
    Science Advisor

    Hi, appologies if this isn't the best forum for this question, I'd like to get some help (or find out where to get help) on using the open source "octave" maths program.

    It's a very specific question, I have to find out how to allow included (library) functions to be able to access my user defined functions. When using the included numerical integration routines (say "quad.m" for example) they require a user function to be passed as a string. I can write the "m file" to define the user function and check that it works from the command line but I get an error any time that I try to pass this function to one of the integration routines like "quad". I'm sure there's a path or similar environment variable that I need to set, are there any octave users here that can give me a clue.

    BTW, I'm running GNU octave 2.1.50 under Windows XP. I'm familiar with matlab and can easily make all this stuff work in matlab. It must be something simple to make it work in octave if I could just get started.
  2. jcsd
  3. Jul 26, 2005 #2


    User Avatar
    Science Advisor

    Quick update.

    Sorry there was some mis-information in the above. I was actually trying to use the routine called "quadc" and it wasn't working (and still isn't). But know I just tested the basic "quad" routine (called in exactly the same way as I was attempting to call quadc) and it actually does see my user function and does numerically integrate it correctly.

    BTW. I made the user function as an "m" file in the "/octave_files" directory. I guessed that directory by typing "pwd" from the command line and that was what was indicated.

    I'd still like some tips on the best path to place user "m" files and tips on good places to find online help if there are any octave users here. PS. Remeber I'm running under Windows and not Linux.

  4. Jul 26, 2005 #3


    User Avatar
    Science Advisor

    Yeah I still haven't resovled this. It looks like it works with "quad" because it's an inbuilt function but any functions that are implemented as "m" files don't seem able to see my user defined function. It must be a configuration problem.

    Is anyone here using ocatave under Windows? I'm thinking maybe it just hasn't really been ported properly to windows.
  5. Jul 26, 2005 #4
    You need to make sure your M files are in Octave's include path. I don't recall at the moment whether this is defined as an environment variable under Windows or specified in a config file. See Section 13.6 in the manual

    A better place to ask might be the Octave forum over at Sourceforge.net
    Last edited: Jul 26, 2005
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Need HELP getting started with octave.
  1. Getting started (Replies: 6)