# All Questions

192 views

### How to control the layering of graphics displayed with Show

I am trying to combine two graphics objects using Show. The first one is an isosurface: ...
468 views

### How would you efficiently implement BinListsBy?

Let's say I have a list like this: data = {{21, "Alice"}, {27, "Bob"}, {22, "Charles"}, {34, "Dora"}, {75, "Eliza"}} containing ages and names of persons. What I ...
72 views

### Strange NSum behavior for slightly larger number of terms

For some sums, NSum gives me the result nicely for some number of terms, but if I add one more term, it suddenly becomes much slower. I haven't found the minimum example for which this can be ...
124 views

### Prohibiting Autorun in a Manipulate?

One of the four possible AppearanceElements for Manipulate is "ManipulateMenu" which provides a number of features such as ...
34 views

### Determine Functions Given Data Points [duplicate]

Is it possible for Mathematica to solve for f(x,y) = 0 such that {x,y} contains {{0,0.5}, {1,0.5}, {0.6,0.8}, {0.4,0.2}} ? Do we need to specify f(x,y) first ? ...
203 views

### Put a rounded parentheses in a label [duplicate]

I have this plot: ...
94 views

### Using Combinatorica`ListNecklaces in v9

I am using Mathematica for visualization of DeBruijn graphs. However, I am having a bit of trouble using ListNecklaces. I want to know how many cyclic shifts of ...
354 views

### How to map vertex points from the surface of a straight pipe onto 2D plane

How to map vertex points from the surface of a straight pipe onto 2D plane. The 3D surface points of the straight pipe can be found here: data Working code: ...
105 views

### Failing to get a coloured coordinate in 4D plot

I am trying to get a colour data plotted according to a coordinate. I am working with 4D vectors, with three spatial and one temporal coordinate. I tried the accepted answer at Plot 4D data with ...
126 views

### Help with Computation-heavy triple integration

I'm Trying to use Mathematica to symbolically integrate a function with respect to x, y, and z. For some reason, this computation either takes about, 60s and returns the input, or takes many hours ...
89 views

### Natural boundary conditions variational methods

I am working on a problem of the calculus of variations. From the Variational Methods package, I can very conveniently use EulerEquations to get stationarity ...
256 views

### Understanding performance: graph connected components

I need to analyze directed graphs with 10M edges, 1M vertices, and 300K strongly connected components, so that the largest one contains 400K vertices. I read some explanations of Leonid Shifrin here, ...
151 views

### Why PlotRange doesn't work for this set of values? [duplicate]

This code, doesn't show me data corresponding to x axis values 1000 and 10000 ...
642 views

### How to add a column to a table that counts the number of times the lines appear?

I am at a complete loss at this. I have a table with 2 columns and n lines. Some of the lines are repeated. What I want to do is add a new column that counts the number of repetitions of each line. ...
225 views

### NIntegrate failed to converge?

Hey guys I have a pretty simple code that consists of an RMS calculation. The issue is that I am getting quite a few error messages when I run it. The following equations are highly published physics ...
137 views

### plot data with small differences

I want to plot data with very small differences. I can't see the differences in my plot:
317 views

### Define function that counts recursive fibonacci

If I write count=0; fib[0]:=(count=count+1; 0); fib[1]:=(count=count+1; 1); fib[n_] := (count = count+1; fib[n-2] + fib[n-1]); Then I can ...
2k views

### Smooth 4D (3D + color) plot from discrete points

I have a file containing isosurface $\{x,y,z,F\}$ data (around 9000 points). My goal is to generate a smooth (NOT a discrete set of points!) colored surface using ...
214 views

### A suspicious result of an integral

I integrated this term in Mathematica: $$\int_{-\infty}^{\infty} d\omega*\sin(s*\omega)*\frac{1}{e^{\beta*\hbar*\omega}-1}*\frac{\omega}{\omega^{2}+\gamma^{2}}$$ The code in Mathematica: ...
403 views

### Label each panel of Grid

I have a set of figures that I would like to show as grid for a publication. I currently just export the figure as an eps and use another software package to add Labels (A,B,C,D) to each panel of the ...
329 views

### State “i” goes to state “j”

I would like to have a code that given a state "i" in S, it give the set of states "j" which are accessible from "i". Is that possible in mathematica? My state space (S) is ...
84 views

### Determination of export video runtime

I have a huge simulation and tried to export it as a video file (or .gif). However regardlessly what I specify under the Framerate option the video its just running for 4 seconds (too fast). When I ...
141 views

### Discrete ContourPlot3D with restrictions

I have the follow simple condition between integers: k - 2 h - l == 0, which describe a plane that I plot with: ...
662 views

### How to parse information contained in a file name

I have a set of files containing my data, and the file-names contain relevant information that I would like to extract. What I have is: ...
522 views

### Extract X value from corresponding Y value from a List or Transpose [duplicate]

