# All Questions

511 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 ...
273 views

### Where is my memory? — LibraryLink never returns the memory

Bug introduced in 8.0 or earlier and persisting through 10.3 This is an example LibaryLink code from Mathematica documentation, which takes an integer and return an integer list: ...
452 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: ...
916 views

### Why does this simple program leak memory?

I have a simple Mathematica program which writes some plots to image files for later conversion into a movie. Unfortunately, the program leaks so much memory that it quickly exhausts all 12G of RAM ...
736 views

### How to plot rectangles aligned by their center?

Supose I have a rectangle which area is $x^2$. In some cases I may not know what is the size of each side, for $x=12,$ we have several possibilites: ...
867 views

### What is the fastest way to find an integer-valued row echelon form for a matrix with integer entries?

Let me begin by saying that this is my first post on StackExchange. I apologize in advance if I unwittingly break any of its unwritten rules of etiquette. Recently, I've been trying to understand an ...
893 views

### Estimating the full width half maximum of a peak

I have a dataset of which I'm attempting to determine the full width at half maximum. A picture of the data is given below, and the dataset itself can be found here (pastebin). Now, this set has a ...
418 views

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

The code is as follows, ...
313 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 ...
255 views

### Setting non-standard ImageResolution for EMF export as default

Mathematica has a bug in that BarCharts and ListPlots with Filling will export as a ...
796 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 ...
176 views

### GridBox/packed array behaviour

I have never used low-level formating functions, so this problem might have a simple solution. I'm currently pulling my hair out trying to solve it, however. Consider the following example: ...
1k views

### InterpolationOrder for ContourPlot

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

### How do I overlay things onto a BarChart?

I have a fairly complex sort of BarChart that I want to overlay with other graphics. For concreteness, let's assume that I want to overlay a ...
189 views

### ListLinePlot Filling Wrong

Bug introduced in 8.0 or earlier and persisting through 10.3 or later. I used ListLinePlot to plot data from .csv files. However, the y-values from Graph 1 do ...
244 views

### Why don't products of Dirac deltas integrate correctly?

Bug introduced in 10.0.0 and fixed in 10.0.1 The integral $\int \int \ \delta(x) \delta(y) \ dx dy=1$ evaluates to 0 in Mathematica ...
266 views

### Did 10.0.2 break some forms for named slots?

Bug introduced in 10.0.2 and fixed in 10.2.0 Since 10.0.2 some code that previously worked using named slots fail in very particular circumstances. Attchd screenshot shows the issue w/ a ...
482 views

The dynamic billiard demonstration, that can be found on wolfram demonstrations (here), is only designed for an ellipsoid-shape boundary(snapshot below). The idea is to have a dynamic billiard with ...
294 views

### Unexpected behavior when using SortBy as a dataset filter

I am still experimenting with datasets. Recently I tried to query the Titanic example to get info on the oldest passengers. Here is what I tried ...
255 views

### How to define function that can change patterns

Given time series data as follows: data = {{{2011, 1, 13}, 10}, {{2011, 2, 14}, 17}, {{2011, 3, 15}, 20}, {{2012, 1, 16}, 30}, {{2012, 2, 17}, 40}}; ...
1k views

### Viewing Mathematica Demonstrations Project Code

I hope I am going insane and the I'm not seeing the snake about to bite me... How does one view the code in the demonstration projects that one can download from wolfram.com? It seems like all of ...
417 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 ...
541 views

### Image of input and output cells is not exported correctly

Wolfram Blog uses PNG images to display input and output cells in a notebook. For example, the following is an image from Samuel Chen's post: I should be able to produce a similar image by ...
727 views

When I start a Mathematica 8 session (either command line or with the notebook front end), I notice that there are several packages that have already been loaded for me (using ...
368 views

### Shading a region where an inequality is satisfied

I'm creating solution sets for a calculus course and need to shade the region in $\mathbb R^2$ such that $x^2 < y < x^4$. This is what I have so far: ...
194 views

666 views

### How to do binary calculation？

For example, $a=0.10101$ in binary representation. Then how to calculate $a^2$ directly in mathematica? Is there any function turning binary into decimal? I only found its inverse...
209 views

### Merging lists of pairs [duplicate]

I want to add several fluorescence spectra. They are lists of the format ...
107 views

### How to plot functions with large slope on a compact domain?

The Mathematica command Plot[(1 - r^2)^(1/32), {r, -1, 1}] does not plot the function near the boundary points. That is, the graph does not attain 0 at r = +-1. ...
111 views

### TransformedRegion, RegionPlot broken in 10.0.2.0?

After having had trouble applying TranslationTransform to a simple region like so ...
207 views

### Given the OneIdentity attribute why is GCD[a] evaluated to GCD[a]?

GCD has attribute OneIdentity so I expected GCD[a] being evaluated to a?
350 views

### How to code around known MMa special-case failures?

Fourier Analysis and Signal Processing often require these integrals on functions f[x] that won't be known in advance. ...
138 views

### Unexpected behavior using FromDigits to reconstruct polynomial

I have an issue with the reconstruction of a polynomial using FromDigits. The documentation of the function CoefficientList says: Fold the operation for multivariate polynomials: ...
240 views

### Mod[1.2, 0.2] is not equal to zero

Why doesn't the following expression evaluate to zero? In[1]:=Mod[1.2, 0.2] Out[1]=0.2 Edit: This is what I wanted to do: ...
306 views

### Understanding Dirichlet regularization in Sum

I've tried to calculate few classic sums using Dirichlet regularization: ...