11
votes
4answers
4k 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: ...
11
votes
2answers
467 views

How can I make a cell that contains an image which can be shifted?

When you're looking at some help pages, they may have cells containing images which can be shifted within the cell by left-clicking and dragging the mouse. Here is a sample: tutorial/...
11
votes
6answers
395 views

Using MapIndexed only at certain elements of a list

MapIndexed is a very handy built-in function. Suppose that I have the following list, called list: ...
11
votes
1answer
353 views

Does NRoots own an abstract counterpart? If not, can we write one?

We know when solving linear algebra equations, despite its abstract syntax, LinearSolve is much faster compared to Solve: ...
11
votes
2answers
417 views

Giving JLink Huge Memory by Default

I have noticed that Mathematica makes use of Java by way of JLink, for example, in the extensions such as DatabaseLink and (I think) RLink. It also seems like Java is a first-class citizen for writing ...
11
votes
2answers
281 views

Boundary effect of Graphics3D object Tube[]

I draw a Graphics3D object of two tubes: Graphics3D[{Tube[{{-0.2, -1, 0}, {-0.2, 1, 0}}, 0.05], Tube[{{0, 0, -1}, {0, 0, 1}}, 0.05]}, Boxed -> False] And ...
11
votes
2answers
354 views

Using Except with strings

Suppose that I have the following sample list, called list: list = {"bBb", "aAa", "aaa"}; Now suppose I want to select the ...
11
votes
1answer
399 views

Selectively clear DownValues

How can I clear a subset of a symbol's DownValues ? For example, suppose I have created some DownValues for $f$ like this: ...
11
votes
1answer
4k views

How to run a Mathematica program using command line on windows?

I have to run some Mathematica programs on a remote computer running the Windows XP operating system. However, I do not know how to run the program using the command line on this system. What do I ...
11
votes
2answers
162 views

Lookup with default broken in Dataset

Given an Association, ...
10
votes
1answer
219 views

Unexpected result from Flatten

