0
votes
0answers
2 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
2answers
74 views

Plotting points on the horizontal line

I have list such as list = {1, 5, 2, 6, 3,...} and I need to plot the numbers from the list on a horizontal line such that there will be on a place on horizontal ...
0
votes
0answers
8 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
12 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 ...
6
votes
3answers
167 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 ...
0
votes
0answers
15 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): ...
5
votes
1answer
89 views

Geocentric, Earth-fixed, coordinates of Sun, Moon (and others objects eventually)

I know I can get "HelioCoordinates" of the Earth and the Moon with ...
2
votes
1answer
35 views
0
votes
0answers
28 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 ...
3
votes
0answers
25 views

MoonPosition and TimeZone support

With this question, I noticed some some weird results of MoonPosition. Consider the following code: ...
0
votes
0answers
23 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 ...
14
votes
1answer
428 views

What is the real default CellEvaluationFunction?

The default CellEvaluationFunction is Identity but one can quickly see that this is handled specially as an equivalent function, ...
4
votes
0answers
35 views

Wrong autogenerated package from notebook containing #key and Part as subscript

Mathematica v10.1.0, under Windows 8.1 x64 Mathematica v10.0.2, under Windows 1) Define a function in an initialization cell: ...
0
votes
0answers
47 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: ...
16
votes
1answer
163 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. ...
-1
votes
1answer
81 views
1
vote
1answer
33 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
26 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 ...
1
vote
1answer
99 views

Control which frontend session/kernel the Workbench gets attached to

(I am new to Workbench) I have 2 or 3 Mathematica frontend sessions open with a few of them running some long-running codes. When I try to open/edit a code in Workbench, I see that it sometimes it ...
2
votes
1answer
37 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
votes
1answer
28 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, ...
0
votes
0answers
17 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
vote
0answers
28 views
0
votes
1answer
35 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 ...
3
votes
1answer
67 views

compute the gradient in high dimension

The following code is used to compute the gradient of a given 2D data. ...
11
votes
4answers
494 views

Finding the period of an array of integers

A simple array of integers is given. The problem is to detect if a pattern is repeatedly occurring in the array, and find the length of that pattern. For example, for ...
0
votes
1answer
138 views

Making table and plotting results of NDSolve problem

I am trying to solve two equation to find /[Phi][x] and plot h vs. /[Phi][x] for different values of L.I tried by writing as: ...
1
vote
2answers
148 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 ...
6
votes
2answers
1k views

How to make traditional output for derivatives

Hello again after some pause. i have a problem how to present partial derivatives in traditional form, not as Mathematica gave it to me in its notation. So I want to present this ...
18
votes
2answers
9k views

How to make Jacobian automatically in Mathematica

If we have two vectors, a and b, how can I make Jacobian matrix automatically in Mathematica? $$ a=\left( \begin{array}{c} \text{x1}^3+2\text{x2}^2 \\ 3\text{x1}^4+7\text{x2} \end{array} ...
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 ...
1
vote
1answer
55 views

NonlinearModelFit: fit a vector-valued function to a data vector

I have a vector of data points: data = 10 Sin[#/10] + RandomVariate@NormalDistribution[] & /@ Range[200]; And I have model that provides the complete ...
2
votes
1answer
56 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 ...
1
vote
3answers
98 views

Import Data using selection criteria

I imported a file (text and numbers) and made constructed this. e[[1,All,{1,2,3,4,6}]] Column 1 is the name of the state. How can I get a subset of this where, say Column 1 is not equal to "New ...
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: ...
3
votes
2answers
53 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: ...
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
44 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[] ...
1
vote
1answer
105 views

how to create Panel for Plot?

Can You advice me how to put the whole thing below into an interactive Panel, so I can values of parameters dynamically - type other values (alpha, beta, x0, y0, R, tmax) and plot updates ...
9
votes
0answers
209 views

Getting EPS imports to respect the original fill rule

One major problem in my attempt to answer to the CountryData flags question is that the way Mathematica handles filled curves differs from the way SVG and EPS style editors do. The latter two have the ...
32
votes
3answers
2k views

How to do http POST in Mathematica?

The Import command lets you do a HTTP GET from a URL, like this Import @ "http://merkosoncampus.com/wp-content/uploads/2011/05/higgs-boson.jpg" This sends an ...
5
votes
2answers
139 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.
6
votes
1answer
53 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 ...
27
votes
2answers
2k views

An efficient circular arc primitive for Graphics3D

As many people have noted, the 2D graphics primitive Circle doesn't work in a Graphics3D environment. Several solutions to this ...
4
votes
1answer
237 views

ArrayPlot copied to PDF shows blurred mesh

Certain (but not all) images displayed in ArrayPlot, and then copied to PDF, show what appear to be fuzzy mesh lines in white areas. An example is shown below. I ...
12
votes
3answers
484 views

Next highly composite number?

R language has this function 'nextn' (link) which computes the next highly composite number greater than a given one, which is used to find the optimal padding size for the subsequent FFT operation. ...
8
votes
1answer
100 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
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
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. ...

15 30 50 per page