Questions tagged [error]

Questions seeking help understanding error messages and fixing errors.

Filter by
Sorted by
Tagged with
45
votes
4answers
8k views

Why does MatrixForm affect calculations?

This is a really newbie question, but it has me confused. Why does this code work without // MatrixForm and doesn't work with ...
37
votes
7answers
7k views

Importing a large Excel file

I'm trying to import a simple Excel file containing 94,000 rows and 52 columns of various types, mostly Reals. It's a 38-MB file. I get this super helpful error ...
35
votes
2answers
5k views

Mathematica stuck in “running” for every calculation I attempt, kernel error

Bug introduced in 11.1.1 and fixed in 11.1.1 Bug was caused by a paclet update and fixed by a paclet update. I downloaded Mathematica this morning to do an implicit polar plot. I attempt to run the ...
34
votes
3answers
2k views

No warning when extrapolating with Plot

One of the most annoying "features" of Mathematica is that the Plot family does extrapolation on InterpolatingFunctions without ...
26
votes
4answers
27k views

How do I identify the source of a “Tag times protected” error?

I have some code that looks like Table[ a = 1; b = {2, 3} c = i;, {i, 2} ] which gives an error: Set::write: Tag Times in c {2,3} is Protected....
24
votes
3answers
4k views

What is an “INTERNAL SELF-TEST ERROR”?

I got this all the time after updating to 9.0 (OS 10.8.2): That's Clipboard|c|3015 for the benefit of anyone searching. The error went away with 9.0.1, but a version has reappeared (multiple times ...
23
votes
2answers
3k views

Using a compiled function inside NIntegrate gives “CompiledFunction::cfsa” message

The following function is defined for Real input: ...
21
votes
3answers
17k views

General::ivar is not a valid variable when plotting - what actually causes this and how to avoid it?

I was just evaluating a couple of expressions and started to get errors like this: ...
21
votes
2answers
8k views

Can Reduce *really* not solve for x here?

Sometimes I get the feeling I'm just flailing blindly with Mathematica. Is solving for $x$ in the equation $$ \frac{\cosh (x/2)}{x} = \sqrt{2} $$ really beyond the scope of Mathematica? I try to ...
21
votes
1answer
399 views

ClearAll::clloc - “Cannot clear local variable x” in Block[{x}, …] - why?

Block[{x}, ClearAll@x] ClearAll::clloc: Cannot clear local variable x. The documentation just says An error occurs because ClearAll cannot be used with a ...
20
votes
5answers
1k views

Take screenshot of the entire desktop using Mathematica

Is it possible to get a screenshot of the entire desktop directly in Mathematica? I am on Ubuntu running Mathematica 8. For some reason GUIScreenShot[] fails. But ...
19
votes
6answers
17k views

How to get rid of warnings when using Solve on an equation with inexact coefficients?

When I solve this equation in Mathematica 8, I can get the right answer, but with some uncomfortable warnings. Equation: ...
18
votes
4answers
2k views

Using Position (which requires a pattern) in the same manner as Select (which requires a criterion)

I am using Mathematica7. I have a list of lists (creatively named list in the following sample code) containing data. I would like to find the positions of the ...
18
votes
1answer
1k views

Quiet doesn't work with FindRoot when using Brent method

Bug introduced in 9.0.1 or earlier and persisting through 12.0 or later The following has no solution: FindRoot[x == 1, {x, 0.25, 0, 0.5}] And Mathematica ...
17
votes
2answers
868 views

Error “Throw::nocatch: Uncaught Throw[False] returned to top level” given each time I open a new Mathematica 10.1 session

Bug fixed in 10.1.0 via paclet update Since a few days now, each time I open a new Mathematica session I get the small red error popup window with the error messages: ...
15
votes
1answer
2k views

Finding a Specific Line in a Package

