Linked Questions

3
votes
0answers
87 views

Displaying outcome of Trace [duplicate]

Is there a better way to display Trace output? Parsing could be provided to separate blocks of the computation by an extra line. Trace produces a large chunk of unbroken output that I copy into a new ...
114
votes
3answers
5k views

Programmatic formatting for Mathematica code - possible?

It seems to be both an interesting programming challenge and a very useful practical application to have a Mathematica program which would allow one to pretty-print Mathematica code, so that it is ...
23
votes
8answers
6k views

Finding the period of an array of integers

A simple array of integers is given. The problem is to detect if a pattern is repeatedly occurring in the array, and find the length of that pattern. For example, for ...
40
votes
5answers
1k views

How to examine the structure of Graphics objects

One difficulty I'm encountering in studying the structure of Graphics objects is that I have not yet found a way to print or display such structures that are ...
30
votes
4answers
41k 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....
14
votes
2answers
2k views

How to find out where an error occurs?

I got this error when using Mathematica: ...
19
votes
2answers
421 views

Why Infinity /. _?(# < 6 &) -> 0 replaces Infinity with ComplexInfinity?

Suppose I define a matrix: mat = { {Infinity, 4, 9}, {6, Infinity, 10}, {8, 9, Infinity} }; Now I want to replace all values smaller than ...
7
votes
3answers
156 views

CompiledFunction showing its contents

CompiledFunctions usually appear very compactly, for instance: ...
17
votes
2answers
284 views

Serious regression in Integrate in 11.1.1? Division by zero generated

seen first in 11.1.1, Fixed in 11.2 What is going on here? In version 11.1.1 on windows 7 Using Version 11.0.1 also on windows 7 Source code ...
7
votes
1answer
281 views

Why can't I pattern match Dt?

A simple question: MatchQ[f[a], f[x_]] (* True *) MatchQ[D[a], D[x_]] (* True *) MatchQ[Dt[a], Dt[x_]] (* False *) Why doesn't the last test succeed? Is this a ...
3
votes
3answers
856 views

How does one unpack the contents of a list while using rules to substitute values for each variable?

My intention is having a large collection of variables (symbols to be more specific) in a list and substituting all the variables at once with a value using rule instead of going through each one, one ...
8
votes
3answers
174 views

Indexed and array-valued interpolations

Bug introduced in 10.1 or earlier and fixed in 10.4.0 Using Indexed on an InterpolatingFunction leads to an ...
11
votes
1answer
162 views

Trace of -{1} expression

I'm trying to understand Trace. Usually it doesn't repeat but it adds {-1,-1} for his simple expression after having a correct ...
5
votes
2answers
182 views

Is there a way to accelerate buffering to the screen?

I have an application that does a bunch of small computations, mostly Table management, and logic around loops. It takes seconds to execute. However, when I turn on debug (a variable I set for ...
8
votes
1answer
593 views

Visualizing nested lists for easier human understanding

When interacting with Mathematica, I often find myself staring blankly at waves of curly braces, trying to understand how data is organized hierarchically. For example, the beginning of the result to ...
4
votes
2answers
206 views

Procedures on Functions That Remember Values They Have Found

This one can not remember the value. Code 1. f[x_] := f[x] = f[x - 1] + f[x - 2]; f[1] = f[2] = 1; f[5] ?f The 2nd one can keep the value it finds. Code 2. ...
3
votes
1answer
225 views

How to summarize an expression

Is there a similar command as str in R in Mathematica? ...
4
votes
2answers
165 views

TraceScan output with input/output in same order as TracePrint

I would like a version of TraceScan that gives me the ability to see what the trace pattern evaluated to, but prints output in the order that ...
0
votes
1answer
440 views

How does Mathematica interpret a expression?

I'm a beginner to Mathematica. I'd read several document. But I still have a problem. For example, every expression in Mathematica are of the form ...
2
votes
2answers
76 views

Use method “ExactAlgebraics” of PossibleZeroQ for Series zero test

I am trying to compute a series expansion around infinity with very large numerical, but entirely algebraic coefficients, and I keep running into zero test errors, which look exactly like the ones ...
2
votes
1answer
189 views
2
votes
0answers
166 views

Find where an error occurred in a bunch of command line scripts

I have been using my intuition to solve errors in my Mathematica scripts. But when calculations got more complex and I started getting errors involving code in more participating scripts (a script ...
1
vote
0answers
144 views

Debuging in Mathematica [duplicate]

Description I have using Mathematica to solve all kinds of problems that encountered in my study. However, the function that I define to solve specific problem is not always right, in other words, it ...
1
vote
0answers
80 views

Is there packages can help read, analyze or understand MMA codes? [closed]

Sometimes, I think that it's difficult to learn high level codes, or even when looking back on some long lines of codes I myself had written, espectially when lots of pure-functions was used, so I'm ...
0
votes
0answers
39 views

Can we find a way to see how Mathematica does calculation? [duplicate]

Sometimes when we have an expression to calculate, it is the kind of calculation that we do not know how to calculate by ourselves. We use Mathematica to calculate the expression, and Mathematica ...