# All Questions

173 views

### Working with Java hashmaps from Mathematica

I'm using J/Link to access data from an external Java program. The data are represented as a ConcurrentHashMap (see the official specification here). ...
130 views

### Behavior of Reduce with variables as domain

When using Reduce, I accidentally put a set of variables as the domain. To my surprise, it not only seems that Reduce expects ...
276 views

### Generate PrimePower counting function

Is there a way to generate a counting function for prime powers - i.e. to create a similar function to PrimePi, but including prime powers. The following will, of ...
206 views

### How to Flatten Array of Arrays of the highest order in a simple way?

I have a matrix of matrices, given in the following code. I want to flatten the array... ...
288 views

### Find asymptotics of Sum[2^i*Binomial[n-i-1,2*n/3-1],{i,0,n/3}]

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

### Find a word's linguistic pronunciation

Is there a way to get a word's linguistic pronunciation given the word as a string? I would like a function LingusticPronunciation such that, for example, ...
887 views

### Filling between parametric plots

I am new with Mathematica, but am trying to fill an area between two parametric plots ...
162 views

### Improving the performance of a package for working with rational functions

As Mathematica gets slow for large symbolic calculations, the cost of putting terms over a common denominator (Together), in particular, gets too high. It occurred ...
151 views

### The Flat Attribute, Unevaluated and the Evaluation Process

To make this question easy to follow let's give some symbols a couple attributes. Attributes[f] = {Flat}; Attributes[s] = {Orderless}; Now consider the ...
313 views

### Find names of the functions defined in a file

Lets say I have a file named file.m that contains: test[] := ( Print["test"] ) How would I go about extracting the function ...
394 views

### Combining Image3D and Graphics3D

I want to combine an Image3D and a Graphics3D using Show. Here is the code: ...
268 views

### Unencoding encoded URLs in a function

Is there a built-in function for decoding encoded URLs in Mathematica? I would like to convert an encoded URL, for example ...
210 views

### Why does array packing in Table behave like this?

Consider the following example, which generate two identical arrays. Why sometimes the array is packed and sometimes it doesn't? And why they perform differently? Here the arrays are packed: ...
391 views

### How to generate a matrix group?

I have three $7\times 7$ matrices (with real entries, lots of zeros) and I'd like to check if they generate a finite group (or, more precisely, if the group they generate is of precise order). Would ...
647 views

### How to change an expression to Fortran90 form?

I have a large expression produced by Mathematica. To use this expression in my Fortran program I need to change it to a Fortran90 form. I am not satisfied with the ...
282 views

### How to change brackets in TraditionalForm output

I'm trying to improve TraditionalForm's output by using different brackets when there are more than one. For instance, instead of $u(v(r(b))))$, I'd like to get ...
792 views

### Dynamic Graph visualization

I'm working on a C++ library that will be used to construct and study certain graphs (as in a set of connected vertices, not a function plot). These graphs will be dynamic in nature (and can ...
336 views

### How to remove ticks?

I wanted to remove the Ticks in my coding but i can't. Here when i try to remove the Ticks the number also gone. I need numbers ...
389 views

### How to Gather a list with some elements considered unique

I have a list of the form: list={{0,...},{1,...},{1,...},{0,...},{3,...},{3,...},{0,...},{0,...},{5,...},{5,...},{5,...},{0,...},{5,...},{0,...},...} So when we ...
246 views

### How to wrap this dynamic code inside a Manipulate?

My goal is to set up a Ising-type simulation, where many fast simulation steps are done in the background, and a visualization of the current state is displayed as the simulation evolves, being ...
172 views

My code: ...
468 views

When I do: ...
627 views

### How to rotate TickMarks in DateListPlot?

Is there a way to rotate TickMarks in DateListPlot to avoid overlap, eg: Part of the code used to generate this is: ...
544 views

### Simplifying the derivative of $|x|$

Context In[855]:= D[Abs[x], x] /. x -> 1 Out[855]= Derivative[1][Abs][1] In[856]:= D[x, x] /. x -> 1 Out[856]= 1 Question Why is ...
572 views

### Using a built-in symbol as a variable

I want to produce a Mathematica Computable Document in which N appears as a variable in my formulae. But N is a reserved word in ...
2k views

