Tag Info

New answers tagged

0

You might define newStyleSheet = (SetOptions[InputNotebook[], StyleDefinitions -> #]) &} and then insert the lines newStyleSheet["Default.nb"] and newStyleSheet["Report.nb"] in the appropriate places in myExportForLatex. The second call of newStyleSheet being made to revert to your normal style.


2

Being able to use this provides us with a way to produce quite secure CDFs designed for FreePlayer. Maybe it is a problem with encoding somewhere or with overloaded definitions of Get. Nevermind, as pointed out by Rolf Mertig if one uses OpenRead with DefineInputStreamMethod to convert a binary file to a stream, everything seems to work. Steps: ...


6

Just add a fixed PlotRange like this : pics = Table[ Graphics3D[{{Opacity[0.1], EdgeForm[None], Cone[{{0, 0, 0}, {0, 0, -2}}, 1]}, {Yellow, Sphere[{0, 0, -2}, 0.1]}, {Dashed, Arrow[{{0, 0, -2}, {0, 0, 0}}]}, GeometricTransformation[{Red, Arrowheads[0.03], Arrow[Tube[{{0, 0, -2}, {0, 1, 0}}, 0.005]]}(*{Black,Arrow[{{0, ...


3

a = 108 b::usage = "test usage msg" b[x_] := 4 x + 8 c = Interpolation[{15, 16, 23, 42}] As pointed by OP, the direct usage of FullDefinition produces boxes that are not realy useful. I don't know how to convert them easily without this tiny undocumented function [1], [2]: Save["test.m", {a, b, c}] CreateDocument @ Cell[#, "Input"] &@ First @ ...


1

the reason it's not working it's because " is a special character, so you need to put \ before it to make Mathematica recognize it as a part of a string. WriteString["myFile", "j/?xml version=\"1.0\" encoding=\"UTF-8\"?>"] http://reference.wolfram.com/language/tutorial/SpecialCharacters-StringsAndCharacters.html


0

If you want an overall page title and a different label on each subfigure: Column[ {Text[Style["Here are all my graphs", 24, Bold, Blue]], Grid[ Partition[ Table[ ListPlot[RandomInteger[{0, 10}, 10], ImageSize -> 400, PlotLabel -> "Figure number " <> ToString[i]], {i, 9}], 3]]}, Alignment -> Center]


1

Try data3 = Flatten[Table[{p[[i]], q[[j]]}, {i, 1, dimp}, {j, 1, dimq}], 1] Export["data3.dat", data3, "Table"];


1

There are many ways to post-process myTable to get rid of the extra nesting. Look up Apply and Join for this: Join @@ myTable With Flatten: Flatten[myTable, 1] With the new-in-10 Catenate Catenate[myTable] So which one should you use? Performance wise, they're mostly the same. They all preserve packed arrays. I used to use Join @@ up to ...


2

I am not sure if you want numbers or functions. Since you are using comma separated variables I have converted your f[i,j] to a string to avoid the comma in the function creating an extra column. myTable = Table[{i, j, ToString[f[i, j]]}, {i, 1, 3}, {j, 1, 3}] If you look at the output there is a level of bracketing associated with each table index. You ...


4

Reading the answer here from Arnoud Buzing: Importing videos in Mathematica Even on Windows, if QuickTime is installed, Mathematica uses the native QuickTime install (excluding added, third-party codecs) to import AVI files...Without an installation of QuickTime, only uncompressed AVI files are supported by Mathematica Which suggests the answer may ...


1

You have wrapped your data with UI specific calls that makes sense only the UI. And then wanted to export it to a text file, which is not a good way to go about things. You should have your data separate from the UI specific wrappers, then you can export your data on its own, or use the wrappers on it for UI display. Look at InputForm[p] and you can see ...


0

If you want to export machine real values, you will need ask for them in you computation. Try something like fun[x_] := c11*(b1*c)^x*(f1*Gamma[-x, b1*d]/Factorial[x]) T4 = Table[{q, fun[q]}, {q, 20, 60}] // N; ListLinePlot[T4, PlotMarkers -> Automatic] Export["CAP4.mat", {T4}, "Table"] This will also increase the speed of ListLinePlot.


1

As there has not been any further input so far, I shall try to expand my latest edits into a complete answer. As mentioned before, Mathematica's apparent behavior is that ImageSize is given in units equal to 1/72 of an inch. The default resolution when outputting to a raster format is also 72dpi. So it should come as no surprise, that ...


1

This is not supposed to happen, but indeed the SVG output is rasterized. It happens when you use DensityPlot, but not with ContourPlot (in version 8 at least). So I think this is a bug. To keep the axes as vector graphics, I would suggest my answer here as a work-around.


7

By default the frames of a GIF are stacked on top of each other. One can change this behavior using the Export option "TransitionEffect" -> Background: Export["D:\\InformationMaterial\\Wolfram\\vTest.gif", v, "TransparentColor" -> White, "TransitionEffect" -> Background] The default setting is "TransitionEffect" -> None.


11

I would like to make my graphics homogeneous with my (LaTeX) document. That means that I would like to use the same font in the graphics (labels for axis etc) as the main text. I recently wrote a package, called MaTeX, to solve this exact problem. MaTeX makes it easy to compile short LaTeX snippets and embed them in Mathematica notebooks or graphics. ...


1

Update: These are some interesting infos since my previous post: Contrary to what I thought and wrote in the first version of this answer, Speak can handle pauses inside a text and many other features to fine tune the speech (see this recent post for more infos). The commands to fine tune the speech (like pause, speed of the speech, ...) depend on your ...


3

It can be traced that, in minimal example from question, following definition of System`Convert`TeXFormDump`maketex function is used: System`Convert`TeXFormDump`maketex[str_String?System`Convert`CommonDump`EmbeddedStringWithLinearSyntaxQ] := ( System`Convert`CommonDump`DebugPrint["------------------------------------"]; ...


1

Slider does not allow play button but Manipulator does. This is an example and I don't know if it fits you need. Grid[{{Manipulator[Dynamic[x]], Dynamic[x]}, {Manipulator[Dynamic[y]], Dynamic[y]}, {Show[{Graphics[{EdgeForm[Black], Dynamic@Circle[{x, y}, 1]}, PlotRange -> {{-2, 2}, {-2, 2}}], Graphics[ Translate[{Opacity[0.3], ...


2

You can do, for example, the following: list = Table[{i, {2^i, 3^i, 5^i}}, {i, 1, 10}] then Export["test.m", list] and Clear @ list and finally list = Import["test.m"]


1

This works, plot=ListPlot[{x, y}\[Transpose], PlotRange -> {{0, 1}, {-1, 1}}, Filling -> 0]; Export[ "test.eps" , Rasterize[plot, ImageSize -> 1000]]; The file size is reduced from 140k ( hardly "huge" ) to 30k, with a noticeable loss of quality. If you are concerned with the displayed size of the figure that is normally dealt with in ...


2

Use Table, not For: output = Table[ {p, q, x} /. FindRoot[{f1[p, q] - 0.03 == 0, f2[p, q] - 0.0234 == 0}, {{p, 1}, {q, 2}}], {x, 0, 359} ] Look in $ExportFormats to find the format you want. Export["output.csv", output]


2

No "real" answer, but a deeper analysis into the behavior you experienced: file = "original.m"; fileEnc = "enc.m"; (* alphabet for password: [0-9a-zA-Z] *) alphabet=Sort[CharacterRange @@@ {{"a", "z"}, {"A", "Z"}, {"0", "9"}}//Flatten, ToCharacterCode@#1 < ToCharacterCode@#2&]; (* checking and recording success of decryption together ...



Top 50 recent answers are included