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