# All Questions

98 views

### Optimizing a bubble art code [duplicate]

Based on that website I wanted to recreate the same effect using Mathematica but with any picture given by the user. Thus I came up with the following code: ...
514 views

### For-loop not working as I expect

I want to do this: When 10 <= t < 130, give t -> 1; When 130 <= t<300, give ...
698 views

### Extracting angles from a simple picture

I'm not sure if this is even possible with Mathematica, but I want to extract the angles between all lines in this picture: It consists of $12$ lines, so I want a matrix with $144$ entries. I ...
514 views

### FindInstance (and Solve, …) abysmally slow on a fully determined system of linear equations and inequalities: why?

I took a quick look for FindInstance and Solve-related questions but came up empty for the aspect that I am curious about. So ...
139 views

### Holding Input Windows

I am creating a Mathematica document which contains a list of proofs in various fields of Mathematics so that I can easily review whenever I would like. First, I create a large set I call 'proofs' ...
1k views

### cross-correlation with time lag

I have two lists with some data. a={1,2,3,4,5} b={5,4,3,2,1} Now I want to compute the cross correlation of the two lists with a time lag of 1, like it is ...
148 views

### Alternative closed forms for digamma expressions

What commands should I use such that Mathematica / W|A express $$\psi(1+i)+\psi(1-i)$$ exclusively in terms of trigonometric functions?
105 views

### Exponential function Integral

I have tried to solve this integral: Integrate[E^(-((a^2 b c^2)/(a^2 + b)))/(a^2 + b)^2,a] Mathemathica is not able to solve it, I have tried the integration by ...
123 views

### NDSolve with different function lengths over time

I'm working on a cops & robbers game, and there is one single event that is very very important, the event of catching someone. I'm trying to do when any robber is catched, delete it from the ...
97 views

### Why TensorReduce not working here?

I would like to use TensorReduce to work on the tensor contraction $y_{ib}y_{ia}$ (where index $i$ is summed). However, ...
165 views

### How to vary thickness of line on the plot? [duplicate]

How to plot the function f(x) so that one part be a thicker line than another depending on the value x? (Curve is efficient frontier - portfolio optimization)
111 views

### Return only one numeric solution to equation [duplicate]

Consider a simple plane equation 2x-3y+4z==7 I just want some position vector on that plane. For example, {7/2,0,0} would be ...
441 views

### Is Mathematica compatible with primusrun?

I use Mathematica 9 on Ubuntu 12.04 LTS x86 (64-bit). My computer has an Nvidia graphics card, for which I installed primus and ...
78 views

### densityplot + world map overlay [duplicate]

I can make a world map, and I can make a density plot, but I can't seem to get them to overlay. Was trying to use Show to overlay: ...
149 views

### Exploiting a relation among constants

Say I have two arbitrary real constants $p,q$ that satisfy $p^2+q^2=1$. Is there any way to easily declare this relation in Mathematica? Edit More specifically I have this (among others) expression: ...
135 views

### Handling output that was returned unevaluated from a function

When evaluating functions, including those described in this post, how do Mathematica users handle values returned from a function that are unevaluated? For example (based on 1): ...
194 views

### What is the correct way to provide Mathematica with a path to Python user scripts?

What is the correct way to provide Mathematica with a path to Python user scripts? Simply executing Python as a shell command, using something like ...
120 views

### Binomial sum identities

How do you persuade Mathematica to give simple identities involving binomial sums. For example Sum[Binomial[a,i]*Binomial[b,i],{i,0,n}] where n is bigger than ...
102 views

### Clean webMathematica Kernel

On my webMathematica server, certain input values are being saved between page loads on different computers. I assume this is because the kernel is not clearing the values after it finishes loading a ...
319 views

### Is there a way to see the result of NIntegrate's symbolic preprocessing?

NIntegrate can do a number of different types of symbolic preprocessing on the integrand before starting the numerical calculations, including changes of variables. ...
94 views

### How to show an exclusion limit [duplicate]

I would like to show an exclusion plot, by having a filling made of parallel tilted lines. Any ideas? Something along these lines
174 views

### How to impose control over vertex-to-vertex Graph edges?

I’m working on a Markov Chain and hope there is a way to impose control over how Mathematica places edges to connect vertices in a Graph. My Markov Chain currently consists of 4 vertices with 2 of the ...
201 views

