|
---------- X-Sun-Data-Type: text X-Sun-Data-Description: text X-Sun-Data-Name: text X-Sun-Charset: us-ascii X-Sun-Content-Lines: 30 Verehrter Martin, >hier wieder ein Problem, banal aber aergerlich: >Ich moechte die mit List[Funktion[x], {x, xmin, >xmax, stepsize}] berechneten Wete einer Funktion >so abspeichern, dass ich sie als Spalte in Excel >einlesen kann. Zwar kann ich die Spaltenform mit >TableForm in Mathematica 3.0 herstellen, aber >beim Schreiben in eine Datei mit Write[] geht >diese wieder verloren. Wer weiss Abhilfe? Das Geheimnis lautet in diesem Fall: SetOptions[Strom, FormatType->OutputForm]; wobei "Strom" das Ergebnis von "OpenWrite" ist. Ein kleines Beispiel ist beigef"ugt. ------------------------------------------------------------------------- Eberhard von Kitzing Abteilung Zellphysiologie Max-Planck-Institut fuer Medizinische Forschung Jahnstr. 29, D69120 Heidelberg, FRG FAX : +49-6221-486 459 (work) Tel.: +49-6221-486 467 (work) Tel.: +49-6221-385 129 (home) internet: vkitzing@silia.mpimf-heidelberg.mpg.de http://sunny.mpimf-heidelberg.mpg.de/people/vkitzing/ ---------- X-Sun-Data-Type: Mathematica X-Sun-Data-Description: Mathematica X-Sun-Data-Name: test.nb X-Sun-Charset: us-ascii X-Sun-Content-Lines: 135 (*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 3.0, MathReader 3.0, or any compatible application. The data for the notebook starts with the line of stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. ***********************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 3022, 89]*) (*NotebookOutlinePosition[ 3658, 112]*) (* CellTagsIndexPosition[ 3614, 108]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell[BoxData[ \(res = ToString[TableForm[Table[{x, x^2, x^3}, {x, 0, 10}], TableSpacing -> {0, 3}]]\)], "Input"], Cell[BoxData[ \("0 0 0\n1 1 1\n2 4 8\n3 9 27\n4 16 64\ \n5 25 125\n6 36 216\n7 49 343\n8 64 512\n9 81 \ 729\n10 100 1000"\)], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ \(STrom = OpenWrite["\<test.m\>"]; \n SetOptions[STrom, FormatType -> OutputForm]\), \(Write[STrom, ToString[TableForm[Table[{x, x^2, x^3}, {x, 0, 10}], TableSpacing -> {0, 3}]]]; \nClose[STrom]\)}], "Input"], Cell[BoxData[ RowBox[{"{", RowBox[{ \(DOSTextFormat \[Rule] True\), ",", \(FormatType \[Rule] OutputForm\), ",", \(PageWidth \[Rule] 78\), ",", \(PageHeight \[Rule] 22\), ",", RowBox[{"TotalWidth", "\[Rule]", InterpretationBox["\[Infinity]", DirectedInfinity[ 1]]}], ",", RowBox[{"TotalHeight", "\[Rule]", InterpretationBox["\[Infinity]", DirectedInfinity[ 1]]}], ",", \(CharacterEncoding \[RuleDelayed] "ASCII"\), ",", \(NumberMarks \[RuleDelayed] $NumberMarks\)}], "}"}]], "Output"], Cell[BoxData[ \("test.m"\)], "Output"] }, Open ]] }, FrontEndVersion->"X 3.0", ScreenRectangle->{{0, 1152}, {0, 900}}, WindowSize->{520, 600}, WindowMargins->{{155, Automatic}, {Automatic, 79}} ] (*********************************************************************** Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. ***********************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1731, 51, 134, 3, 43, "Input"], Cell[1868, 56, 207, 3, 187, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[2112, 64, 254, 5, 91, "Input"], Cell[2369, 71, 592, 12, 59, "Output"], Cell[2964, 85, 42, 1, 27, "Output"] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************) ---------- X-Sun-Data-Type: Mathematica data X-Sun-Data-Description: Mathematica data X-Sun-Data-Name: test.m X-Sun-Charset: us-ascii X-Sun-Content-Lines: 11 0 0 0 1 1 1 2 4 8 3 9 27 4 16 64 5 25 125 6 36 216 7 49 343 8 64 512 9 81 729 10 100 1000 |