Consider the following three evaluations involving Flatten: Flatten[f[f[f[x, y], 1, 2], f[x, y]], Infinity, f] f[x, y, 1, ...
10
votes
1answer
760 views

ParallelEvaluate for function minimization

Is there a parallelized version of a minimization routine available in Mathematica? The objective function is non-linear and the gradients have to be numerically computed. Every function evaluation ...
10
votes
2answers
441 views

Is there a “GrabHand” and “OpenHand” MouseAppearance in Mathematica?

MouseAppearance[Plot[Sin[x], {x, 0, 5}], "LinkHand"] Unfortunately I cannot get a screen grab to show the link hand but it is a cartoon hand with a finger ...
10
votes
2answers
395 views

How do you submit an Input type of “file” using URLExecute?

I have to submit a form like as follows: <input type="file" name="jpgFile"> I can't seem to find any instructions on sending this in URLExecute. If I ...
10
votes
3answers
835 views

Forest plot with Mathematica 9

Does anyone have experience with or a package for the creation of forest plots in Mathematica 9? For instance for subgroup analyses of cox model or meta-analysis (e.g rmeta package in R)?
10
votes
1answer
335 views

How does LocationTest choose its “AutomaticTest”?

Is there a way of determining how LocationTest chooses its "AutomaticTest"? Sometimes it's clear from the ...
10
votes
5answers
334 views

Function for a series of joined slopes

I need a function for a series of joined slopes and my solution feels a bit kludgy. Is there a better way? A list of pairs of transition points and slopes: ...
10
votes
2answers
346 views

Using Gather to rearrange my data

I have a list of elements: {{1, 2}, {1, 5}, {2, 6}, {3, 7}, {4, 8}, {5, 6}, {5, 9}, {9, 13}, {10,11}, {11, 12}, {11, 15}, {15, 16}} I have to divide it into ...
10
votes
1answer
239 views

Mouse gestures or keyboard shortcuts for navigating forward/backward in the documentation center

Is there any way to get gestures (e.g. trackpad- or Magic-Mouse-swiping left/right) to work for navigating forward and backward in the Mathematica help browser, particularly on a Mac? If not, what are ...
10
votes
2answers
380 views

Prevent text from wrapping in a notebook

By default in the Notebook interface the text wraps. Is it possible to prevent this wrapping?
10
votes
3answers
738 views

Mathematica Plot: Inconsistency when plotting large values

I am working with a function in Mathematica and I am getting some inconsistencies when I plot it. As I really need to understand were this comes from I would appreciate any help. I am working with a ...
10
votes
1answer
946 views

Is my expression too complicated for FullSimplify or am I doing something wrong?

I have a messily defined function $v(h, w)$ with $h, w \in \mathbb{R}$ and with a removable singularity at $h=1/2$, and I am trying to prove some of its properties using Mathematica. In particular I ...
10
votes
4answers
294 views

Handy / flexible directory tree operations

Is there any shorter / more handy / more flexible way to get directory tree as a nested Rules/Associations list? I tried to incorporate ...
10
votes
3answers
1k views

How to estimate the matrix condition number in the 2-Norm?

The Mathematica documentation says it is possible to estimate the matrix condition number in norms 1, 2, and ∞. But the 2-norm raises a message. This is an extract from reference documentation "...
9
votes
5answers
6k views

Notation of partial derivative

I want to write partial derivatives of functions with many arguments. Why is it that when I type f[x,y] ctrl+6 (0,1) it turns out to be bad syntax? The output of ...
9
votes
3answers
381 views

Implementation of tensor product formula

For the Bézier surface, which owns the following matrix definition: $$\begin{align*} \mathbf S(u,v)&=\sum_{i=0}^m \sum_{j=0}^n \mathbf P_{i,j} B_{m,i}(u) B_{n,j}(v)\\ &=\small \begin{pmatrix}...
9
votes
1answer
416 views

How to provide your own example data for a custom package?

A nice feature of the mathematica documentation is the copious use of ExampleData in illustrating functionality. I would like to provide some example data for a ...
9
votes
6answers
2k views

Producing cleaner Mathematica output

I asked this in chat and it turns out it would make for a good question make a posting for. I am writing up a handout type notebook and I'd like to have some clean output for presentation's sake. ...
9
votes
6answers
473 views

How to make text flash for a short period

How could I display text that flashed red for a half second or so and then reverted to black? (Or was put in bold and reverted to normal, etc.)
9
votes
5answers
2k views

How to render a 3D ellipsoid with Graphics3D?

With Graphics3D[Sphere[{0, 0, 0}, 1]], I can render a uniform 3D sphere, but how can I render an ellipsoid? I would need to specify the rotation of the ellipsoid ...
9
votes
1answer
249 views

10.0.2 breaks a recursive “trie” query

The 10.0.2 Dataset type system complication breaks a recursive trie constructor that worked in 0.1: ...
9
votes
3answers
536 views

Using NSolve in the complex plane

I am trying to find numerical values for $\Im\ e^{\frac{1}{2} +i\ y} = \Im\ \zeta(\frac{1}{2} +i\ y)$ for a given range. I have tried: ...
9
votes
2answers
800 views

Export list elements each to it's own page in a multi-paged PDF document

I have a list, myList, of let's say 20 (different) objects myList = Table["object", {20}] I know would like to export every ...
9
votes
1answer
159 views

Tracking Initialization

How to track Initialization step by step? Any tricky solution is ok. One condition, x should be ...
9
votes
2answers
895 views

Customize your FrameTicks in a MATLAB way

The figure below is made by MATLAB. However, the scientific form of numbers in FrameTicks that how MATLAB deals with is quite different from that of Mathematica. ...
9
votes
3answers
730 views

How can I find the vertexes of a Polygon?

I made a polygon with the following vertexes : ...
9
votes
2answers
6k views

Mathematica sporadically crashes on open

Sometimes, when I open Mathematica, while the opening splash screen still says "Initializing Kernel Connections", Windows will tell me that "Wolfram Mathematica 9 has stopped working". This will ...
9
votes
3answers
197 views

Problem constructing Association tables with some operators

fixed in 10.0.2 First, set up the example Dataset from the documentation: titanic = ExampleData[{"Dataset", "Titanic"}]; ...
9
votes
0answers
301 views

Dataset: cannot reproduce a basic example. A bug? [duplicate]

Just to report: I try to reproduce the very first example for the Dataset from the Documentation Center: ...
9
votes
1answer
749 views

How can I display a multigraph with different colored edges?

I'm new to Mathematica(version 9) and I'm trying to display a multigraph with different colored edges. Here's my code so far: ...
9
votes
3answers
480 views

Changing the atom color for plotting xyz-files

Mathematica takes the standard color code for atoms when plotting an *.xyz file, but I want to customize the color for the specific atoms. I really become desperate as I did not get it so far. ...
9
votes
1answer
435 views

Sorting function for non commuting bosons

I am trying to write a sorting function which will sort expressions involving products of bosonic objects which do not commute. For example, I can have objects like $a,\ a^\dagger,\ b,\ b^\dagger$ ...
9
votes
2answers
170 views

Passing an unevaluated part of an association to a function

I'm making a UI widget that controls sound volume on a speaker using a slider, e.g.: ...
9
votes
1answer
316 views

Suppress Mathematica Kernel taskbar tab when using .NETLink

Is there a possibility to suppress the Mathematica Kernel taskbar tab when accessing it through .NETLink on Windows?
8
votes
6answers
2k views

Simplifying nested If statements

Consider : list = {100,102,103,99,106,107,104,112} I want to consider, extract only the "big moves" of that time series. In this case the moves bigger then 5 ...
8
votes
2answers
208 views

Does PrivateFontOptions -> {“OperatorSubstitution” ->False} fail in version 10?

Please consider the following, version 10.0.1, OS X Mavericks: ...
8
votes
1answer
111 views

SparseArray output triggers “unsafe dynamic content” warning

The first basic example in the documentation of SparseArray: ...
8
votes
2answers
670 views

Finding the coefficient of a certain power in a generating function

I want to compute $(t^1+\dots +t^5)(t^2+\dots+ t^6)(t^3+\dots +t^9)$ and find the coefficient of $t^{15}$ for example. $t$ is an indeterminate Now in Maple this is simply as ...
8
votes
3answers
243 views

How to create a version of FixedPointList for asymptotically periodic functions?

I need to efficiently generate a bunch of bifurcation diagrams. A simple familiar example illustrates the efficiency problems I'm running into: ...
8
votes
2answers
125 views

How to make a notebook take action whenever a particular symbol is defined or redefined?

For teaching purposes, I want to create a Mathematica notebook that will "notice" when the user defines or redefines a variable or function of a particular name, so that it can check the value and ...

15 30 50 per page