0
votes
2answers
312 views

using index notation for finite differences

I am interested in deriving finite difference equations, which means I have to play around with indexed quantities. For example, for a 2D function f(x,y), I could discretize it on a grid with grid ...
1
vote
1answer
142 views

Problems with formatting a bar chart

I am trying to create a financial dashboard using Mathematica. I am having trouble formatting the axes ticks to show whole numbers. Further, when I hover over one of the chart elements, it is ...
1
vote
1answer
283 views

No Speedup Compiled Function in FindMinimum

The problem: I would like to minimize an objective function with respect to 12 variables. Minimization should be executed as fast as possible. Compiling the objective function increases the execution ...
5
votes
0answers
142 views

Texture[] not working properly with Image AlphaChannel

I recently encountered a problem when combining multiple texture layers in an graphics object when the texture comes from an image with alpha channel. Apparently the alpha channel of the image passed ...
1
vote
0answers
36 views

Pattern matching list elements in pure functions [duplicate]

Pattern matching here is a functional programming term, but it might be called differently in Mathematica, I'm not sure. It is possible to match the elements of the list in a regular function ...
0
votes
1answer
209 views

Plot lines keep disappearing

I'm trying to plot the Compton Shift which I've defined as: E2[ϕ_] := E1/(1 + (E1/(m*c^2))*(1 - Cos[ϕ Degree])) I've initiated the constants and when I evaluate ...
4
votes
4answers
267 views

How to compute MIN$(A(x), B(x))$

I have two polynomials: $\;A(x) = \sum a_i\;x^i$, $\quad B(x) = \sum b_i\;x^i$. Given $A(x)$, $B(x)$, I want to compute $\;C(x) = $MIN$(A(x), B(x)) = c_i\;x^i$ where $c_i = $MIN$(a_i, b_i)$. How can ...
7
votes
1answer
540 views
0
votes
0answers
189 views

Connection between Mathematica Connector/J and XAMPP MySQL Database

I have been fiddling around with a problem for a while now, and hope you can help me. Have searched for previous solutions, but nothing seems to work. My problem is as follows: I have XAMPP ...
8
votes
5answers
328 views

Refer to next element of list when iterating using Map [duplicate]

Is it possible to refer to the next element of the list when I'm using Map or should I always use For in this case? For example ...
1
vote
1answer
515 views

FindMinimum [] methods [closed]

Which algorithm is used when we do not use the option Method of FindMinimum[] function. FindMinimum[f,{x,x0}]
1
vote
0answers
107 views
13
votes
1answer
336 views

Is everything in Mathematica ultimately stored as a rule?

My current understanding about Mathematica is that everything, at the lowest level, ends up as replacement rules. First question: is this true? Second question: does Mathematica "gloss over" these ...
1
vote
1answer
153 views

What's wrong with my palindrome finding function?

I'm trying to find the palindromes in the dictionary, but my output isn't giving me all of them. I have this so far ...
0
votes
0answers
28 views

DialogInput inside ButtonBar freezes Mathematica [duplicate]

In Mathematica 8, if I press a button on a ButtonBar which contains a DialogInput Mathematica freezes. Is this reproducible and ...
2
votes
1answer
602 views

Differential equations: Solving a singular/nonlinear ODE using NDSolve

I am trying to numerically solve a rather horrible looking singular/nonlinear ode: A*(y''[x]/y[x])'' +y[x]^2==1 on the interval ...
0
votes
0answers
110 views

calling a batch or executable application on Windows

How to run a batch file, send commands and collects output on windows Run["!C:\\runme.bat"] it outputs 1 and a window appears and then disappears. I also want ...
0
votes
1answer
266 views

Customizing AxesStyle->Arrowheads

How do I call AxesStyle->Arrowheads[ ] in order to control whether or not an arrow appears on each of the four ends of the axes in a ...
2
votes
1answer
93 views

File output and race conditions

Is it possible to know when Mathematica is done writing a file? I'm looking to automate something and I'm wanting to have Mathematica put it in a file using Put[], ...
2
votes
2answers
202 views

How to replace data in a list (tree) in a functional Mathematica way?

I have list containing 2D points in various groupings, i.e. points, lists of points (figures), lists of lists of points (patterns) and finally a list of patterns. The list also contains other data, ...
1
vote
1answer
353 views

Convert expression to C-form and simplifying

I have an expression which is the sum of many terms of the form $$ \frac{0.00000000274341}{(0.000363856+(0.611425+z)^2)^{3/2}} $$ My problem is that I need to include this long expression in a ...
6
votes
1answer
184 views

Random filling of L-length line with l-length segments

I have discrete L-length line filled randomly with 2-length segments so its cover line with gaps 0 or 1. So we can describe cover configuration as sequence of gaps such as {0,0,1,0,1}. How I can ...
5
votes
2answers
160 views

Strange Behavior when making Equal Listable in Pick

While trying to make this problem more efficient I tried different methods and dabbled with making Greater and Equal ...
4
votes
3answers
821 views

How to increase Spectrogram resolution?

I have a time-domain signal that I want do a time-frequency analysis on it. When I tried the Spectrogram, I always get very low resolution. For example: I have a ...
2
votes
1answer
362 views

