2
votes
1answer
76 views

Forcing Exact Outputs for Integrate [closed]

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

MoonPosition and TimeZone support

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

Solve doesn't solve my transcendental equation

I want to solve a geometry problem. To do this, I need get formula for "d" in the equation: ...
1
vote
1answer
66 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: ...
2
votes
1answer
55 views

Expressing a definite integral as pure function with the upper-bound as it argument

Suppose i have an integral which has a closed form, $\quad \quad \int_{a}^{b} f(x) dx=F(a,b)$ I want to use output function $F$ as a pure function, like ...
2
votes
0answers
50 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: ...
1
vote
1answer
99 views

Improving Performance - Finding Polynomial Roots [duplicate]

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
104 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
54 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
74 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
74 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
79 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[] ...
20
votes
1answer
649 views

Analogue for Maple's dchange - change of variables in differential expressions

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. ...
5
votes
1answer
58 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: ...
5
votes
1answer
53 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 ...
11
votes
2answers
188 views

Faster trimming of leading/trailing zeroes in rectangular array

Given a (large) rectangular array, e.g. (small for example case): ...
0
votes
0answers
52 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
76 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 ...
6
votes
2answers
199 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
2answers
50 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 ...
1
vote
1answer
49 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
49 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
78 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
83 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
52 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
55 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 ...
7
votes
3answers
302 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
99 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
54 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
1answer
52 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 ...
10
votes
1answer
191 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 ...
10
votes
1answer
87 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: ...
0
votes
1answer
140 views

Finding a formula for a 3D shape and colouring it

I created a wall with line command ...
0
votes
2answers
210 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 ...
5
votes
2answers
107 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
55 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. ...
8
votes
2answers
144 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 ...
0
votes
1answer
59 views

Input text next to plot axes

Please see the following image showing my plot. I would like to indicate $\omega$ is maximized at $\bar{\omega}$. But as you can see, it is cut and does not appear correctly. Do you know how to fix ...
0
votes
1answer
41 views

Boundary condition not correctly imposed for NDSolve

I notice that when plotting the below NDSolveValue ...
15
votes
6answers
757 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 ...
1
vote
0answers
75 views

Failing to solve a simple PDE with NDSolve

I'm trying to solve the following PDE. Actually this is a major simplification of the original with all x,z dependent coefficients being fixed. For some reason Mathematica (10.0) cannot solve even ...
3
votes
1answer
112 views

compute the gradient in high dimension

The following code is used to compute the gradient of a given 2D data. ...
1
vote
2answers
113 views

Collect distributed sums

I have another task that somehow should be trivial. Suppose I have the following expression $$ \sum_{i=1}^n \frac{2}{9} x_i + 2 \sum_{i=1}^n \frac{1}{9} x_i, $$ or in Mathematica-FullForm ...
1
vote
1answer
46 views

Speeding up EPS exporting ?

I'm using Mathematica 10 to render some figures, and I'm noticing some strange behaviour with EPS figures. I'm making figures like the one below in EPS format. And to do so, I use some code like ...
1
vote
2answers
137 views

Plot with tick labels but without ticks

In scientific literature, plots often have a design like what I've been trying to make (see below). These images have the following characteristics: 1) Frames on the left and on the right 2) An x-axis ...
1
vote
1answer
61 views

What is the meaning of the lists of numbers in the FullForm of a compiled function?

For example, f = Compile[{{x, _Real}}, x]; FullForm[f] has this output: ...
0
votes
0answers
29 views

Roots of two Functions containing integrals, with two parameters [duplicate]

I want to find the values of l1 and l2 from the following two equations: ...
1
vote
1answer
132 views

Solving coupled differential equations with an eigenvalue

I have 2 coupled differential equations with an eigenvalue Ei and want to solve them ...
1
vote
2answers
59 views

Perform operation on part of a table / create a reference

There is a function f that I would like to operate on a rectangular part of a table t. The part is specified by function ...
6
votes
2answers
99 views

Optional arguments with lists as function parameter

I'm developing a function f which should support optional arguments {x_, y_} in list form. A simple example looks like this: ...

15 30 50 per page