# All Questions

818 views

### How to extract and replace submatrix of a doubly-periodic matrix?

How can I effectively extract and replace a rectangular subpart of a toroidal matrix, i.e. one where boundaries are connected at opposite ends? Since the submatrix can overhang the edges, a simple ...
263 views

### Does InterpolationOrder cause conflicts with PlotMarkers in ListPlot?

Bug introduced in 7.0 or earlier and persisting through 10.3.1 or later My code: ...
710 views

### Restrict Locator to a certain graphic inside Manipulate

I would like to restrict the Locator inside Manipulate to a certain graphic. For example if I display two graphs, I would like to be able to click on the right one and use this information in other ...
290 views

### Numbers in alternate bases transcend the evaluator?

It looks to me like a number in a base other than base 10 gets evaluated before the evaluator ever gets a chance to be tweaked. For example, FullForm[16^^abcdef] ...
643 views

### Surprises simplifying simple polynomials

I came across some somewhat surprising behavior of Simplify today, on something very simple. Let's take two cubic polynomials that we know have the same value: ...
846 views

### How to plot a barycentric line

I want to plot a barycentric function on an equilateral triangle (ternary plot). For example f1 = {Abs[Sin[x]], Mod[x, 2], Abs[Cos[x]]}; At the moment I evaluate ...
4k views

### Strategies for simplifying complicated expressions

I have a very complicated expression involving trigonometric functions, complex numbers etc. You may find it here as it is too long to be pasted here. You may also find a screenshot of it here. ...
156 views

### Lookup with default broken in Dataset

Given an Association, ...
349 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: ...
814 views

I was trying to run some notebook I downloaded from MathWorld, but lots of them need << MathWorldCurves I tried to google it , only to find this, but ...
278 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 ...
406 views

### Find asymptotics of $\sum\limits_{i=0}^{n/3} 2^i \binom{n-i-1}{\frac{2n}{3}-1}$

I have an expression 2^n / Sum[ 2^i Binomial[ n - i - 1, 2n/3 - 1], { i, 0, n/3}] ...
171 views

### Functions returns Command Completion Output

Is there a function that returns the output as if you invoked Command Completion. To help clarify I am looking for a function that returns the Cell Data as if you invoked ...
1k views

### How can I visualize 6 square matrices as a cube?

I have six square matrices of the same dimensions in a list, for example: ...
743 views

### Convert Graph to Graphics

In Mathematica 9, a graph is returned as an object with head Graph: In[1]:= CompleteGraph[8] // Head Out[1]= Graph ...
456 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: ...
1k views

### Manipulate (Linux version of Mathematica)

I'm runnning Mathematica 9 on Ubuntu 11.10. After installing CDF player I still have problem (most of time) with Manipulate. Only way I'm able to change value of a ...
939 views

### NDSolve Differential Equation Error

I am trying to solve the following differential equation- ...
306 views

### Plotting a function, x = 1024

The function s12 = 1/(Log[2^x]*((7.537/(x^2)) + (30.148/((2 + x)^3)))) returns expected function values for ...
934 views

### Graphically representing error in a Riemann Sum

I am trying to graphically represent the error in a Riemann sum. My current code looks like: ...
714 views

### backward compatibility

When producing or enhancing code, it is tempting to use recent new primitives of Mathematica introduced in version 7 and 8, but for library code or in preparation or future version change in ...
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: ...
467 views

### How do you concatenate matrices? And how do you make block matrices?

This is pretty trivial to do in Matlab, but I have not seen a function for it in Mathematica. Here is how you can do it with Join and ...
366 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 ...
282 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 ...
330 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: ...
244 views

### Backslash commands in strings?

I discovered by playing around that Text[DisplayForm@SubscriptBox["\[Lambda]", "k"]] produces the same result as ...
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 ...
329 views

### How does LocationTest choose its “AutomaticTest”?

Is there a way of determining how LocationTest chooses its "AutomaticTest"? Sometimes it's clear from the ...
600 views

### Why is ParallelMap way slower than Map

I recently tried to use ParallelMap instead of Map and to my surprise encountered that ...
704 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 ...
390 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 ...
422 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 ...
218 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, ...
819 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)?
925 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 ...
727 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 ...
342 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 ...
663 views

### HighlightGraph with different styles

I want to highlight two different directed paths on a graph with two different style. I am using the following two code snippets: ...
367 views

### Prevent text from wrapping in a notebook

By default in the Notebook interface the text wraps. Is it possible to prevent this wrapping?
318 views

### How to work around incorrect tooltips in plots exported to HTML

This is an issue that I always wanted to investigate but haven't gotten around to solving yet: The tooltips for contour lines in a plot like this can be very useful in the Notebook interface: ...
234 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 ...
295 views

### Implementation of a matrix formula

For the Bézier surface, which owns the following matrix definition: \begin{align*} S(u,v)&=\sum_{i=0}^m \sum_{j=0}^n P_{i,j} B_{m,i}(u) B_{n,j}(v)\\ &=\small ...
156 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.: ...
247 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: ...
157 views

### Tracking Initialization

How to track Initialization step by step? Any tricky solution is ok. One condition, x should be ...
323 views

### Any packages for vertex enumeration on Mathematica?

My work requires me to enumerate all vertices of a polytope defined by linear inequalities from time to time. And I'm mainly working with _Mathematica 9.0 on Mac OS X 10.9. So I wonder are there any ...
195 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"}]; ...