### Inverse of a complicated function

Mathematica is struggling to find the inverse of this function f(r): ...
1k views

### how to simplify symbolic integration

The following is the code: ...
697 views

### How to find the smallest root

I have a continuous, differentiable, monotonic, bounded function called F[t]. If t -> Infinity then ...
564 views

### Efficiently deleting rows in many large text files

I have 500 text files each of about 200000 rows. I need to delete one row in each of them as fast as possible (later such operations will repeat). What is the best way to do this with Mathematica? ...
969 views

### Force function to make assumptions about its input variables in Mathematica

I'm trying to force a Mathematica function to make an assumption about its input variables. In my case, I'm trying to define a function to return the pdf of a Gaussian. But let's use a simple toy ...
143 views

### Organizing similar datasets using Contexts or otherwise

I often import several long time series to analyze something about a city. When I have multiple cities, I use contexts. As a simple example, ...
838 views

### How do you get high resolution plots in applications using the Mathematica MathService?

This is for Mac users only using MathService (MathService it seems, given that it was created back in 2004, is a power pc code and requires Rosetta to run on Intel). If I type a plot command in ...
253 views

### How to color edges of a graph which has multiple edges connecting certain vertices

I'm studying BIBD(Balanced Incomplete Block Design) and want to draw some graphs by coloring their blocks in different colors, respectively. A block is a collection of edges (or vertices). For ...
234 views

### How to use Undocumented Functions Prism, Tetrahedron and Hexahedron

Taking a look at this question and this one, I checked to see if Mathematica really does not have a Prism primitive. To my surprise the function ...
237 views

### Map of Specific US States? (Isolated)

My question here is fairly basic, and I'm sure I'm overlooking something basic. I know about CountryData for creating shapes of entire countries, and it works, to ...
333 views

### Find the eigenvector associated with the smallest eigenvalue, not smallest in magnitude

I am trying to find the eigenvector of a $20000 \times 20000$ sparse matrix associated with the smallest eigenvalue. I realized that the smallest eigenvalue might be negative; for example, if the ...
91 views

### How to understand shared passing of a MTensor in LibraryLink?

According to the documentation, there are four different type of memory managing when passing a MTensor with LibraryLink: Automatic, "Constant", "Manual" and "Shared". The Automatic and "Manual" is ...
109 views

### Highlighting Mathematica code in LaTeX document

I was thinking about the best way to include Mathematica code in a LaTeX document with a nice syntax highlighting. I have tried the packages listings and minted (with pygments), which both claim to ...
452 views

### How to randomly erode a 3D distribution of points with Mma 7.0?

Suppose we have a 3D distribution of points, like the spherical ball example below : ...
106 views

### Best way to represent a joint distribution

The motivation for this question is producing a distribution that produces the gender and age of an individual when the distribution of ages depends on gender. Suppose I want a distribution which, ...
115 views

### Possible bug with FourierTransform linearity

Each component is easily transformed but the sum is not: FourierTransform[f''[x], x, k] FourierTransform[f'[x], x, k] ...
285 views

### Having trouble fitting data using NonlinearModelFit

I'm trying to fit data = {{2002, 45000}, {2004, 90000}, {2005, 120000}, {2013, 211000}}; to an exponential function ...
482 views

### combining and comparing lists

I have 2 lists (of lists), where most of the contained lists match. That is, the lists contained in list1 mostly match the lists contained in list2. In this simplified example each of the inner ...
545 views

### Removing empty sets from lists

If I had a list, say, names= {"Andy", "Bob", "Carly", "Sandy", "Jeff", "Tim", "Tom", "Zach"} and I decide to pick a characteristic only a certain of them have, ...
151 views

### The third argument of the Root function

Consider the roots of an arbitrary indecomposable polynomial: sol = Solve[x^5 + 2 x + 1 == 0, x] The returned expression is ...
364 views

### Getting clearer StreamPlot output

When I do a StreamPlotof a rather complicated pair of differential equations, it loses some details. For example: ...
142 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 ...
119 views

### Creating a Block from a list of rules

How can I create a function which works like Block but takes a list of rules as its first argument, rather than a list of assignments? The function needs to be ...