# All Questions

7 views

### ListDensityPlot seems to break down for large arrays

(Using Mathematica 10) When using ListDensityPlot to plot 40000 + data points, the produced plot seems to be blurred/incorrect for points occurring later in the list. For instance, in the following ...
35 views

### How to display line numbers in the Mathematica?

Is there such a thing in Mathematica; something like line numbers in Notepad++?
14 views

### Extra spaces when exporting strings

Here is a simple string "Amin,new". If I export it into pdf with Export command, I get instead: $\text{Amin ,new}$ Question: Note the space before comma. Why ...
49 views

### Vertex styling in CommunityGraphPlot

Is there a way to change the colours of nodes within one community? Mathematica assigns vertex colours automatically to each community. However, I'd rather like to use my own colour set. ...
2k views

### how to differentiate formally?

I have been wrapping my head around this for a while now and I have not found a solution so far. I want to work with an arbitrary number of variables in mathematica and use some built in functions. ...
25 views

### Applying a function which operates on lists of unequal dimensions

I have a list of 30,000 elements, each of the element is a list in itself {{a, b},{p, q, r}, {a, p}, ... {z, x}}. Second one contains unique elements ...
46 views

### Code reuse between files in the same directory

At the moment, I am producing various complicated interactive plots. They all share a common "code base", with modifications on top of it. I would like to refactor my code so that the various files ...
42 views

### What is the simplest way to plot x^(1/3) on the interval [-3,3]?

My question is: What is the simplest way to plot x^(1/3) on the interval [-3,3]?
13 views

### Plotting the Schwarz D minimal surface

With the aid of the following paper I'm trying to plot the Schwarz D minimal surface: paper. So far I have followed all the instructions to the best of my abilities and have come up with the following ...
29 views

### Typesetting for different powers

Suppose that I want to typeset an object such that it looks differently for different powers. The simplest example would be a three vector. For odd powers I want it to look like $$|\vec{v}|^n,$$ while ...
22 views

### Initial values/parameters in equation system of dimension 32

This is a system of equations of dimension 32, that describes an economic system. I want to find a set of parameters and initial values in which the system can be solved, and solve the system of ...
145 views

### Input a square matrix and return a list of the matrix entries read by antidiagonals

I have a square matrix: {{1,2,3},{4,5,6},{7,8,9}} and I want to get a list: {1,2,4,3,5,7}
27 views

### Characterising the set of parameters that satisfy a system of non-linear equations

I am looking for a solution to the following problem and could not find an answer so far. I have a quintic equation, $f(x;a,b,c,\cdots)-x=0$, where $x$ is the variable with respect to which I need the ...
34 views

I am deeply involved in product configuration, i.e. in developing a software infrastructure, which ensures, that a customizable product can actually be manufactured. This involves defining rules for ...
35 views

### Series expand root of quartic polynomial containing many real parameters and FullSimplify return Indeterminate

Using Mathematica I can get the Eigenvalues of the following matrix: ...
15 views

### Code to import and export “.cine” image format?

I need to work with a set of experimental data in the form of ".cine" format image files. This is a data format developed by Vision Research for high-speed imaging and video. I would like to import ...
40 views

### Strange appearance artefact in ActionMenu

I've noticed a strange thing with ActionMenu which can also be seen in the documentation for V9 and V10 on OS X. It seems that when an ...
45 views

### Cases Except - Selective Exclusion

Please help me use Cases,Except on list data. I just want to remove all primes, or equivocally to see only the values in the list produced that aren't prime. the prime factorization of those values ...
39 views

75 views

### PrimitiveRoot function

The function PrimitiveRoot[n] claims to return the smallest primitive root of n. I believe this is not true. For example ...
150 views

### solve recursion equation with condition

How can I find $f(x)$ in terms of $x$ in the following equation? $-k\, x \,f(x) + k \, (x + 1)\, f(x + 1) - r \, f(x) + r\, f(x - 1) =0$ $r$ and $k$ are constants and $f(x)$ should satisfy: ...
40 views

### LayeredGraphPlot Vertex Spacing

For anyone who has used LayeredGraphPlot, you have probably seen that the vertex spacing is consistent throughout, that vertices have the same minimum unit of ...
46 views

### Strings with exclamation marks in Mathematica

Given this input FullForm[ToString[TraditionalForm[x]]] Mathematica outputs "\!$$TraditionalForm\`x$$" It seems like ...
35 views

### Maximum likelihood estimation based on frequency table

I have a frequency table of grades, I'm trying to estimate the distribution as a truncated normal distribution (a grade below 65 is a failing grade and doesn't count). Since I don't have the actual ...
81 views

