public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
* wrapper for GSL and Excel
@ 2004-07-12 17:43 Axel Vogt
  0 siblings, 0 replies; only message in thread
From: Axel Vogt @ 2004-07-12 17:43 UTC (permalink / raw)
  To: gsl-discuss

I have written a little wrapper to call GSL from Excel (on Windows)
and have uploaded it to a Yahoo webspace (feeling unsure whether
this group here wants attachments) in the files section of 
http://groups.yahoo.com/group/axalom (due to Yahoo's policy one has
to sign in), the file name is wrapGSL_xl.zip, it contains the whole
project in MSVC 6.0 together with the compiled wrapper wrapGSL.dll
and an Excel sheet test.xls which shows how to use that.

It assumes that GSL.DLL is installed (usually in the Windows
systems directory).

The wrapping is simple: it takes a name (as string) of a GSL-function
as first argument and the actual argument(s) of the GSL-fct as the
next ones, hands it over to GSL.DLL and returns the result in the
__stdcall calling convention needed for Excel.

There is no syntax checking on calling GSL (so do not make mistakes
and better put everything in a VBA module). Please note that on a
crash Excel does not clean the memory properly and blocks files,
so only a restart helps :-(  In any case it is better to have the
GSL manual at hand instead of 'trial and error' testing ...

For using DLLs in Excel one must declare the functions in VBA and
for this you must set the correct path for wrapGSL.dll. Since the
functions are called by their 'names' one only needs to declare
some 'types'.

For this open the Excel project through the menu bar or <Alt>+F11.
After setting the correct pathes in the module m_DeclareDLL the
examples in the sheet should work.

The main use (for me) are the special functions within GSL.

I have included complex valued functions as well (but have not done
it very nice in Excel; additionally i have the impression that the
complex GSL fcts are slow).

Not yet done: more complicated arguments or results (like arrays
or numerical integration etc). May be some times in the future ...

Axel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-07-12 17:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-12 17:43 wrapper for GSL and Excel Axel Vogt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).