# All Questions

771 views

### Subsets of a list

Consider the following demand of products for the next four months. data={1,20,3,40}; I could produce the whole demand in the first months, leading to the ...
215 views

### Changing mouse appearance at notebook level

Ideally, I'd like to change the mouse pointer appearance(s) at notebook level, from a styleseet. However, I'd be satisfied only by changing its color. This is the main issue keepeing me away from ...
363 views

### How to do algebra on unevaluated integrals?

I am working with functions calculated from a set of general basis functions. ...
2k views

### ListPlot multiple datasets over same x-values

Is there a better way to enter my data into a list plot? ...
982 views

### Plotting Tupper's self-referential formula using ArrayPlot

For those who are not familiar with Tupper's self-referential formula, here is the wiki link. My interest was to plot it. I tried the naive approach using ...
715 views

### Constrain movement of a locator inside Manipulate

Once again a big thank you for the great help in my earlier post: Plotting function with Dynamic parameter. It totally worked out. I now have a new coding problem ...
246 views

### How to compile a diagonal array efficiently?

For example, if we use some functions defined prior to Compile, we usually have the main evaluators in the compiled codes, pointing to the definition of the ...
1k views

### 3N-dimensional integral

I'm trying to compute a multidimensional integral with a variable number of dimensions. The integral is as follows: $$\int d^{3N}\!p~e^{-\frac{\beta}{2m}\vec p^2}.$$ I have tried this ...
930 views

### Plot3d: How to color a surface according to the slope of the surface?

Here is my approach, for an example surface function: surface[x_, y_] := Sin[x y]; The normal vector of a point in the surface is computed as: ...
250 views

### generating randomly oriented non-intersecting cylinders

I could not find anything relevant with "googling" (only this) I can create a set of randomly oriented cylinders (code found here) ...
852 views

### Data filtering using Butterworth filter

I want to filter data using Butterworth filter. I am currently using Matlab and I want to know how to do it in Mathematica. I have the following data: ...
395 views

### Replace with position and order number

question conversion1 : Convert "[AA]AB[AA]BB[AA]B[AA]CCC" to "[A1A2]A3B1[A4A5]B2B3[A6A7]B4[A8A9]CCC" conversion2 : Convert <...
2k views

### How to draw grid lines on top of a plot?

I want to use ArrayPlot instead of a DensityPlot because it seems to be faster (more here) I still want axes ticks to have real ...
373 views

### Why does GridLines option fail with Function?

Bug introduced in 10.0.0 and fixed in 10.0.1 The Plot option GridLines can be specified either as a list of explicit values ...
1k views

### What does DisplayFunction->Identity do to graphics functions?

Does DisplayFunction->Identity do anything at all in Mathematica 8? In the third edition of Programming in Mathematica, Roman Maeder gives the following ...
739 views

### Space-efficient null space of sparse array

I have a roughly 100,000 × 3,000 matrix (as a SparseArray) that I'd like to find the kernel (null space) of. It has about 500,000 nonzero entries, all -1 or 1. ...
252 views

### Using Through to evaluate complex expressions

Suppose we're given the expression f*g+h, where f,g,h are all pure functions. How can we evaluate this expression on some ...
1k views

### Building a continued fraction

I've completed a problem that involves approximating $e$ by a continued fraction: $$\frac{N_1}{D_1+\frac{N_2}{D_2+\frac{N_3}{\ddots+\frac{N_k}{D_k}}}}$$ with the $N_i$ being the list ...
542 views

### Copying Greek text from notebooks as unicode [duplicate]

Possible Duplicate: How to “Copy as Unicode” from a Notebook? How can I copy Greek text from notebooks as proper Unicode that can be pasted into other applications? If I type some ...
213 views

### Is there a good reason for the removal of this FrameTicks syntax?

In past versions of Mathematica one could use a terse syntax for FrameTicks: {bottom, left, top, right} In 10.1 this syntax is no longer recognized requiring the ...
667 views

### Why does Hash return different values in Version 7?

This function does not work correctly for me. The generated Gravatars do not match the ones actually produced by using the corresponding address. The problem was traced to differing output from the <...
414 views

### Mathematica9: NDSolve slows down after repeated calls

Bug introduced in 9.0 or earlier and persisting through 10.4.1 or later I have noted that in Mathematica 9 my code, which involves a lot of calls to NDSolve, ...
1k views

### Labels and tickmarks inside Frame

Is there a way to force Plot and related functions to place the tick labels inside, rather than outside a frame? For example, consider, ...
617 views

### Nest , Fold … is there an extension for more than 2 arguments?

Fold is an extension of Nest for 2 arguments. How does one extend this concept to multiple arguments. Here is a trivial example: ...
215 views

