1
vote
1answer
23 views

Plotting separatrices for nonlinear system

Consider the system: \begin{align*} x'&=(1-x-y)x\\ y'&=(4-7x-3y)y \end{align*} The system has a saddle point at (1/4,3/4). How can I plot the separatrices on the phase portrait having domain ...
0
votes
0answers
16 views

Make animation with multiple external data files

I am currently solving PDEs for a discrete vector field with C++. The output at a time t is an array where each row represents a site and there are 6 columns, the first 3 give the position of the site ...
1
vote
1answer
32 views

Iterating distributions

I want to calculate the distribution that comes from summing up random numbers between -0.5 and 0.5. A computationally intensive version of doing this is to simply do the following: ...
0
votes
0answers
21 views

Differing results with Map and ParallelMap

I am using Mathematica 10.0.2 and I am trying to change the string Class_1 to 1, so I use the following code: ...
1
vote
1answer
36 views

Why this error?

f[x_] := Piecewise[{{1, -0.5 <= x <= 0.5}}, 0]; ProbabilityDistribution[ Integrate[f[a], {a, x - 0.5, x + 0.5}], {x, -2, 2}] output: "Unable to prove that ...
0
votes
1answer
21 views

Kernel quits without error in NDSolveValue

I am using the latest 10.1. The following single line command makes the kernel quit without error message (just a beep): ...
0
votes
0answers
38 views

First Order Conditions

I am new to Mathematica so I am not sure if this is correct. I have setup up a Lagrangian and I am trying to get the FOCs of this problem. However, it does not seem to work. Any help would be much ...
0
votes
0answers
29 views

Find first n roots of a function

Is there a straightforward way to find the first $n$ roots of a function? I have found various ways of finding roots in an interval, but none that would keep looking for roots until they find a ...
2
votes
1answer
41 views

Forcing Exact Outputs for Integrate

I'm trying to compute the following triple integral: ...
3
votes
0answers
27 views

MoonPosition and TimeZone support

With this question, I noticed some some weird results of MoonPosition. Consider the following code: ...
0
votes
0answers
59 views

Why Mathematica doesn't solve this equation?

I look for solve my geometry problem. To do this, I need get formula for "d" in my equation: ...
1
vote
1answer
37 views

Change numerical plot labels on one axis to strings

This question likely has a straightforward answer. Suppose I have a plot something like this: ...
0
votes
1answer
30 views

using output in pure function

