MathGroup Archive 2005

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

Search the Archive

Re: hwo to export data to file

  • To: mathgroup at smc.vnet.net
  • Subject: [mg59577] Re: hwo to export data to file
  • From: Bill Rowe <readnewsciv at earthlink.net>
  • Date: Fri, 12 Aug 2005 00:10:03 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 8/11/05 at 4:57 AM, longbw2005 at sina.com (longbw2005) wrote:

>Hi, Thank you for your interests. Here i have two problems which
>you may offer help. 
>The first problem is " how to save my numeric calculation results
>into a file in a specific format and the file could be readily read
>by common software such as excel, word or origin ?   For example,
>suppose my calculation results is a list:{1.3332, 2.5,
>3.12,5.5},{2.5,7.8,9.90,2.47894}, {7.3444,5.778,2.11,3} and I
>expect the file will be open with the format like this:

>                 1.333   2.500  3.120   5.500
>                 2.500   7.800  9.900   2.479 
>                 7.344   5.778  2.110   3.000

>i know in Mathematica environment it works by using PaddedForm
>function but how to export data into a file with that format.

Export is what you want for this purpose. If you want to have a file that can be edited by a text editor that can be read by Excel then use

Export[filename, data, "Table"] writes things in the format above or
Export[filename, data, "CSV"] writes data out with comma separators

But if your goal is to have a file Excel can read and you are using the current version of Mathematica then the simplest is to Export directly into a native Excel format, i.e.,

Export[filename, data "XLS"]

Note doing this exactly as I've shown above will not result in a fixed number of digits to the right of the decimal point. Since it is trivial to have Excel display whatever number of digits you like, my recomendation would be to set this in Excel rather than by Mathematica when exporting data. This way no information is lost.

>The second problem is how to make mathematica to evaluate a formula
>instantly with all the parameter/variables known, especially for
>the numeric functions such as FindRoot and NDSolve.

If you gave an explicit example of what you are trying to achieve here I might have a suggestion.
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: hwo to export data to file
  • Next by Date: Re: Mathematical Modeling Problem II
  • Previous by thread: Re: hwo to export data to file
  • Next by thread: Re: Mathematical Modeling Problem II