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 ...
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 ...
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 ...
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 ...
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....
2k views

How to find out where an error occurs?

I got this error when using Mathematica: ...
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 ...
156 views

CompiledFunction showing its contents

CompiledFunctions usually appear very compactly, for instance: ...
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 ...
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 ...
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 ...
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 ...
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 ...