Suppose i have an integral which has a close form, $\int_{a}^{b} f(x) dx=F(a,b)$ I want to use output function $F$ as a pure function, like F[a,#]& so i try ...
0
votes
0answers
18 views

power series or taylor series for transcendental equation [on hold]

Can anyone please show me how to find a power series or taylor series for $p(h)$, an implicit function of $h$ implied by the following equation: $-plog(p) - (1-p)log(\frac{1-p}{n-1}) - h = 0$ ?? ...
-1
votes
1answer
34 views

interpreting wave equation using mathematica

hi can someone please help me solving this problem: Let $u(x, t)$ be a solution of a wave equation $u_{tt} − u_{xx} = 0$, $x \in (0, 2\pi)$, $t > 0$ satisfying Neumann boundary conditions $u_x(0, ...
1
vote
0answers
31 views

Construct single InterpolatingFunction from a mathematical combination of other IF's

Let's say I have an interpolated function f, like I might get as the solution to an NDSolve: ...
0
votes
1answer
39 views

Improving Performance - Finding Polynomial Roots

I'm fairly new to Mathematica. In the past, my usage has mostly been limited to solving the occasional equation, making some plots, and working with small scaled statistics. None of these have been ...
2
votes
1answer
40 views

Generating by plots by rerunning code

I am new to Mathematica. I created a code where I can evaluate a parameter (denoted by PoA) for a random instance of a directed acyclic graph. The code is below. ...
1
vote
1answer
26 views

Partial derivative of defined function with vector input

Background: Have written a formula for the refractive index for a glass slab (n) that depends on the variables t,a and d. Now I want to calculate for example some sort of error and I'll be needing to ...
2
votes
1answer
60 views

Abstract iterator in Do

I'm trying to write a module. Its input is a matrix (tensor), the module should return new tensor with increased rank with 1. The new tensor is defined as $$ O \Rightarrow N_{\alpha \beta \ldots ...
3
votes
2answers
54 views

How to re-arrange lists, divide one list into 2 lists with a particular step [duplicate]

How to re-arrange following list: {a1,b1,a2,b2,a3,b3,a4,b4} or this {a1,b1},{a2,b2},{a3,b3},{a4,b4} to get: ...
0
votes
0answers
46 views

What does it mean when FindInstance returns unevaluated?

According to the documentation, FindInstance[] return the empty set when it does not find a solution and one of the examples claims that this is proof that no solution exists. So if FindInstance[] ...
16
votes
1answer
174 views

No analogue for Maple's dchange?

Maple owns an interesting function called dchange which can change the variables of differential equations, but there seems to be no such function in Mathematica. ...
0
votes
0answers
36 views

Nest-Recursion leads to overflow - Numerical calculation of Lyapunov exponents [on hold]

I calculate the Lyapunov exponents of several dynamical systems and want to compare the results with other algorithms. One of the most famous puplications is the work of Marco Sandri, see this paper. ...
3
votes
0answers
32 views

DateObject for current date skips a day when crossing the date line with TimeZone

The DateObject was introduced in version 10 of Mathematica. One can call it to fetch the current local date and time: ...
-2
votes
0answers
52 views

How speed the calculatation of the inverse of an upper triangular matrix

I have found the inverse of an upper triangular matrix by substitution using the "for" command, but it works very slowly when the upper triangular matrix is big. Example: If 686 is matrix's ...
5
votes
1answer
43 views

How do I perform exact unit conversions with irrational conversion factors?

Suppose I want to express $3h$ in units of $\hbar$ (where $h$ and $\hbar$ are the Planck constant and reduced Planck constant, respectively). By definition, $h = 2\pi\hbar$, but when I attempt this ...
2
votes
0answers
39 views

Faster trimming of leading/trailing zeroes in rectangular array

Given a (large) rectangular array, e.g. (small for example case): ...
0
votes
0answers
48 views

How to make work Plus function? [duplicate]

I have a little problem. I have k = 1.56343*10^9; r = 9.10492*10^18. And I should receive a (2*r*r-k*k)/2*r*r, it equals to ...
0
votes
2answers
54 views

Use a Module to return multiple plots

A program I'm running requires me to generate multiple plots over the same domain, so I thought it would be fairly simple to use a module and bury all of the plot commands within that that way I only ...
5
votes
2answers
140 views

Nearest neighbor distribution

I need to construct nearest neighbor distribution for a given finite set of real numbers. I have no clue how this can be realized. Any suggestion would be very much appreciated.
0
votes
0answers
17 views

MousePosition and While loop Control, maybe Dynamic in While statement?

I would like to write a simple code that samples mouse position as frequently as the system can handle (with minimum dt) starting when the mouse position leaves a region and ending when the mouse ...
0
votes
1answer
27 views

Add Numbers to Notebook Cells

Let's save I have a notebook full of text cells. How might I add numbering to the text cells?
1
vote
1answer
41 views

Collecting specific Lists of data in coordinate form

Note: This might be trivial for many of the users but i am new to mathematica so i don't know!!! Question: Suppose i have three list of data as follows: ...
1
vote
1answer
45 views

Error with using NDSolve [duplicate]

I am currently trying to numerically solve a system of differential equations. Here is my code: ...
1
vote
1answer
45 views

How can I calculate the maximum number of grid layout possibilities?

I am doing some modelling where I am trying to randomly layout some points on a grid. What I know: How big the grid is The number of objects that have to be laid out on the grid, at a point The ...
1
vote
1answer
46 views

What is the correct idiom for mapping a 0 value in a modulo n expression back to n?

What is the correct idiom for mapping the $0$ value in a modulo $n$ expression back to $n$. For example if I want to be sure that any integer value maps back to the index for a character in the ...
0
votes
0answers
37 views

Can I redefine the ++ increment operator to make it behave like Haskell

In Haskell, joining two lists l1 and l2 is simply done with l1 ++ l2 In Mathematica ...
6
votes
3answers
170 views

Calculating average distance between maxima

I'm having trouble figuring out a way to analyze some simple data. When graphed, the data I have make a somewhat sinusoidal curve. What I want to do is to find the x-values of the maximum peaks of the ...
6
votes
1answer
59 views

Using Wolfram Library Reference in Excel VBA

Long time ago I did this question to MathGroup, but without success. In Excel VBA, in Tool/References, there is a option called "Wolfram Mathematica Control 8.0 Type Library" I belive that ...
0
votes
1answer
42 views

How to combine 2d and 3d plots with this code [duplicate]

I found a picture for example in google and I want to do with my code like that: And here is my code: ...
0
votes
0answers
21 views

ListContourPlot for 3D data [on hold]

I have an n x 3 list of some solar cell data that looks like this. ...
0
votes
1answer
30 views

Integrating the second derivative of a 3D curve

I have a 3D curve K2[s_] := c1[s] + 0.4*(j[s]*Sin[500*Pi*s/97.8] - v[s]*Cos [500*Pi*s/97.8]) where j and v are frame vectors. I want to find the integral of ...
8
votes
1answer
101 views

How to access an already opened Excel file in Mathematica?

This post 4594 shows how to open a existent Excel file with Mathematica. And this 6686886 shows how to do what I need, but in C#. This 12282310 is another related one. How can I connect to a ...
0
votes
1answer
33 views

Is there a way to change the indentation behavior of the postfix operator //?

For example, using newlines after // results in some really weird indentation: Ideally, I'd love to be able to do something like this: ...
-1
votes
1answer
82 views

Finding a formula for a 3D shape and colouring it

I created a wall with line command ...
0
votes
2answers
87 views

FindShortestTour to solve Traveling Salesman Problem

I'm trying to write my own code to find the shortest route but I'm lost on how or where to start. Does anyone have any idea how the FindShortestTour function works? What type of algorithm or structure ...
1
vote
2answers
33 views

Dataset Query using Composition fails but RightComposition works - why?

V10.1 on Win764 Enterprise. In this (CORRECTED) example the two Queries may be compounded into one using RightComposition sucessfully... ...
0
votes
0answers
44 views

Problem with greek!

I am using mathematica v10. I have two promblems. 1. I cannot open notebooks made from another version of mathematica(I open them and i cannot read the greek fonts in a cell which i have wrote) 2. ...
6
votes
2answers
78 views

why MeanFilter is nearly 100 times slower than MovingAverage for 1D array?

I used to average over my data with MeanFilter before I learn about MovingAverage and thought that these two functions are similar except that MeanFilter is more powerful for its ability to deal with ...

15 30 50 per page