Need HELP getting started with octave.

  • Thread starter Thread starter uart
  • Start date Start date
  • Tags Tags
    Octave
Click For Summary
Help is needed for using the open-source Octave math program, specifically regarding user-defined functions and their accessibility to included library functions. The user has successfully tested the "quad" routine but encounters issues with "quadc," suggesting a potential configuration problem. It is essential for user "m" files to be placed in Octave's include path, which may require checking environment variables or configuration files on Windows. Recommendations include consulting the Octave documentation and seeking assistance on the Octave forum at Sourceforge.net. The discussion emphasizes the need for proper setup to ensure user-defined functions are recognized by Octave.
uart
Science Advisor
Messages
2,797
Reaction score
21
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.
 
Mathematics news on Phys.org
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.

Thanks.
 
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.
 
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 http://www.octave.org/doc/octave_14.html#SEC103

A better place to ask might be the Octave forum over at Sourceforge.net
 
Last edited by a moderator:
Here is a little puzzle from the book 100 Geometric Games by Pierre Berloquin. The side of a small square is one meter long and the side of a larger square one and a half meters long. One vertex of the large square is at the center of the small square. The side of the large square cuts two sides of the small square into one- third parts and two-thirds parts. What is the area where the squares overlap?

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
6
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K