Tag Info

New answers tagged

3

WDX is not a good format. We are likely to deprecate it or entirely replace it with a different implementation that is not backward-compatible (which is obviously problematic). Dataset will never directly support it. There are candidates for a possible native format for dataset, like Cap'n Proto, HDF5, and a couple others. Or XML. No, just kidding :-)


2

I agree that this is unexpected. I was able to reproduce the problem in MMA 10.1 on Win7-64bit. This looks like a bug within Export to me, which I think you should report to WRI. In the meantime, you can generate the frames yourself, then use ListAnimate to generate a movie for export with the same format (controls, panes) that you would get from Animate: ...


4

If s is produced by something like s = NDSolveValue[sys, x, {t, 0, tf}] producing (*InterpolatingFunction[{{0., 20.}}, <>] *) the raw data used by InterpolatingFunction can be extracted by {s["Grid"], s["ValuesOnGrid"]} and exported. (See 28337 for more data that can be extracted.)


2

Exporting the points used by Plot Export["Asun.mat", InputForm[ Plot[sol[[1, 14]], {t, 19, 20}, PlotPoints -> 2500, PlotRange -> All]][[1, 1, 1, 3, 2, 1]]] should export all the points shown in your first plot. Finding a suitable fixed interval Plot is using an adaptive algorithm to find determine the sample points. You should check ...


1

I don't know if this is what you are after, but this is how I always import / export long lists: Export Export["C:\\Directory\\list.txt", list] Import list = ToExpression[Import["C:\\Directory\\list.txt", "List"]];


2

Here's how I would do it with PaddedForm: Export["filepath.txt", StringJoin[ToString@PaddedForm[#, 6] & /@ {-1, 2, 3, 4, 5}]] This works with negative numbers as well. Will work the same with WriteString. If you want more control over the padding, you can use your own function... custompad[num_, padlength_?IntegerQ] := ...


5

I don't know a way to export a figure with different resolutions for different elements, the term "resolution" normally applies to the whole figure. You have a 350 printer's points wide figure which you seemingly wish to export with resolution 1200 dpi. This means that you wish to export a figure with width Round[1200*(350/72)] 5833 pixels. Not every ...


4

CorelDRAW is not a PostScript viewer. Its ability to import EPS files has serious limitations and is not guaranteed to preserve the original appearance of the figure. One workaround is to place the EPS file inside of the CorelDRAW document instead of importing it but it has a drawback: you will see only EPS preview, not the actual content of the EPS file. ...


2

I think your syntax is wrong. Try the following Export[pathWithFileName, mmaImageName, "EPS"], where pathWithFileName contains the path and the name of the exported file i.e. "path/filename.eps". In my answer the option "EPS" is not necessarily needed.


1

So I had a couple of issues with my code, the first as AlbertRetey pointed out, was how I set up my cron job. Bad Code: 17 * * * * pi sudo /home/pi/monitorScript.sh Corrected Code: 17 * * * * pi /home/pi/monitorScript.sh Bad Code: data = Import["./ADayRecord.txt", {"Data", {All, {1,2}}}] dataMean = Mean[data] Print[ dataMean[[2]] ] ...


0

To place the label "(a)" below plot PB you can use: Labeled[PB, "(a)", Bottom] You can wrap "(a)" in a Style to control the size and face of the font, you can also wrap it in a Row to fine tune the position. For example: Labeled[PB, Row[{Spacer[5], Style["(a)", 18, Bold],Spacer[80]}], Bottom]


16

Preface: For everyone: be aware that this behaviour is very likely to change soon (the name of the hook variable flag, etc). In fact, I did change this for 10.2, where Export would fall back to the standard Export in case when the specialised hook fails. Leonid Shifrin I get the same behaviour using Mathematica version 10.1 on Windows 7/64-bit. ...


1

Here's a workaround until this gets fixed. WARNING: Modifying installation files can break things. Do this at your own risk, and keep the modification in mind, in case you experience problems with JSON export later. Do this only if you are affected by the problem. Open the file SystemFiles`Links`JSONTools`JSONTools.m Skip to line 233, where the number ...


0

You should check out the OutputType option, which allows you to specify Graphics output instead of the default Optical System output from functions like AnalyzeSystem, DrawSystem, and ShowSystem. mySystem = DrawSystem[{ConeOfRays[20, NumberOfRays -> 7], RefractiveIndex[1.5], Polarization[45], Ray[WaveLength -> .45, AddTo -> NewRay], ...


9

Mathematica's Export of animated GIFs isn't perfect. I personally prefer to Export only individual frames from Mathematica, and then use a third-party program for assembling them into an optimized animated GIF. In this case it is easy to monitor the process of Exporting of individual frames: table = Table[ Plot[Sinc[t x], {x, 0, 10}, PlotRange -> 1], ...


0

I actually found to use Export["/home/sol.csv", sol, "CSV"] and solImport = Import["/home/sol.csv", "CSV"]; with solimport = solImport // ToExpression to fix the problem of table contraction. The user can now call indexed entries at solimport[[1]][[1]][[3]][[1]] as requested.


3

You should use either Put or Save depending on what you want. With Put you just save the values of your expression. With Save you save the definition of the symbol. To retrieve the solutions you use Get. See code below In[357]:= s = NDSolve[{y'[x] == y[x] Cos[x + y[x]], y[0] == 1}, y, {x, 0, 30}] Out[357]= {{y -> InterpolatingFunction[{{0., 30.}}, ...



Top 50 recent answers are included