[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Matlab vs. Octave

From: John W. Eaton
Subject: Matlab vs. Octave
Date: Tue, 9 Mar 1999 02:53:08 -0600 (CST)

On  4-Feb-1999, Eduardo Gallestey <address@hidden> wrote:

| in the application I am working on (PDE solvers), I must solve a system
| of typically 2500 ordinary differential equations. Although my PC is
| fast (PII 400 MHz), the code I have written using Octave's "lsode" is
| rather slow (some hours !). 
| I assume that, among other things, this low performance has to do with
| the fact that the RHS of my ODE's are written in the Octave's "script
| language", and not just as C++ dynamically loaded functions.
| My first question is:
| 1) is that low performance of the script language characteristic for
| Octave ONLY, or is this phenomena present in Matlab too? Should I expect
| the same performance if I migrate my code to Matlab? Note that I
| wouldn't like to do it for at least one thousand of reasons!

The overhead for function calls in Octave is high.  Whether it is
higher than for Matlab on similar hardware running a similar OS, I
don't know.

| The second question is just a technical one: 
| 2) how do I pass global variables of the Octave environment to a
| "dynamically loaded C++ function"? 

This has been answered several times on this list.  Look for the

  extern octave_value get_global_value (const string& nm);

  extern void set_global_value (const string& nm, const octave_value& val);

declared in variables.h and defined in


reply via email to

[Prev in Thread] Current Thread [Next in Thread]