I have a list of X values and Y values separately, and also together with: data=Transpose[{X,Y}] This data is from a chromatogram, and I want to extract the ...
733 views

### Look up a non-US stock price

I need to get historical prices of certain non-US stocks (specifically, they are traded at Prague Stock Exchange, Czech Republic) but I am not able to find the proper "name" that Mathematica would ...
492 views

### How can I get thicker lines in the legends of a ListLinePlot?

I want to have thicker lines in the legends of this plot: ...
250 views

### How to plot a list of lists with ListLinePlot?

(edited, after rasher comment, changing any detail and variable names) You can plot an evolution with 3 lines (up=maximmun, in the middle=mean, bottom=Minimum) with this code ...
378 views

### Plot a vector valued function of two variables using color density

I have a vector (3D) valued function of two variables. I want to visualize it as a density plot, using R,G,B color values to display the value at the point (x,y). I've come up with a couple of ...
110 views

### Output resets when after closing/reopening the file

I've been having an issue in a project I am working on for a demonstration that involves a manipulate containing buttons that influence local variables. In essence, the problem is demonstrated by this ...
111 views

### Calculate support of given wavelet

I am calculating approximations using wavelets but outside the multi resolution analysis framework; particularly, I am not using the built-in wavelet transforms. Still, I need to calculate ...
203 views

### Extract data from DateListPlot, limited by PlotRange

Extracting the points from a line in a ListPlot in this answer uses points = Cases[Normal@plot, Line[pts_] :> pts, Infinity]; This works in DateListPlot ...
185 views

### will the same result be evaluated twice per evaluation?

here is the silly question of mine, if mathematica takes 3 seconds to evaluate the function ...
106 views

### Centrality measures and normalisation

Are centrality measures normalised in Mathematica 9? Only ClosenessCentrality is normalised. How I can normalise other centrality measures notably ...
284 views

### Tell Mathematica to factor something specific

Is there a way to tell Mathematica to factor $$\frac{1}{1-x^2}$$ from a large expression? For instance if the expression is A_1+A_2+A_3 and I want to factor ...
113 views

### Write an expression as a full derivative

Is there a command that tells Mathematica to try to write the terms (if possible) of an expression as total derivates? Example: I want to tell mathematica to write ...
113 views

### Combine a contour plot of a conic and an inset with an polygon such as all its vertices are on the conic

I have a difficulty to programmatically adjust the size of a polygon within an inset of a conic (here I limit myself to a circle) in order to have all its vertices on the circle: ...
273 views

### How to resolve Start up error 502?

My Mathematica is not launching properly (I run it on Ubuntu 12.04 LTS). Here is the screenshot of the error message. I've tried the following suggestions : ...
111 views

### Select duplicate values from a list [duplicate]

How can I select the duplicate values in a list? Example: {1, 2, 1, 1, 1, 1}
1k views

### Generating an Ulam spiral

An Ulam Spiral is quite an interesting construction, revealing unexpected features in the distribution of primes. Here is a related topic with one answer by Pinguin Dirk, who has provided one ...
378 views

### How can I propagate an asymmetric error in a function about the central value?

If I have some asymmetric error about the central value in x and y, then how can it be propagated in a function f[x, y, z]? For example, given ...
122 views

### I have the roots; how can I find an equation that they will satisfy?

I have two solutions; I want is to find an equation that these solutions satisfy using mathematica. The solutions are $x= \frac{{(26-k)}^2}{26}$ and $y= \frac{{k}^2}{26}$. I know by hand computing ...
141 views

### distance between each vertex of a graph and its output

I have a question regarding this Q&A. Let's call a vertex that is not the tail of any directed edge an output of the graph. The graph below has only one output (at the far right). If I want the ...
3k views

### Convert a string into a list of numbers

I got the following problem I don't know how to solve or if it's at all possible to solve(I'm quite new to Mathematica and don't have an IT background, so please explain slowly if possible:)) I'm ...
673 views

### Relative performance of the Julia language

I was just reviewing the Mathematica benchmark code linked from the Julia language home page http://julialang.org/. The stated goal of the benchmarks is to test the performance of specific algorithms, ...
193 views

### how draw root locus in mathematica 9 for a special case

my closed loop transfer function is: H(s)=2exp(-q)/(1+exp(-2q)) q=sqrt((a+k*sqrt(s)+s)*s) , s=sigma+jw how can i draw root locus of H(s) as 'a' changes for ...
973 views

### 3D Plotting with PieceWise function

Im trying to plot the following function: $f(x,y)$ = $\left\{\begin{matrix} (x+y) & (x,y) \in T \\ (x+y)^2 & (x,y) \notin T \end{matrix}\right.$ where \$T= \{ y\leq -x+1, x\geq 0, y\geq ...
1k views

### How to completely delete the head of a function expression

Is there any way to completely remove the head of an expression function? For example, how would I remove the head Cos from ...