### Notebook's WindowSize interference with contents' Dynamic ImageSizes

Bug introduced in 8 or earlier and persists through 10.4.0 or later Consider the following MWE: ...
376 views

### Complement on pre-sorted lists

Is there any way to instruct Complement to skip the sorting part? If the answer is no (likely), the next question would be: how can I remove from a sorted list ...
494 views

### Making cells group

After reading rcollyer's post I'm still not able to understand how grouping rules work. Here is a problem I'm facing. What I want is to create a new title, section and subsection styles. I want the ...
583 views

### Mathematica 10 doesn't support path containing Chinese characters

Bug introduced in 10.0 and fixed in 10.0.2 I tried to import file in Mathematica 10 ( windows 7 system), the path contains some chinese characters. After holding ctrl+shift, and drag the file into ...
342 views

### GroupBy a list of associations with their keys

How can I go from ...
526 views

### Mathematica 9 can't integrate this function but earlier versions could

Integrate[ ArcTan[x]/(1 + x) Log[(1 + x^2)/2], {x, -1, 1}] I used Mathematica 9.0.1 on Windows7 32bit, Mathematica 9 cannot compute this, but Mathematica 8 gives ...
217 views

### Hold expression with RandomInteger

One more question for today: I'm trying to show two random integers with a plus (+) sign between them, in an unevaluated form. I know how Hold and HoldForm work, but they hold everything, including ...
948 views

### Efficient by-element updates to SparseArrays

I have a very large SparseArray called A. What is the most efficient way to update say element ...
283 views

### How do I invoke the default complexity function?

Documentation on ComplexityFunction says: With the default setting ComplexityFunction->Automatic, forms are ranked ...
262 views

### Unexpected behavior of GeometricTransformation

Bug introduced in 8.0 or earlier and persisting through 10.3 or later I have the following mapping on the complex plane: $$z \mapsto \tau \mu z-1,$$ where $\mu$ is complex, $\tau$ is real number....
2k views

### Label Markers On ListPlot

I would like to make a scatter plot where each element corresponds to a certain energy. Each plot marker should have its corresponding element next to it. IE. The data point at -1.16187 should have ...
254 views

### How to get all possible orderings (equal ranks allowed) for given set of $N$ objects?

Hope there is a solution besides the tedious generation of nested loops. (Trying to avoid reinventing the wheel.) Here is an example with $N = 3$ objects. There are $13$ needed orderings (first ...
337 views

### Using MatchQ (or other means) to parse an expression using sums of COS or SIN correctly

I am writing a function that will take an expression as input. I want to make sure the expression is valid first before processing it. Looking for a correct to use ...
2k views

### How to convert a string of number into real numbers without precision loss

I searched and did not find similar answers which can resolve the 'no precision loss' issue. A sample string is: ...
3k views

### Rescale axes (e.g change from Hz to THz)

I have multiple plots of permittivity against frequency, but they're hard to read because the frequency labels go from 4x10^14 to 1x10^15 in Hz. I want to label the frequency with THz instead of Hz, ...
218 views

### Possible bug involving Dataset/Query and RightComposition

Bug introduced in 10.0.0 and fixed in 10.0.1 Short Version Why are the results of the following expressions different? ...
186 views

### Fine tuning compiled code that computes dilogarithm function

As an exercise of writing a good Compile function, I want to do the simple task of coding a routine that outputs the real part of the dilogarithm function ...
3k views

### How do I fill in a circle made by ParametricPlot with one solid color?

I have a very simple question but I am new with Mathematica. I made a circle on a parametric plot and I made the line black. I want to make the inside of the circle on the parametric plot red. So the ...
2k views

### Problem with plotting eigenvalues

I want to plot the eigenvalues of a matrix which is dependant on a parameter (well, actually I want to plot a tight-binding electronic band structure). The dimension of the hamitonian matrix is ...
387 views

### How can I insert an EPS file exported from RegionPlot into MS Word?

I generate a figure using RegionPlot and then Export it as "EPS". When I insert this picture ...
771 views

I want to read a file which contains seven columns of real numbers. Mathematica seems to have a problem with the high precision I need. My code: ...
540 views

### “Show” with Manipulate runs fine normally, but gives errors as a CDF

I've simplified my code to what can reproduce my error. Basically, I have two lines: ...
252 views

### Removing background from peak function

Let's say I have a a very large list of data in the format {{n,f[n]}} so something like {{1,600},{2,700},{3,1100}...} and if this data is plotted, then it will look like a sum of Gaussian functions+a ...
372 views

### How to change the color of specified digits in a number?

I've been playing with numerical approximations for irrational numbers, and would find it convenient to be able to highlight where these approximations deviate from the known correct answers. For ...