Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1995
*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 1995

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

Search the Archive

Exporting long #'s with mathlink

  • To: mathgroup at christensen.cybernetics.net
  • Subject: [mg1122] Exporting long #'s with mathlink
  • From: Lincoln Grimes <lsgrimes at linus.mitre.org>
  • 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?
Cutting
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 linus.mitre.org



  • 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?