2
votes
1answer
133 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 ...
0
votes
0answers
51 views

Front-end issue: Some glyphs not displayed

I have a weird issue, that cropped up recently: If I type \[UpArrow] and hit return, the uparrow is not displayed in the output (it is in the input). Changing the ...
4
votes
3answers
758 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 ...
0
votes
1answer
63 views

What is wrong with my simple plot? [closed]

What is the problem with plotting the imaginary part of this equation? ...
3
votes
2answers
153 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: ...
0
votes
4answers
135 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 ...
3
votes
1answer
320 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 ...
0
votes
1answer
43 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 ...
0
votes
2answers
103 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: ...
8
votes
3answers
321 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: ...
0
votes
0answers
33 views

Has anyone seen (and been able to mend!) an error involving Symbol FE`DynamicModuleVariableList?

FE`ExecuteInDynamicModule::noval: Symbol FE`DynamicModuleVariableList$67 does not have a value. >> I'm just posting the error for the moment as this is a ...
0
votes
2answers
150 views

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

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 ...
1
vote
1answer
158 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 ...
3
votes
2answers
204 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: ...
0
votes
1answer
130 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 ...
1
vote
1answer
134 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 ...
1
vote
1answer
104 views

Assign a Distribution to a group of symbolic variable [closed]

I'm looking to compute this Expectation : "i" represent a individual and h(i) is value. I would like the compute the Expected value of his value times the mean of the groups. Everything is unknown ...
1
vote
1answer
66 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 ...
1
vote
1answer
89 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 ...
0
votes
1answer
92 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 ...
3
votes
3answers
174 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 ...
0
votes
0answers
94 views

Centrality measures and normalisation

Are centrality measures normalised in Mathematica 9? Only ClosenessCentrality is normalised. How I can normalise other centrality measures notably ...
2
votes
1answer
159 views

Tell Mathematica to factor something specific

Is there a way to tell mathematica to factor 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 1/(1-x^2) from A_1+A_2 but leave A_3 alone.
1
vote
1answer
87 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 ...
0
votes
1answer
82 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: ...
0
votes
1answer
58 views

Transition matrix of order n [closed]

I am doing a work about Markov Chains and I have as task to determine, either by induction or by spectral methods, the form of the higher order transition matrix of the model. My transition matrix ...
1
vote
2answers
128 views

Define the square of a function [closed]

Is there any good way to define the square of a function in M9? Usually one can write e.g. f[z_] = 3*Sin[z] etc etc. But is it possible to define ...
0
votes
0answers
120 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 : ...
0
votes
1answer
79 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}
7
votes
4answers
538 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 ...
2
votes
2answers
210 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 ...
0
votes
2answers
107 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 ...
2
votes
1answer
129 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 ...
5
votes
6answers
1k 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 ...
4
votes
0answers
280 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, ...
-2
votes
1answer
108 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 ...
1
vote
2answers
295 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 ...
3
votes
4answers
448 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 ...
0
votes
2answers
163 views

ListLinePlot with colors from data

I am trying to color a simple 2D plot (using ListLinePlot) based on data in the form of 3-vectors. ...
2
votes
2answers
431 views

How do I interrupt (abort) a computation in Mathematica?

Sometimes I (inadvertently or naively) write a code that would take Mathematica a long time to compute on my laptop or any computer for that matter. For example: Table[Length[Select[Permutations[n], ...
0
votes
0answers
28 views

Notebook stops using extra kernels after some time

Have a mathematica .nb job where I've programmed to run on parallel. Everything goes fine for about an hour but after this most kernels just stop being used by the program. I can see this happing in ...
1
vote
0answers
177 views

Triangular lattice with periodic boundary conditions

I am trying to generate an equilateral triangular lattice with fixed vertices and periodic boundary conditions. I am supposed to assign an index (starting from 0) to each vertex in my lattice and then ...
0
votes
0answers
19 views

“No file exists for resource PasteTemplateString”

I am running Mathematica on a Raspberry Pi and the above error message comes up virtually every time I press ctrl + shift + K to view the suggested functions and ...
17
votes
5answers
566 views

Graph from binary matrix (not adjacency) respecting the original matrix positions

I have a binary matrix. My objective is to connect every close (without "jump") elements with value equal to 1, but I must keep the point positions, just like it's shown at the image. Can somebody ...
0
votes
3answers
163 views

Trouble understanding a piece of code found on Wolfram Blog

I am trying to go through this Wolfram Blog example: http://blog.wolfram.com/2009/02/12/flag-analysis-with-mathematica/ on country flag analysis. I am having a problem understanding the following ...
1
vote
0answers
86 views

Expression for evaluating multiple functions?

I am constructing 3D data points for a plot and corresponding to specific conditions "manually". I define the values of five parameters [these I always have to define myself]. From those, I evaluate ...
2
votes
1answer
62 views

A problem with Timing

With M = Partition[Range@10000000, 1000]; V = Range[10000] - 1; I got the following timings: ...
4
votes
1answer
224 views

Creating complex contour plots

I would like to create a contour plot of $e^z-\dfrac{z-1}{z+1}$ that looks like the picture on the left, but can only manage the one on the right. I have tried incrreasing the number of contours, but ...
7
votes
3answers
134 views

Thread over uneven (ragged) expressions with full functionality?

There are a number of questions on this site about "threading" including several relating to uneven (ragged) lists. However, none that I could find deal with the full functionality of ...
10
votes
1answer
334 views

Poor performance from Graphics3D

I wrote a game -- 2048,Some codes are from http://blog.wolfram.com/. My codes are in notebook downloads I added code so that the game can play in 3D form, but when I play it, I find that it is too ...

15 30 50 per page