How to use NIntegrate in a purely numerical mode?

I have a function that is defined as the smallest root of a given polynomial. Something like this: ...
4
votes
2answers
230 views

J/Link: How to run a thread inside Mathematica

In the J/Link User Guide there is no example on how to use java.lang.Thread, from inside Mathematica. I'd like to know if is possible to start a thread from a ...
6
votes
1answer
102 views

Why only up to two \[Prime] superscripts are interpreted as derivatives?

I noticed that only up to two \[Prime] superscripts are interpreted as derivatives. Is there a reason for this restriction? Is it documented? ...
3
votes
1answer
188 views

Adding and summing overlapping Airy (or Gaussian) disks on a plane

In a previous question of mine, I asked how one might draw an Airy disk on a plane: Generating an Airy disk on a plane, and recieved some impressive answers from the users Timothy Wofford and ...
4
votes
0answers
133 views

What is the signature for a callback function for FinancialIndicators?

I'd like to write my own indicators to use with functions like TradingChart. From the context, it's clear that one needs to write a function whose parameters ...
2
votes
1answer
173 views

Copying each object in a plot separately as an image

I would like to copy a plot from Mathematica as an image, into a PowerPoint slide. This plot has two curves. When I try to do the (naïve) usual "copy graphics" and paste, I find the full plot (along ...
0
votes
2answers
150 views

Put results in multiple columns for comparison

One thing I would like to do in many instances is arrange input/output in columns for comparison. I expect that I need to use Grid to do this, but have not been ...
6
votes
3answers
305 views

Where did I go wrong with my implementation of the trapezoidal rule?

One method for doing quadrature, called the trapezoidal rule, improves accuracy by connecting the points on the curve corresponding to the points of subdivision with line segments, forming trapezoidal ...
1
vote
1answer
1k views

Singularity / stiffness / precision errors with NDSolve

I have a relatively simple 2nd Order ODE problem I'm trying to solve numerically $p'' + \frac{1}{r}p' = A(\frac{p(r)}{p(r) + k_{m}})$ where $A = 7.5795*10^9$ and $k_{m} = 1$. So trying to get ...
6
votes
2answers
164 views

Extract urls from list

If I have a list like list = {"my element 1 http://link.com", "http://link2.com my element 2"} how do I get a list of the links inside each element? Something ...
1
vote
0answers
40 views

How can I access numerical values of variables calculated with Solve? [duplicate]

I am trying to calculate some thermodynamical cycles so I often use lists with equations. Here's a simple example: ...
3
votes
2answers
385 views

fit a curve in a three dimensional space

I have a list of points of a curve in a three dimensional space, like ...
3
votes
2answers
109 views

Manually accept elements of a list

Let's say I have a list like: {"good element 1", "bad element 1", "good element 2", "good element 3", "bad element 2", ...} I would like to build a function that ...
1
vote
1answer
125 views

Defining a function of a distribution

I have a discrete- time and space markov process that I want to evolve given an initial distribution. To that, I defined ...
0
votes
0answers
45 views

How to manipulate lists to get only part of the value [duplicate]

This is really a question about manipulating the output of Maximize. I have a function of 2 variables, defined thus: ...
3
votes
3answers
140 views

Finding specific compositions of an Integer

I need to find all compositions of an integer L wherein all parts do not exсeed l and parts less then l cound not be neighbor. Here is my code ...
2
votes
1answer
91 views

Read return value as string by Mathlink.h

I'm using "mathlink.h" to call Mathematica from a C program. I send a computation to Mathematica and its return result is a very big number (100 digits). Hence, I want to read that number as a string. ...
2
votes
1answer
751 views

Plot3D with a log scale only along the y-axis

I would like to ask how to make a 3D plot (maybe using Plot3D) with a logarithmic scale along the y-axis? For example: I have a function, $f(x) = 2(1 + a\,x^4)/x^2$, where $x$ varies from 0 to 20 ...
1
vote
2answers
234 views

How do I find the most populous cities in the world?

I am attempting to plot the most populous cities on a world map. Currently, I have the line of code: ...
0
votes
0answers
140 views

Getting increased accuracy for roots of determinant

I have a matrix $a(\kappa)$ from which I am trying to determine $\kappa$ by using the equation $det(a(\kappa)) = 0$. The matrices I deal with are on the order of 100 X 100 to 500 X 500. Originally I ...
1
vote
1answer
133 views

Random number generation from a given distribution [duplicate]

Is there any way to obtain random numbers from a user defined continuous distribution in Mathematica? Thank you very much
1
vote
2answers
204 views

Setting up and solving system of equations

Consider the following code: ...
4
votes
0answers
262 views

How to improve gesture detection by JLink for the LeapMotion controller

Building on this thread (where I cannot add anything anymore somehow) and with this nice answer I kind of got swipe detection to work, but it is not very responsive. How to improve (in the sense of ...
1
vote
1answer
171 views

Remove overlapping red and green color

How to remove overlapping red and green color regions, leaving only red ones?
4
votes
2answers
330 views

How do I evaluate a symbolic integral involving Hermite polynomials?

I want to test a difficult integral : Integral on all reals of some complicated function involving the Hermitian polynomials, exponentials, squares, factorials, and being general considering any ...

15 30 50 per page