# All Questions

883 views

### Evaluation of a triple sum does not finish in reasonable time

I'm trying to compute the following triple sum, but no result is produced within a reasonable amount of time. What to do? ...
187 views

### How to get an adaptive frame which fits auto-wrapped text? [duplicate]

When using the built-in Debugger, the breakpoints and the current step will be framed looks like this: My favorite part is, those frames are adaptive to the text when window width changing makes it ...
457 views

### Grid - Item - Alignment to decimal problem

Still present in version 10. I've run into a Grid layout problem for which I don't know a solution. I want to specify alignment to a specific character such as ...
348 views

### Using uniform coloring in MatrixPlot

I have a rectangular matrix, which is m-by-10. Each element is either 0 or 1. I would like 0 to correspond to white elements, and 1 to red elements. This works ...
257 views

### How to make an unremovable modal window?

Is there any way to securely stick a notebook window (e.g. a dialog) on screen that it cannot be closed/removed/hidden by any of the standard OS shortcuts, like AltF4 or AltTab under Windows? The ...
3k views

### How do I draw a DensityPlot in polar coordinates?

I am trying to plot $J_m(\chi_{mn} r) \cos(m\phi),$ where $J_m(\chi_{mn}) =0,$ as a DensityPlot in polar coordinates (solution to 2D wave equation in polar ...
342 views

### Arguments to If[] are not evaluated

I got bitten by the following: f[x_] := 3*x; g[x_] := If[Log[f[x]] < 0, f[x], 0]; g[x] Out[11]= If[Log[3 x] < 0, f[x], 0] where I thought the call to ...
243 views

### Effects of single-point and multi-point calls of Point on plot range

Several Graphics primitives are listable. For instance, Point accepts lists of coordinates so that multiple calls to Point are ...
209 views

### Is there a bug in AssociatePairs?

bug persist as of 10.0.2 In Version 10, the GeneralUtilities package contain some useful functions. AssociatePairs is one of ...
195 views

### AbsoluteOptions prints error messages in V10

Bug introduced in 10.0.0 and fixed in 10.0.2 I am trying to use AbsoluteOptions in V10 but I am getting the Out with some errors as see in this picture: does anyone have same issue?
207 views

### How to suppress Tooltip in built-in templates?

...or maybe switch the message. But I will be happy with no Tooltip at all. I've naively tried with ...
661 views

### How can I return a Sequence?

Recently I had the need to redefine a certain symbol in my init.m so it would be automatically omitted from any lists it appears in. I decided to redefine it to an empty sequence, e.g. ...
255 views

### can a ColorFunction have side effects?

Can anyone explain this (to me) odd behavior. If I run this code once (fresh kernel) it works as intended. ...
366 views

### How does Mathematica know my location?

On the AstronomicalData page in the online reference, it says for AstronomicalData["Sun", "NextRiseTime"] that it finds the ...
345 views

### Combining many plots with Show produces wrong x-axis position and wrong filling

The code is as follows, ...
133 views

### Why won't SparseArray let me store values with the head List?

When you attempt to define a SparseArray with elements that have the head List it complains: ...
402 views

### Syntax highlighter shows error for Manipulate when it's inside a Block or a Module

I'm putting my new copy of Mathematica 10 through its paces and I noticed a weird change in the colouring scheme that I find very annoying, and I'd like to get some insight into why it's happening. ...
312 views

### Correct way to integrate a certain function

I want to integrate $$\int_{0}^{2\pi} dt_1 \frac{a + b*\cos(t_1 - t_2)}{c + d*\cos(t_1 - t_2)}$$ where $a, b, c, d, t_2$ are real numbers and $c + d > 0$ & $0 \leq t_2 \leq 2\pi$. I used ...
282 views

### Create a new infix operator [duplicate]

It is well known that the infix operator @@ is used as a short form of Apply. For example, both ...
286 views

...
208 views

### Return partial result when MemoryConstrained aborts NDSolve

I use NDSolve to solve a large set (~400) of coupled ODEs. Sometimes, the memory (~4GB) gets filled up, and my computer becomes impossible to work with, because it ...
615 views

### Derivative from the left and right

I am currently trying to write a script that takes a curve $C$, a starting point $p$ and a direction vector $\vec{v}$ and calculates the path of a beam starting at $p$ in direction $\vec{v}$ when it ...
263 views

### Make a button that evaluates a function over and over

I would like to have a command "RedoButton" which would make a button (or whatever control is suitable) that when clicked would print the value of a certain function over and over in the same place. ...
424 views

### Extracting equations from Piecewise expressions

Say I have a PDF: PDF[LogNormalDistribution[1.75, 0.65], x] Calculating it, Mathematica gives me an expression that looks like this: I want to extract the ...
930 views

### How do I change the Font in BarChart Legend?

Just wondering if anyone knows the proper Syntax to change the Text properties in the BarChart's ChartLegend. I cannot seem to figure out how to get Style[] to apply. Here is an example: ...
570 views

### Creating randomly oriented planes

I would like to create randomly oriented planes. This is how I'm attempting to do that: I create a 2 random unit vectors, $\mathbf{v}_1$, and $\mathbf{v}_2$, in the $x$-$y$ plane I assume that if I ...
281 views

### Why do quote marks appear in output when saved with Save Selection As?

Update #2: This behavior has been confirm across platforms and in multiple versions. Therefore: Is this a bug or a feature? Can I disable this "feature" so that copying a selection of Cell contents ...
228 views

### Strange filling

I observed some strange behaviour when plotting a function with filling. The code is as follows: ...
153 views

### What is the default ColorFunction for Image3D?

What is the default ColorFunction for Image3D? I find it a bit confusing that the most intense colour is not shown where the ...
403 views

### Why is Poisson Random Deviate Generation so slow?

I am generating Poisson deviates for some numerical work. Mathematica 9.0.1 is very slow in generating these random numbers, as can be seen below. ...
392 views

### In version 9 PlotLegends, how can I remove the strange edges that appear around LegendMarkers?

I'm running Mathematica version 9. I am using ListPlot to plot two sets of data. For each data set, I am using different ...
254 views

### Possible bug with second argument of Dynamic

According to the documentation, Dynamic Details & Options section, especially: For interactive mouse operations Dynamic[expr,{f_start, f, f_end}] typically ...
406 views

### Performing Computations on Sets

I would like to find a permutation of $\quad S=\{\frac{1}{10}, \frac{1}{2}, \frac{4}{7}, \frac{3}{5}, \frac{2}{3} \}\quad$ that maximizes the sum of theses elements raised to unique powers: ...
155 views

### Compile not correctly initializing a variable defined inside Module

In the following example, inside the minimumX's Module, x is initialized to 1, but the ...
231 views

### Apply a Function Pairwise

I'm new to Mathematica I'd like to apply Mean pairwise to a list to achieve the following. ...
159 views

### HorizontalGauge causes problem with ScalingFunctions -> “Log”

I am trying to use HorizontalGauge[Dynamic[expt], {0.1, 100}, ScalingFunctions -> "Log"], i.e. a gauge with a logarithmic scale. This creates an error, a graph ...
268 views

### Change associativity of the @ operator

The @ operator in Mathematica is right-associative by default, i.e. f@g@h evaluates as f@(g@h) Is it possible to make the ...
2k views

...
695 views

### Functional programming and Do loops

I'm writing a Monte Carlo simulation. I'm using a Do loop to create the different simulations, iterating over different ...
327 views

### Defining Tags in Reap

I am trying to use Sow/Reap to replace Append in my code. The problem is that I need to ...
989 views

### BarChart frame labels

This barchart was tricky to style, and I had to resort to the legacy BarCharts`package. Any ideas how to omit the labels from the bottom edge? Ideally I'd also like ...
231 views

### What default theoretical distribution does Mathematica use in PearsonChiSquareTest?

I used Mathematica's function PearsonChiSquareTest to test whether the data were drawn from a normal distribution. As in the reference, I expected Mathematica to compare the result to a normal ...
564 views

### How to set row height in Grid?

I always thought that Grid (and the underlying GridBox) and the general handling of tabular objects is a bit weird in ...
260 views

### Fill out blanks with a upcoming number in a list?

I have a bunch of arrays looking like this: {"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ...
1k views

### InterpolationOrder for ContourPlot

How do I acheive something like InterpolationOrder in ListContourPlot for ContourPlot? My ...
1k views

### How to sum up subelements of a list of unknown length

I'm simply looking for the {}+{} function for sublist elements of a list: (Parallel sums of elements) ...
131 views

### On using DiracDelta[t] in OutputResposne in version 10. Different result from version 9

I am baffled by this. I was trying to run same example I had working in version 9.01 and found now I get empty plots. The example is here . Here is a simplified version of the above. The same exact ...
148 views

### Ticks disappear in Graphics3D with Epilog

Normally, you can enable Graphics3D to show tick marks by doing this: Graphics3D[Sphere[], Axes -> True] But in ...