On Wed, 24 Feb 2010, Sven Schreiber wrote:
Allin Cottrell schrieb:
> This is now working OK on Linux and Windows (and probably OS X),
> but is not yet documented. You can stick Octave script into a
> gretl "foreign" block with "language=octave", and can exchange
> matrices (as with Ox) via the pre-defined Octave functions
>
> gretl_loadmat(name1)
> gretl_export(matrix, name2)
>
> The first of these matches up with mwrite(matrix, name1) in gretl,
> and the second pairs with matrix = mread(name2) in gretl.
>
> Now we need a nice example of the use of Octave to illustrate the
> yet-to-be-written entry for the User's Guide. Any suggestions?
Well as Jack mentioned, maybe (cross-) spectral stuff would be a good
area because of complex numbers. For example the "cohesion" measure by
Croux/Forni/Reichlin?
Thanks for the suggestion. I was kinda hoping that somebody who
knows Octave better than I might actually contribute an example
for the manual. The only things that I know how to do in Octave
are boring stuff that you could do just as well in gretl.
And slightly OT: As a pythonista I would of course be interested in
adding numerical Python (NumPy) to the list of supported foreign
languages. I'm ready to help with the import/export functions. What
exactly would be needed?
Basically, two functions in the target language, one to import
gretl matrices as written by mwrite(), and one to export matrices
in the format readable by mread(). Plus one auxiliary function to
return the gretl "dotdir". These get written out by gretl and
somehow (depending on the language) get "sourced" at startup
of "foreign" execution.
The idea of using GPUs for fast number-crunching sounds cool.
Allin