0
votes
0answers
22 views
Format Preservation of FullSimplify on Indexed System of Autonomous Equations
I currently have a large system of 150 autonomous differential equations. I've indexed a more managable dummy system of identical form, using Part to reference ...
2
votes
1answer
32 views
How do I draw a Circular Graph colored like this in Mathematica?
I must plot some data in radians and would like to use this image as a background to that graph. Although it looks good the lines are degraded in image form. thus the reason for this question. Can ...
1
vote
0answers
10 views
Increasing NDSolve time step size
I recently tried creating a solar system simulation using the "n-body problem" formulation and NDSolve, but have run into a little problem. I've managed to get accurate initial positions and ...
1
vote
1answer
19 views
Convert quoted printable aka PrintableASCII characters to UTF-8
I have several eml email files to import. Some of them were saved as quoted-printable 7-bit encoded.
I skipped through the MM documentation and found ToCharacterCode and CharacterEncoding. However, ...
1
vote
1answer
37 views
Inverse of a polynomial in a polynomial ring
Let $N$ be a prime, and $q$ be a positive integer. Given a polynomial $f(x)$ in $R = \mathbb Z[x]/(x^N-1)$, I want to find another polynomial $f_q(x)$ in $R_q = \mathbb Z_q[x]/(x^N-1)$, such that
...
5
votes
2answers
163 views
Plotting contours of a function for different values of a parameter
I want to draw a picture of $(x-t)^2 + (y-t^2)^2 - t^2$ in $xy$ plane, with different values of $t$. I did it in a very silly way , namely,
...
0
votes
1answer
22 views
Plotting a family of contour plots
How can I plot the following equation with $k$ assumed to be an integer"?
I tried something like this, but it doesn't work:
...
1
vote
1answer
72 views
Indexing of Large Autonomous System of Equations for Use in NDSolve
I currently have a list of ~150 autonomous DAE's (differential-algebraic equations) that I need to be able to work with using NDSolve. Fortunately I already have ...
11
votes
6answers
282 views
Embed Code Into Image
I often export images(plots, matrix, arrays, etc..) from mathematica which I end up putting in word documents or uploading to the web.
The problem is that I often lose the original code and I am left ...
1
vote
0answers
41 views
Find a sequence of integers which give max in each step
I would like to write a program in Mathematica to look for the integer $n$ such that the following definition holds for any $1 < m < n $
$$\frac{f(n)}{f(m)}>1+\frac{\log(n/m)}{\log(n) ...
1
vote
1answer
81 views
Recursive Integration
I'd like to evaluate the following recursive integration using Mathematica
$$
\ M(T) = \int_0^T\int_0^\infty e^{-\delta s}g(x,s)dxds\ +\int_0^T e^{-\delta s}f(s)M(T-s)ds\,
$$
where $g(x,s)$ and ...
8
votes
4answers
230 views
“Strange” behavior of Rule
According to the Help
lhs->rhs evaluates rhs immediately.
How to understand the output of the following code?
ClearAll@x;
{1, 3.5} /. x_?IntegerQ -> {x}
...
3
votes
1answer
54 views
Why does a translation in the horizontal direction affect PointSize?
I'm running Mathematica 9.0.1 under Mac OSX.
Not sure if this is a bug or whether I'm not supposed to apply a GeometricTransformation to a list containing graphic ...
36
votes
7answers
998 views
Can one identify the design patterns of Mathematica?
... or are they unnecessary in such a high-level language?
I've been thinking about programming style, coding standards and the like quite a bit lately, the result of my current work on a mixed ...
0
votes
1answer
68 views
Plotting geodesics of upper half plane
I want to solve (numerically) the geodesics of the upper half plane and plot. The results are quite known (i) st. lines parallel to y axis and (ii) semi circles centered on x-axis. Now the problem is ...
0
votes
0answers
18 views
How to setup OpenCLLink with OpenCL installed
I want to use OpenCL in Mathematica, but when I try:
Needs["OpenCLLink`"]
OpenCLMemoryAllocate[Real, {1024, 1024}];
OpenCLQ[]
which gives me
...
-4
votes
0answers
84 views
Find glasses on image [closed]
I have bunch of photos with the same person in similar positions. On some of the photos he has glasses, and what I want is to extract (identify) those photos. I guess the first step is to use ...
0
votes
0answers
68 views
Differentiation with respect to $\tau$ [closed]
I want to differentiate twice with respect to time but the output is very complicated:
input:
...
11
votes
1answer
73 views
Why changing list's head takes time?
Consider
AbsoluteTiming[Range[10^7];][[1]]
0.035000
and
AbsoluteTiming[HoldComplete @@ Range[10^7];][[1]]
...
6
votes
2answers
136 views
Mathematica ncurses support
I occasionally ssh into machines that have Mathematica installed. I then operate Mathematica through the command-line interface.
Often, the command-line interface ...
2
votes
4answers
180 views
How can I create a list of functions?
Can anyone tell me, how to create a list of functions? I've tried the following code, but it doesn't work.
...
1
vote
3answers
57 views
How to calculate solution for each variable automatically
Here I have one problem how to calculate x for each y. In this form code doesn't work
...
0
votes
1answer
46 views
Transposing a list onto a range [closed]
I've got a list of data:
readings = {15.9, 16.1, 17.2, 17.5, 18.5, 20.2, 22.7, 24.2, 27.2};
This data is spaced out by 20x, and I'd like to ListPlot the data:
...
1
vote
1answer
53 views
using array elements in minimization
I have switched from mupad to Mathematica, however the syntax is completely different here. I want to
...
1
vote
1answer
91 views
Improving the plotting time of a very complicated expression
The quatity $R$ is defined by a complicated expression in terms of $a_1,a_2,\ldots,a_n$. Now each $a_i$ is a function of $x$, $a_i(x)$. I would like to know what is the most efficient way to ...
7
votes
1answer
93 views
rule-based implementation of an algorithm
When I first started learning about rule-based programming with Mathematica, I tried to translate this algorithm for computing the convex hull of a set of 2-D points in O(n Log(n)), to use rule-based ...
10
votes
2answers
150 views
SaveDefinitions->True changes the displayed image
I have a Manipulate[ ] that displays an image with a superimposed Locator object. It works fine when I have ...
0
votes
2answers
45 views
Solve and plot an equation that is dependent on a transcendental equation
I am trying to plot a function that uses the values of a transcendental equation as its input values:
y = Tanh[(2 y + x)/2.5]
z = 2.5 * Log[2*Cosh[(2 y + x)/2.5]]
for x = [-1.5, 1.5]
I am a ...
0
votes
1answer
53 views
How to get path and file name of a pasted image?
Say in Documentation Center -> ImageData -> EXAMPLES ->
Basic Examples you find an image of a planetary body (Mars?).
Can one obtain the file source for this image wich is copied
into a Mathematica ...
1
vote
1answer
80 views
Longest string of special characters [closed]
I was answering a question the other day and my answer had several special characters in a row -- it was something like FindRoot[#, {2}] & /@ {f1, f2, f3} which ...
6
votes
3answers
259 views
Plotting $\omega(k_x, k_z)$ in $(\omega, k)$ plane with assumption of $k^2 = k_x^2 + k_z^2$
I'm currently studying atmospheric-gravity waves and their dispersion relations.
For analysis I need to plot the dispersion function:
\begin{equation}
\omega^4 - \omega^2\cdot C_s^2(k_x^2 + ...
193
votes
10answers
22k views
Where can I find examples of good Mathematica programming practice?
I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...
28
votes
7answers
1k views
Having used Mathematica as a “gateway” language, where to from here?
I have been using Mathematica for about a year. It is the first language that I have attempted to learn. I'm still very much a newbie, but there are moments I feel more like I am waving than drowning. ...
0
votes
0answers
97 views
Forecasting future Stock Prices II
I intend to do the following: I want to forecast future stock price under the following assumptions: The stock price is governed by the stochastic differential equation:
dS = μSdt + σSdWt
whereas ...
5
votes
2answers
110 views
How to declare a 3D vector variable?
How can I do vector calculations without telling Mathematica the vector entries?
I have very many arbitrary linear combinations in $\mathbb{R}^3$ which I want to perform some general calculations on ...
3
votes
1answer
49 views
Optimizing List Multiplications
I've got a list manipulation optimization problem. Consider a two-dimensional nxm list list1, and a three-dimensional nxmxm list, ...
-1
votes
2answers
65 views
A simple ListPlot with different colours and a Tooltip
I know that the threads ListPlot with each point a different color and a legend bar and Extracting the coordinate of a particular point of interest from a ListPlot are somehow the answers to my ...
3
votes
1answer
97 views
AstronomicalData and Planetary Heliocentric (x,y,z) Velocity Components
I'm trying to find data on the heliocentric velocities of planets in our solar system and was directed to Mathematica's AstronomicalData in a previous topic. ...
8
votes
2answers
114 views
Distribute and analyze large datasets
I need to analyze very large datasets, and they obviously don't fit in a computer memory. I need to produce some statistics on these datasets, and this brings me here:
How can I make some statistical ...
28
votes
1answer
184 views
+200
How safe is the use of Block and Internal`InheritedBlock
For many questions on this site answers are given which suggest to use Block and, especially for more advanced topics, ...
1
vote
1answer
102 views
Set all instances of Exp[-x_] to zero?
To simplify a huge expression efficiently, which involves a variable in a bunch of exponential functions going to infinity, I have tried to substitute
...
0
votes
2answers
66 views
How to use SaveDefinitions when using Rasterized Frames for a ListAnimate?
In another post (Is it possible to prerender animation in Wolfram Mathematica?) I got a good way to prerender frames in order to get a smooth animation using ListAnimate.
I need to save the Animation ...
1
vote
1answer
105 views
NDSolve diffusion equation over/underdetermined
I have a feeling the solution to my problem is very simple… but my knowledge of differential equations is pretty weak.
I am trying to solve a scalar diffusion equation (used in NMR spectroscopy, but ...
8
votes
1answer
172 views
How to run an external program in parallel with a Mathematica package?
Under Mathematica 8 (Linux x84_64) I was able to run an external program in parallel from a Mathematica package. However this procedure breaks down under Mathematica 9.
Within my Mathematica package ...
2
votes
1answer
37 views
Why do I have to perform a second ReplaceAll in this InterpolatingFunction?
I have an InterpolatingFunction that I'd like to plot, and I wonder why I have to perform a ReplaceAll on the following function:
...
2
votes
1answer
157 views
Emulate Powerpoint behavior: Show additional cell content with each click
Is it possible to emulate powerpoint animation behavior during a presentation with Mathematica?
Considering a notebook with cell of numbered items or even several cells, is it possible to display a ...
2
votes
2answers
129 views
+50
Underflow occurred in compilation
This code shown below works well for n<=10, if n>11, Mathematica gives the message
CompiledFunction::cfne: Numerical error encountered; proceeding with
uncompiled evaluation. >>.
So ...
17
votes
2answers
981 views
How to calculate volume of convex hull and volume of a 3D object
I have a random 3D data points.
How to calculate volume of the convex hull and volume of the object.
7
votes
0answers
104 views
How to calculate the volume of a convex hull?
Given a spatial curve represented by a parametric equation, is it possible in Mathematica 9 to calculate symbolically (or at least numerically) the volume of its convex hull?
3
votes
1answer
90 views
How does Mathematica calculate the nth prime?
When I enter Prime[2000000000000], the two-trillionth prime, Mathematica gives 61427839512211 for the answer after several ...