### GraphicsMeshFindIntersections[ ] fails to detect intersections

GraphicsMeshFindIntersections[ ] is an undocumented function for, well, detecting intersections very efficiently. Take a look: ...
420 views

### Mapping functions over multiple lists

I am not sure if this is a duplicate. Spent some time looking over list-manip questions. I’d like to know the Quickest Way to achieve the following Mapping of a function over multiple lists. ...
394 views

### Rank functions of n by their order of growth

I'd like to rank some functions according to their order of growth (e.g. n^2 < n^3). I'm not sure how to do order of growth in mathematica, so I was trying to ...
331 views

### Replacing values above a threshold with 1 [duplicate]

I have a list with some values and I want to replace a value which is greater than 1 with 1 otherwise keep the value. In this case 10562: ...
87 views

### Unknown limit of an array of area integrals

Could someone explain why Mathematica can't finish computing this limit (this is a limit of an array, when n -> Infinity (n ...
327 views

### LengthWhile until first duplication

I have the need to trim each of a large number of potentially very long lists (10^6+ elements) to the length where the last occurrence of any distinct element happens, or said another way, where the ...
73 views

### How can we tell Series to treat the expansion parameter as an integer?

It is simple for Mathematica to find an asymptotic expansion for $\frac{1}{-1+p}$ as $p \rightarrow \infty$. However, if we want to restrict $p$ to be an integer and also include some terms that ...
234 views

### ContourPlot - plot only one connected component

How do I plot only one component in ContourPlot when specifying a height. For example, ...
509 views

### Parallel evaluation and memory use

I have never used Mathematica's parallel evaluation before and have some trouble getting it to work properly. For the record, I am running Mathematica 9 on Linux with an Intel Core i7 processor (4 ...
406 views

### Why do I get a different value when I change the order of integration?

I think the following two-dimensional integrals should be equal, since they both integrate the function over the half plane defined by $t>\tau$. \int_{-\infty}^\infty \mathrm{d}t ...
59 views

### Function output of two lists are only diagonal elements

I'm having a little crysis over here. What I basically want to do is some sort of 3D-Plot, but I'm only interested in the resulting values. I have two vectors x and p: ...
257 views

### Better way to get Fisher Exact?

I want to perform a Pearson's $\chi^2$ test to analyse contingency tables; but because I have small numbers, it is recommended to perform instead what is called a Fisher's Exact Test. This requires ...
98 views

### Experiment with TagSetDelayed involving Part

Reading Associating Definitions With Different Symbols, I was intrigued by this: You can think of upvalues as a way to implement certain aspects of object-oriented programming. A symbol like ...
120 views

### Improper mutiple integral

I would like to solve the following integral: ...
168 views

400 views

### How to manipulate some list-plot in Mathematica

I have two separated matrices in the form X[[i*dx,j*dt]] and V[[i*dx,j*dt]] where i & j are integers from (1 to N) & (1 to M). V & X are velocity ...
132 views

### OpenSQLConnection error

I used to be able to connect to a SQL Server database. I haven't run this program for a few months. I tried it today and it failed, so I went back to try OpenSQLConnection[] and got the following ...
94 views

### Constraining some rows from LeastSquares to lines

For two matrices, A and B, with dimensions {n,p} and ...
59 views

...
279 views

### Using an image as a moving object in an animation

I have following animation: ...
170 views

### Define a function on a parameter argument set to zero

Say I have an expression (matrix) that depends on several variables. f= {{a, b+c},{2a-b^2,c^5+a b}} I want to define new matrices with the single parameter ...
69 views

### How to ignore terms containing in the summation of multiplications

n=4;L=3; p0[n_Integer]:= Product[ Sum[Subscript[r, k][l, l], {l, L - 1}], {k, n}] // Expand; How to ignore terms containing three or more multiplications of [2, ...
78 views

### Table doesn't replace inside conditionals (If, Which) [duplicate]

This: Table[If[cond, y], {y, 1, 3}] outputs this: {If[cond, y], If[cond, y], If[cond, y]} The ...
34 views

### custom precedence for custom infix operator with InfixNotation [duplicate]

I am trying to define several custom operators with custom precedence to implement geometric algebra. Loading the notation package << Notation` I can ...
144 views

### More elegant/efficient solution to browse through an array

I have an array of lists and want to correlate every list with each other like this: ...