MathGroup Archive 1995

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

Search the Archive

Exporting long #'s with mathlink

  • To: mathgroup at
  • Subject: [mg1122] Exporting long #'s with mathlink
  • From: Lincoln Grimes <lsgrimes at>
  • Date: Mon, 15 May 1995 02:21:48 -0400
  • Organization: The MITRE Corporation

I want to be able to export long strings of numbers from mathematica to matlab
using mathlink.  When I save a short list of numbers(less than one line) with 
the Save["filename",variable] command in Mathematica, I can use
math('<<filename') to load the number as a string into matlab.  The matlab
command str2num converts the string to a number, and everybody's happy.  But
when the mathematica list of numbers is longer than one line, the combination
of Save["filename",variable] and math('<<filename') ,(exactly as before),
inputs a carriage-return character ">" into the list in matlab, which I can't
get matlab to recognize, giving me an error.  What I want to know is, can I
save a Mathematica variable in a form that matlab can read with mathlink?
and pasting in Windows is doable but tedius, especially when the lists
of numbers are very long.   Thanks!  I'm running version 2.2.

                                                  -Lincoln Grimes
				                   The Mitre Corp.
						   lsgrimes at

  • Prev by Date: Re: Re: finding irregular areas
  • Next by Date: Knot theory algorithms/packages?
  • Previous by thread: Searching for 4-vector package
  • Next by thread: Knot theory algorithms/packages?