In a package I am developing, I accidentally left this line Protect[ uncompleted prior to running the package. Mathematica produced this error message ...
14
votes
2answers
1k views

How to find out where an error occurs?

I got this error when using Mathematica: ...
14
votes
2answers
2k views

NIntegrate error bound

I am trying to evaluate a highly oscillatory integral using NIntegrate. I fear that due to limited resources (time and/or memory), I will not be able to evaluate the integral to the desired precision. ...
14
votes
1answer
10k views

How do I prevent NIntegrate::inumr errors within other functions?

I believe this question is best illustrated with a simple example. If I run FunctionInterpolation[NIntegrate[a + b, {a, 0, 1}], {b, 0, 1}] I get errors of the ...
14
votes
1answer
363 views

Plotting the eigenmodes of a cylindrical shell

There are many examples of eigenmodes computations for surfaces with Mathematica, such as: https://www.wolfram.com/mathematica/new-in-10/pdes-and-finite-elements/solve-a-wave-equation-in-2d.html, ...
13
votes
2answers
3k views

Why is this semicolon in red?

I have a piece of code that works well, but when I put a semicolon after a plotting statement, the semicolon appears in red. What's the error?
12
votes
4answers
6k views

What is the cleanest way to prevent divide-by-zero warnings?

If I evaluate {1, 2, 3, 4}/{5, 6, 0, 8}, obviously I get one warning: ...
12
votes
3answers
524 views

Why does MatrixFunction with Sinc return this error?

The following: mat = {{1., -3, -2}, {-1, 3, -2}, {0., 0., 0.}} MatrixFunction[Sinc, mat] returns: ...
12
votes
2answers
790 views

Is FrameTicks broken in 10.1.0?

On my system, Mathematica 10.1.0 under Windows, none of these FrameTicks documentation examples work correctly: ...
12
votes
1answer
2k views

What does the message 'This file contains potentially unsafe …' mean and how serious is it?

I had some Mathematica files on over which recently I have faced to this message: However, after searching, I have seen some blogs in Mathematica SE or in somewhere else about that, but I could not ...
12
votes
1answer
690 views

Why does 1 - Exp[-10.0^12] cause an out-of-memory error?

I would like to understand why evaluation of the expression 1 - Exp[-10.0^12] causes an out-of-memory error and how can I prevent such errors when calculating ...
12
votes
1answer
388 views

SymplecticPartitionedRungeKutta shows strange error

Bug introduced in 9.0 and fixed in 11.3.0 or earlier I tried to solve Hamiltonian system ($Q$ is a vector of all generalized coordinates, $P$ - of generalized momentum) $$ \frac{\mathrm{d} Q}{\mathrm{...
12
votes
1answer
369 views

StringMatchQ and Alternatives throws message in init.m

Bug fixed in 11.2.0 The report of this issue, which itself relates to code of my answer here, exposed a behavior I cannot explain. If I use StringMatchQ in ...
12
votes
1answer
762 views

Safe way to put a pattern on the right hand side of a rule

I'm interested in creating a function or rule that generates its own set of rules. For instance, it would take as an input the expression h[m, n] and the indices <...
12
votes
1answer
164 views

Bug with Compile and Log2?

It seems that Log2 in Compile gives numerical errors (CompiledFunction::cfn) if the input is ...
11
votes
3answers
565 views

Symbolic integration fails while numerical integration succeeds

I am hoping to evaluate the following integral Integrate[((r^3 - 7)^(2/3)*(1 - (r^3 - 7)^(2/3)/r^2))/r^3, {r, 2, Infinity}] but Mathematica informs me that this ...
11
votes
4answers
5k views

DSolve not finding solution I expected

Try to solve the following ODE via DSolve $$ \left\{\begin{aligned} y'(x)+2 y(x) e^x-y(x)^2 &= e^{2 x}+e^x \\ y'(0) &=1 \end{aligned}\right. $$ The ...
11
votes
1answer
407 views

Compilation of Total with compensated summation

I sometimes obtain an unexpected error when trying to call a compiled version of Total with compensated summation turned on. More specifically I define ...
11
votes
2answers
501 views

How to find a specific error message?

Is there a way to find an existing error message in the System` context, that is used for a certain case? I want to include a message in a custom function that ...
11
votes
1answer
28k views

What does “Tag Integer is Protected” message mean?

(Newbie question) For every function I define I get this message: When I close and reopen Mathematica, and re-enter the function definition, I don't get the message anymore. What does it mean?
11
votes
1answer
345 views

Benchmark report seems to be slightly broken in 11.3.0

I am trying to use 11.3 to Benchmark. Something is strange in the opened report. And the Message said, What's up?
11
votes
1answer
600 views

How to use an external GPU to train neural networks in Mathematica?

Taking steps in the uncharted territories of eGPUs, I have installed an NVIDIA GeForce Titan Xp GPU on an eGPU enclosure (Mantiz MZ-02) and have connected it to my laptop (HP Spectre x360 - 15-bl075nr ...
10
votes
2answers
1k views

Solving/Reducing equations in $\mathbb{Z}/p\mathbb{Z}$

I was trying to find all the numbers $n$ for which $2^n=n\mod 10^k$ using Mathematica. My first try: Reduce[2^n == n, n, Modulus -> 100] However, I receive ...
10
votes
2answers
2k views

How to switch off all messages?

How can I want to switch off all messages in a Mathematica session? Quiet[expr] allows me to evaluate expr without messages. <...
10
votes
2answers
774 views

Interpolating an Antiderivative

I'd like to be able to make InterpolatingFunctions for antiderivatives of functions that can't be integrated symbolically. However, the following code returns ...
10
votes
2answers
550 views

Adding a constant vector to a vector differential equation seems to break NDSolve. Why?

I'm trying to solve a differential equation that's phrased in terms of matrices and vectors. My minimum working example is this: ...
10
votes
1answer
919 views

Differences between DSolve and NDSolve

I have a question about the difference in the solution between DSolve and NDSolve. I want to solve the Friedmann equation of \...
10
votes
1answer
86 views

How to reset the size of the Stack Trace Window?

Normally the size of the Stack Trace window can easily be changed using the ResizeArea element in the lower right corner. However, if one makes this window too ...
10
votes
1answer
125 views

Bug when importing Neural Nets from .m files in a fresh kernel

Bug introduced in 11.0.0 and fixed in 11.0.1 Importing Neural Nets from .m files seems to destroy the neural net. ...
10
votes
2answers
193 views

Using Merge[Identity] and Transpose on a Dataset

While experimenting with this answer, I ran across the following: ...
10
votes
1answer
304 views

Can a System symbol spontaneously leak into a Global namespace?

During the development of a program to process bioinformatic data, I have encountered a peculiar shadow warning: Global...
10
votes
1answer
261 views

How to deal with bad arguments when a function's UpValues is a pure-function?

In practice, I needs to define the UpValues of a user-defined function. For instance, the operation of function like differential formula , expansion and so on. ...
10
votes
1answer
260 views

Enigmatic message about MaxBend

Referring to the method I proposed for Problem with ParametricPlot Mathematica 10.0.2 throws an enigmatic error message: ...
9
votes
2answers
5k views

What do I do when I get an “Iterator does not have appropriate bounds” error?

I used this as input Table[600851475143/i , {i, 1, 600851475143}] but got an error ...
9
votes
3answers
2k views

Error “Power::infy: Infinite expression 1/0 encountered”. Why do I get this?

Bug introduced in 11.0 or earlier and persisting through 11.1 I need to write this function piecewise and to make a graph for it, x[-3,3]: ...