# Tag Info

3

I think for this kind of matrix it is better to use some of the dedicated matrix formats, like, "MTX" (of Matrix Market) or "HarwellBoeing". Below are two examples using "MTX": one with a dense 6000x6000 matrix and one with a sparse matrix. Dense matrix Mathematica mat = RandomReal[{0, 1}, {6000, 6000}]; Export["/path/RandomMat.mtx", mat, "MTX"] Python ...

3

SetDirectory[NotebookDirectory[]] (mat = RandomReal[1, {5, 5}]) // MatrixForm Export["mat.txt", mat, "CSV"] Open python and type >python Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 >>> f = open ( 'mat.txt' , 'r') >>> mat = [ map(float,line.split(',')) for line in f ] >>> print(mat) [[0....

3

You can use Rasterize before exporting to a .eps file. fig = Graphics3D[{Opacity[0.5], Sphere[]}] Now Export like Export["fig2.eps", Rasterize[fig]] which will preserve the opacity in .eps. For better resolution you can use RasterSize. For comparison Export["fig1.eps", fig] Then I use them in a tex file and this is how they look in pdf Left ...

1

Here a two ways to save all your notebook graphics to PNG files : 1. Web page with PNG Graphics This is the quick and indirect way to do that and is actually what you tried. But as you said, by default the exported graphics in the folders are in the GIF format. To Export a notebook to a web page with all the graphics in PNG, this seems to work: Export["...

0

If you have numbers in sin and cos you can fix the problem by evaluating the sin and the cos with N[yourlist]... The import returns a string, so you have to interpreter it, with ToExpression[...]. Example: list={2 (-I Cos[\[Pi]/18]-Sin[\[Pi]/18]),2 (-I Cos[\[Pi]/18]+Sin[\[Pi]/18]),2 (1/2-(I Sqrt[3])/2),2 (Cos[(2 \[Pi])/9]-I Sin[(2 \[Pi])/9]),2 (Cos[\[Pi]/...

2

Use ReadList["foo.txt"] to read Mathematica expressions SetDirectory[NotebookDirectory[]] list1 = {2 (-I Cos[\[Pi]/18] - Sin[\[Pi]/18]), 2 (-I Cos[\[Pi]/18] + Sin[\[Pi]/18]), 2 (1/2 - (I Sqrt[3])/2), 2 (Cos[(2 \[Pi])/9] - I Sin[(2 \[Pi])/9]), 2 (Cos[\[Pi]/9] - I Sin[\[Pi]/9]), {2.7297 + 0. I, -2. + 0. I, -1.89575 + 0.616863 I, -1.89575 - 0....

3

I think this does what you want. exportToFolder[{dir_, data : {{_, _?MatrixQ} ..}}] := With[{path = "folder" <> ToString @ dir}, CreateDirectory @ path; Export[FileNameJoin[{path, ToString @ #}], #2, "Table"] & @@@ data; ] Make sure you first remove the TableForm wrapper from your data: rawoutput = First @ alloutput; Then your ...

4

With version 10.4.1 I get the plot rasterized (but not the legend) with your code. As a workaround you can use the Jens' trick: Export["myFig2.eps", Graphics[Inset[pl, Automatic, Automatic, Scaled[1]]]]; Here is how the exported EPS file looks when opened by Adobe Acrobat 11 (I have selected a number on the frame in order to show that it is a selectable ...

6

Write writes expressions out in InputForm, so you really need to use WriteString With[{delimiter = " "}, helper[strm_, {x_, y_}] := WriteString[strm, x, delimiter, y, delimiter]] With[{ data = {{1, 2}, {2, 1}, {1, 3}, {4, 2}, {4, 1}}, file = FileNameJoin[{\$HomeDirectory, "Desktop", "data.txt"}]}, Module[{out}, out = OpenWrite[file]; ...

6

As stated above, and based on MarcoB comments, I tested the workaround proposed by Simon Woods in Audio export issues, and it works: u1 = Import["AcqDev_0_6ch[ai0to5]_2500kHz_ai_000.wav"]; Block[{Rescale = #1 &}, Export["AcqDev_0_6ch[ai0to5]_2500kHz_ai_rot000.wav", u1]] u2 = Import["AcqDev_0_6ch[ai0to5]_2500kHz_ai_rot000.wav"]; Below are the first 100,...

0

Based on my answer at Referencing cells after reopening a saved notebook, get a list of all output cell expressions with outputs = ToExpression[#, StandardForm, Defer] & @@@ (NotebookRead /@ Cells[CellStyle -> "Output"]); then export via Export["outputs.pdf", Column[outputs], "PDF"];

1

Example Export["filename.png", yourgraph] Where "filename.png" filename is the name you want to give your file .png is file format and yourgraph is your Graph or Plot Alternatively, as @MarcoB has indicated you can do right-click on the plot and choose Save-as option to save your Plot or Graph as an image file.

1

Using undocumented FrontEndExportPacket command you can get exactly the same formatting as with Copy As ► Plain Text (i.e. without the line breaks and extra spaces): s = First[FrontEndExecute[FrontEndExportPacket[Cell[BoxData[ToBoxes[a]]], "PlainText"]]] {-11 \[Psi]^2 \[Lambda][1]+6 \[Psi] \[Lambda][2],35 \[Psi]^2 \[Lambda][2],11 \[Psi]^2 \[Lambda][1]...

4

Here is an answer to this question derived from its comments. Currently there is no way to preserve the interactive capabilities of a 3D plot when using Export. If it is not possible to do the presentation with Mathematica itself, perhaps by using its slideshow capability, the next best recourse is to put the 3D plot in a CDF document and present it with ...

Top 50 recent answers are included