29
votes
Accepted
How do I disable the stack tracing feature in Mathematica 11?
Is there a possibility to disable stack tracing, but keep messages?
Internal`$MessageMenu = False
reverts back to the old messages. Seems to do the trick and ...
26
votes
How do I disable the stack tracing feature in Mathematica 11?
Analysis current as of Mathematica version 11.0.1 and 11.1.0.
We can disable the Show Stack Trace item in the new message menu as follows:
...
23
votes
How to catch complete error message information, including the message text as it would be printed?
In version 10 or later, we can use EvaluationData.
EvaluationData[1/0; 0^0]
Behind the scenes, this uses handlers, like in my ...
16
votes
Accepted
Histogram with Error bars
For the case where the height function is "Count", we can use the formula from the linked page in a custom ChartElementFunction ...
14
votes
Accepted
Would it be a good idea to use Failure and FailureQ in own code
What I personally usually do is to still use $Failed / exceptions when a returned $Failed / thrown exception can't be used ...
14
votes
Accepted
Unit tests for Graphics or FE boxes
This has been partially answered before, so here I will highlight some of its evolution since that previous answer. VerificationTest and its ...
10
votes
Saving a log file if an error occurs
I think Internal`WithLocalSettings is the tool you want to use. The syntax is:
...
10
votes
Accepted
How to disable roundoff error tracking in arbitrary precision arithmetic?
There are a few reasonable ways. I'll illustrate with an example of Newton iterations for square roots, take from this MathGroup post
...
10
votes
Why do I get number with Precision larger than error estimate?
Consider any numerical integration method $I^*(f,a,b)$ that approximates the exact integral $I$ of a function $f$ over an interval $[a,b]$. It will be implemented by a computation represented by, say, ...
8
votes
Accepted
Raise Warning/Error on invalid Matrix Addition and Multiplication
That would mean to remove the Listable attribute from Plus. You could do it as follows, but I would not recommend that.
...
7
votes
Accepted
Goal optimization: finding the best combination of capacitors and resistors resulting in given properties
Assume that you have your lists of unique resistor values (resistors) and of unique capacitor values (capacitors). For now, I ...
7
votes
Accepted
Solution of a System of Equations Using `Solve`
I think that that the key feature is to use the MaxExtraConditions option for the Solve command.
In elaborate answer of Artes ...
7
votes
Accepted
Check applied to list is not the same as list of Check
When you write Check[#, "Failed"] & you are creating a pure Function, which by default does not hold its arguments ...
6
votes
Accepted
How to plot a function whose constant parameters have associated uncertainties in Mathematica 8.0?
This does what I think you're after, fiddle with options as desired:
...
6
votes
How to get a list of indices at which errors occur during iteration
Here's one way to do it:
a = {1, 2, 3, 4, 5}; b = {2, 0, 40, 5, 0};
x = Quiet[Table[a[[i]]/b[[i]], {i, 1, 5}]];
Position[x, ComplexInfinity]
{{2}, {5}}
...
6
votes
6
votes
Accepted
How to detect errors that happen in the FrontEnd?
Just to formally answer the question.
This question is a full duplicate of an older question:
MathKernel doesn't return all Messages
where a solution was provided by rcollyer:
To access the ...
Community wiki
5
votes
Accepted
How to track accumulated error?
compare against a higher precision calculation
n = 100000;
ListPlot[Log[10,
Abs[Accumulate@Tan[N[Range[n]]] -
Accumulate@Tan[N[Range[n], 1000]]]]]
5
votes
Accepted
DSolve running forever
I do not know what you mean here. When I run (with $\omega=\sqrt{k/m}$):
DSolve[{y''[t] + \[Omega]^2 y[t] == 1/m Sin[\[Omega] t],
y'[0] == 1, y[0] == 0}, y, t]
...
4
votes
Why do I get number with Precision larger than error estimate?
[Too long to type as a comment, but here is why PrecisionGoal is relevant]
Any number has a precision, and Precision[arb16] ...
4
votes
How to get a list of indices at which errors occur during iteration
Another way (see How to catch complete error message information, including the message text as it would be printed? for more ways to hack messages): This works because ...
4
votes
Accepted
How to catch error messages from parallel kernels
Two changes make it work. Collect the messages on each subkernel and alter Message on each subkernel. The messages can be harvested with ...
4
votes
Histogram with Error bars
This answer below is not directly what you asked but rather about what you should consider doing. With more than 50 or so data points you should consider avoiding histograms completely. More often ...
4
votes
Accepted
Avoiding a for loop to create a list
You're creating pairs {m,h} where each pair really only depends on the previous pair. That's perfect for NestWhileList. ...
4
votes
Accepted
How can I properly use Catch[] to prevent my program from quitting?
It looks like you're using a single-arg Catch. Single-arg Catch will not catch a multi-arg ...
4
votes
Accepted
Catching NDSolve Singularities
You can monitor the step size. It will be "effectively zero" well before it is zero. The code below does not quite do what you want, I think, because it cannot trap ...
4
votes
How to Quiet[] only the first argument of Check[]?
A simple way to achieve the desired effect would be to write:
Quiet@Check[expr, $Failed, {NIntegrate::slwcon}] /. $Failed :> failexpr
If we are worried about ...
4
votes
How to detect errors that happen in the FrontEnd?
According to the Documentation for ErrorBox,
In our case the ErrorBox is implicit, i.e. is generated by the FrontEnd upon ...
4
votes
Mathematica flips the sign of a Maclaurin series
The OP should report that when expanding near 0.0000000000000001 General::munfl will be generated and the numerical result is thus untrustable.
The reason is as ...
4
votes
Accepted
Why is there an error about division by 0?
Answer formed from my comments, which seems to solve the issue:
Try Method -> {BDF, "DiscontinuityProcessing" -> None}. Getting a real fix might ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
error-tracking × 93warning-messages × 35
plotting × 12
numerical-integration × 11
differential-equations × 9
message-coding × 8
equation-solving × 7
debugging × 7
error-trapping × 7
graphics × 6
numerics × 5
programming × 5
calculus-and-analysis × 4
front-end × 3
parallelization × 3
kernel × 3
list-manipulation × 2
functions × 2
bugs × 2
mathematical-optimization × 2
data × 2
legending × 2
core-language × 2
memory × 2
undocumented × 2