### 3D plot of concave data set

I have the following data set ...
787 views

### Is there a name for #1@#2&?

Why does the pure function # @ #2 & have no name? I'm asking because sometimes I find inelegant to write expressions like ...
415 views

### Exporting data extensions in fits file

Context In Astronomy the de facto standard for images and data is FITS. I would like to export heterogenous data sets into a single fits file. Attempt I am ...
38 views

### Table of references

I have a list of variables (say a, b, c, d, e) that I want to assign in a single command. {a,b,c,d,e} = {1,2,3,4,5} would ...
159 views

### Speed up MinimalPolynomial

My Mathematica code runs slowly MinimalPolynomial[Sqrt[2] + Sqrt[3]+ Sqrt[5]+ Sqrt[7]+ Sqrt[11]+ Sqrt[13], x] runs slowly, but the Maple version ...
17 views

### Design problem with an an InterpolatingFunction-like object: bad performance over a remote kernel

I these last times, I found myself using often the following approach. Given some data, I make some preliminary, common, computations and I store these results in an ...
139 views

### Define Function with Sum over a list

I want to define a function that would symbolically look like $$t(s,\underline{a})=\pi s + \sum_{n=1}^{n_{max}}a_n\sin(n \pi s)$$ (something like a finite Fourier series). Here $s\in [0,1]$ and ...
39 views

### NIntegrate and Integrate of a Spherical Bessel function

I am trying to integrate over a spherical bessel function. I have used both the Integrate and NIntegrate functions in Mathematica but the values given by each do not match. Any reason why this ...
42 views

### Writing a procedure that invokes Manipulate[]

I would like to write a procedure with the signature: Foo[vars, params] which produces a Manipulate object. The procedure ...
40 views

### Form a matrix to have inequality elements

It looks like a silly question, but I could not find any answers online. Your help is greatly appreciated! Say I have two lists now. ...
63k views

### Where can I find examples of good Mathematica programming practice?

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...
323 views

### Visual representation of a Ranking over time (image provided)

[Disclaimer: I initially posted this question on stackOverflow 2 months ago and think it might be better suited for this forum (link to original question)] The graph below shows a ranking of ...
36 views

### How to continuous apply a function to an argument? [duplicate]

In order to calculate x = sqrt(1 + x) for a given number x, 40 times, I tried this: ...
81 views

### How to make hollow Graphics3D?

I keep seeing a notebook to use of Mathematica as a 3D Printing tool (e.g.: this link). In the notebook on slide 8/11, we find these pictures: I'd like to design it as such that, but I don't ...
38 views

### “cannot be used as function” error. Mathematica 9

I am trying to use Mathematica do solve a system of differential equations through a series. For the time being, I want the solution to be in terms of a quadratic. So here is an example, ...
80 views

### Changing default behavior of Series to give slightly different SeriesData

I am working with complicated expressions expr that contains the symbolic function f[x] which I know to have a pole at ...
386 views

### Floating point operations — division vs multiplication; how do they affect accuracy?

Given two functions: f[x_] := x ((x + 1)^(1/2) - x^(1/2)) g[x_] := x/((x + 1)^(1/2) + x^(1/2)) Which one is more accurate? Side note: If you could explain why, ...
39 views

### Simplifying square root expressions

I have read lots of questions on square root simplification on MMA, but I haven't really seen my problem posted (or understood a clear way to deal with this issue). I am simplifying some expressions ...
44 views

### How to subset datasets in Mathematica 10

I'm sorry if this is obvious but I can't find a way to select only a certain amount of columns of a dataset (or delete a certain amount of columns from a dataset) using the key of each column. I ...
45 views

### Trouble using Manipulate and NDsolve for coupled ODE's

I'm aware that there are a few threads on the topic of solving coupled ODEs using NSolve and Manipulate. Based on those, I wrote the following code, solving my system of equations: ...
62 views

### Why does Mathematica remember print settings?

Mathematica has a strange behavior with respect to printing and saving to PDF. It remembers the print settings, such as page range and number of copies along with the file. So if I print 50 copies ...
33 views

### Subscript und Superscript in FrameLabel and Export

I'm creating plots that I want to export as png. Which works, but when I add sub- or superscript into the FrameLables or get 10^x in LogPlots the sub- or superscript letters in the exported png will ...
101 views

### How to avoid NDSolve::ndsz problem (singularity problem)

I have the next model ...
44 views

### Is this caused by meomory usage ? (Something odd/hard to describe)

I really can't make a "smaller" example, but the files are here, for the data and for the notebook. It will cost a LOT of memory, up to 30G of RAM (maybe more). Here is the problem, (from a Linux ...