Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

How to define new wrapper (i.e. modified "CForm")

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27044] How to define new wrapper (i.e. modified "CForm")
  • From: Dirk Reiss <reiss at physnet.uni-hamburg.de>
  • Date: Thu, 1 Feb 2001 03:00:30 -0500 (EST)
  • Organization: University of Hamburg -- Germany
  • Sender: owner-wri-mathgroup at wolfram.com

Hallo,

I use Mathematica to generate source code for some numerical calculation
programs. The code is to interpreted my MATLAB which has its own Syntax, which
is not quite compatible with neither FORTRAN nor C.

For example when using complex numbers I need something like
	x=i*y
instead of (CForm)
	x=Complex(0,1)*y
or (FortranForm)
	x=(0,1)*y
or (without any wrapper)
	x=I*y

I found a workaround by using CForm and defining the functions like "Complex" or
"Power" as additional subroutines to my MATLAB program.
However, is there a way to define ones own wrapper or modify an existing one?

As you may notice, I am not into Package writing, so the solution should not be
too involved. 

Please send a copy of any answer directly to me.

Thank you in advance

Dirk Reiss



----------------------------------------------------------------------
   Dr. Dirk Reiss
   Institut fuer Laser-Physik     Tel:   (040) 42838-2908
   Universitaet Hamburg           Fax:   (040) 42838-6571
   Jungiusstrasse 9               email: reiss at physnet-uni-hamburg.de
   20359 Hamburg

   (http://www.physnet.uni-hamburg.de/ilp/english/reiss.html)
----------------------------------------------------------------------


  • Prev by Date: Q: How to get Mathematica to find an external DLL?
  • Next by Date: Re:Contour Plot
  • Previous by thread: Re: Graphic problem
  • Next by thread: Re: Font display