Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Questions about the form and content of output returned by Mathematica for a given input or function application. This can include specific differences produced by older versions of Mathematica.
4
votes
How to suppress Sign[...] in output
Another way, for a different use-case than the one in @rhermans's answer:
ComplexExpand[Sign[a^2 - 2], a, TargetFunctions -> {Abs, Arg}]
(* Cos[Arg[-2 + a^2]] + I Sin[Arg[-2 + a^2]] *)
% // FullSimpl …
6
votes
Output of intermediate results from very long NDSolve computation into sequenced CSV files
which] save step every Δt
saveSteps[file, every, All] save every step in unique file, otherwise last step
*)
ClearAll[saveSteps, iSaveSteps, ssPrint];
ssPrint = Null &; (* ssPrint = Print for verbose output … PrintTemporary@Dynamic@{Clock[Infinity], tmp}; (* progress monitor *)
Block[{ssPrint = Print}, (* verbose output prints filenames as they are created *)
Clear[tempsol]; (* use tempsol to store …
1
vote
Save a result containing HoldForm to a file
One can use Block to prevent Plus from evaluating until after result is defined.
SortedMonomials = {-3 y, 2 y^2, -3 x, 3 x y, x^2};
Block[{Plus},
result = Plus @@ SortedMonomials;
]
Save["/tmp/fo …
8
votes
Accepted
Solve IVP in a implicit form
Found a way (caveat: it temporarily hobbles an internal function while DSolve is running):
Block[{DSolve`DSolveSolve = Solve},
DSolve[
(5 y[x]^4 + 3 y[x]^2 + Exp[y[x]]) D[y[x], x] == Cos[x] &&
…
6
votes
Accepted
Different Plot's output defining a function
Why the difference arises
The difference arises because Log[f] (as well as Sign[f]) is discontinuous where f == 0, which Plot computes symbolically and gets different results in the two Plot codes. T …
3
votes
Accepted
Can I stop a running NDSolve calculation without losing the data it obtained so far?
Aside from the stop Button[] example in the docs that Carl pointed out, here are a couple of ways.
The first saves the result periodically using NDSolve`ProcessSolutions[].
ClearAll[sol0];
NDSolve[{ …
1
vote
Replacing the print display in a for loop
I use
PrintTemporary@Dynamic@ {Clock@Infinity, table};.
Dynamic has low overhead and a low priority, so it generally does not slow loops down much. Beware if table get large, though. In that case I mi …
1
vote
Using Dynamic string output inside Block
These variables are "localized" each time the dynamic output is instantiated. … Output from DynamicModule[{x = 1}, code]
DynamicModule[{x = 1},
Print@x;
Print@Dynamic@x;
Dynamic@x]
(* 1 *)
(* x$20686492 $*)
(* 1 *)
The Print[e] cells contain their output outside any …
3
votes
Accepted
Why do I get different symbols (a) with the same FontFace (Cambria Math)?
When I look up Cambria Math on the web, it has a double-storey a, not a single-storey ɑ, for the regular letter "a." In my Mathematica (MacOS), there is no Cambria Math in $FontFamilies. Hacking MS Wo …
9
votes
Changing the Rotate behavior of a 3D graphics
See "Method" in Graphics3D.
Manipulate[
ParametricPlot3D[{Cos[p], Sin[p], 0}, {p, 0, 2 Pi}, Boxed -> False,
Axes -> True, Ticks -> True, AxesOrigin -> {0, 0, 0},
SphericalRegion -> True,
Me …
1
vote
PDE's numerical integration: simplify output: get rid of $[t,r]$'s and ${}^{(0,1)}$'s
Maybe this:
pdForm = # /. HoldPattern[Derivative[n__][f_][x__Symbol]] :>
(Composition @@
Join @@ MapThread[Table[d[#2], {#}] &, {{n}, {x}}])@f &;
Derivative[0, 1][B][t, r] // pdForm
…
2
votes
Monitor only every $n$-th step in NDSolve
As an alternative suggestion, I usually use Dynamic to monitor progress. It seems to add minimal overhead (beyond the overhead of StepMonitor). The use of InputForm lets one see small step sizes (how …