2
votes
1answer
90 views

Show scatter plot of change in image saturation

Let's say I have two images. One is the original and the other is after some photo-manipulation has been applied to it. I want to show the effect on the color saturation using a scatter chart. ...
2
votes
1answer
79 views

Rotating a 3D plot constantly resizes

When I click and drag a 3D plot it rotates and when I release the mouse, the size of the image changes. This is distracting to me, I'd much rather have it look the same when I release the mouse button ...
0
votes
1answer
74 views

Substituting inside a differential equation

x y''[x]+2y'[x]+l^2 x y[x]==0/.y[x]->Cos[x] I think above code shows what I want to do quite clearly. How do I make it happen. Only y[x] is replaced.
0
votes
1answer
56 views

What is this Counts[] output format?

I need to create a list of the distinct elements in a list along with the number of times each appears. The function Counts[] is supposed to do this, but it puts the results in some weird format I've ...
0
votes
1answer
167 views

Which platform is ideal for performance?

I have been using NDSolve, and I noticed that when you decrease the MaxStepSize, possible singularities are resolved. If I ...
2
votes
1answer
46 views

Indeterminant expression encountered in Summation

I have a function that I'm trying to find an explicit form for the coefficients in its power series expansion. On paper, it is a long calculation so I decided to write up the formula in mathematica. ...
2
votes
1answer
78 views

Working with a two-variable function with one input fixed

Here's what I know how to do: f[x_] := x^2 - 4 x + 4 Ordering[f /@ {1, 2, 3}] This will evaluate f at each point and rank their sizes. Here's what I really have:...
2
votes
0answers
91 views

How to trigger Emacs to open a file from Mathematica? [duplicate]

I thought Run will do the trick: Run["emacs -q " <> myfile] Run["! emacs -q " <> myfile] But it does not! I'm ...
5
votes
2answers
199 views

Why doesn't ParallelTable work on this very simple example?

For some reason, I'd like to use ParallelTable with a variable number of iterators. Table[a[1], {a[1], 0, 10}] works fine: ...
1
vote
3answers
270 views

How to replace element of list by index

I'd simply like to replace the value x at index [[j,i]] in a two dimensional table with the value ...
10
votes
4answers
356 views

How to Thread with custom functions? Thread vs Map?

This function finds n given the nth prime: findPrime[n_] := If[PrimeQ[n], i = 1; While[Prime[i] < n, i = i + 1]; i, False]; This works: ...
23
votes
2answers
847 views

Is there a built-in equivalent to Python's enumerate?

Python's built-in function enumerate takes an iterable over $(a_0, a_1, \dots )$ as argument and returns an iterable over the sequence of pairs $((0, a_0), (1, a_1),...
1
vote
1answer
129 views

Changing point size in Show

Suppose that a is a line plot produced with Plot, and b and ...
5
votes
2answers
113 views

Dataset breaks multi-character StringSplit

Given ds = Dataset[{"a b", "c-d"} ] multi-character StringSplit is broken with Dataset (...
0
votes
0answers
95 views

How to make a twice-differentiable function that approximates some data?

I have some time series data that I would like to approximate with a twice-differentiable function. Each time series has ~10,000 datapoints, so I definitely do not want a function that passes through ...
6
votes
1answer
302 views

Traces of the level surface $z=4x^2+y^2$

I came up with this method to plot the traces of the surface $z=4x^2+y^2$, in this case for $z=1$, 2, 3, and 4. ...
0
votes
0answers
63 views

Improve speed in module with NIntegrate and FindRoots

I am running version 10.1 in Windows 7. The following code gives good results but I have two questions: Is there a way to speed up the program as I would like to compute more data points? The code ...
4
votes
0answers
62 views

Quirky behavior of Series[]

This is a "what's going on?" question about MMa behavior, not so much a "how to fix?" This code calculates a Taylor series for a two-term Gaussian Mixture: ...
0
votes
1answer
65 views

How can I change the behaviour of InterpolationOrder -> 0? [duplicate]

Consider the following example: ...
2
votes
2answers
144 views

Are the Entity functions broken?

When I try to use any version of the Entity functions, the function is returned as if it were undefined. For example, EntityList["Planet"] returns EntityList[Planet]. The help examples don't work ...
0
votes
0answers
70 views

Handling really large Arrays (by possibly using lower precision) [duplicate]

I know there have been a few questions about efficient memory storage on mathematica.stackexchange, but I could not find a sufficient answer for my problem (except that it might not work at all). So ...
1
vote
3answers
153 views

Partitioning List Into Sublists of Length 2 With The Pairing Being Random

I've done a bit of Googling with hopes of finding an answer, but to no avail. I'm looking for a way that I can have Mathematica take the elements of a list, say ...
0
votes
1answer
99 views

Integral evaluation error

I have the following integral that I wish to evaluate using Mathematica: ...
2
votes
1answer
87 views

How to run a function over an increasing set of integers to find a fixed point

I have a function which runs a sum from -integer to integer based on some data, something like, schematically ...
1
vote
1answer
49 views

Why this isn't a valid argument? [duplicate]

I am having truble understanding why F1 produces an error, since both time and velocity are the same kind of object: ...
0
votes
1answer
188 views

Financial data source change

So I am using the command FinancialData["name"] to get the live price for any given stock. The openings are very important in my studies that I am conducting and it ...
3
votes
1answer
148 views

How to summarize an expression

Is there a similar command as str in R in Mathematica? ...
5
votes
1answer
141 views

Inaccurate Heliocentric coordinates of PlanetaryMoonData

I have noticed that the heliocentric coordinates obtained with PlanetaryMoonData are very inaccurate. Fore example, consider the Galilean moons of Jupiter: ...
2
votes
1answer
81 views

Performance of a bootstrap - time of computation not linear with number of iterations

I'm doing a bootstrap based on this thread with the following code (file.txt here): ...
8
votes
2answers
421 views

Creating a hyperlink graph from Wikipedia

This goes out to all the Mathematica experts - I'm hoping to get some helpful comments, ideas or code for that matter. In my attempts to maximize learning efficiency I had the idea to create an (...
1
vote
1answer
108 views

A puzzling result of the `ReplaceAll` [duplicate]

I tried to do something below Log[PDF[NormalDistribution[m, s], x]] /. Log[u_[x__] ] :> Plus @@ Log[List[x]] which gives a desirable result that splits the ...
2
votes
1answer
75 views

Use Version 7 Print Environment Settings in Version 10

The following code produces very different PDF outputs in versions 7 and 10. Is there some way to make Mathematic 10 produce the same print output as Mathematica 7? ...
7
votes
2answers
162 views

How to set the timeout value for *Data functions

I haven't measured this precisely but it seems the default timeout value for retrieving EntityValues with *Data functions is in ...
4
votes
0answers
101 views

How to make an executable .jar connect to Mathematica

I am writing a Java Swing program which collects data and connects to Mathematica to do some computations. As other answers here suggested, I have included JLink.jar in the classpath, as well as the ...
0
votes
2answers
135 views

Given integral, how to plot

I want to use mathematica to visualise some plots, this would help me understand my calculus course. My problem is this: Given that x^2 + y^2 <= a^2 Find ...
6
votes
3answers
307 views

Derivative of contour in ContourPlot

Sorry to bring this question up again, since there are many similar questions on the site. I use to think this is a easy job to do, because for the worst case I can follow the answers on this site. ...
4
votes
0answers
156 views

How to speed up import of large csv table?

Loading less than 2 gB of csv data took 5.29 hours: ...
1
vote
1answer
83 views

Tiny question about Indexed[x,n]

Maybe I should apologize for this silly question, but the documentation for Indexed is very short and not explicit. I have an equation with variables ...
1
vote
1answer
61 views

How to TakeWhile not zero of functions?

fuu[x_]:= 2 - x^3 + x^7 This works: TakeWhile[{5, 4, 3, 2, 2, 1, 0, 0, 0, 0}, # != 0 &] (*{5, 4, 3, 2, 2, 1}*) This ...
2
votes
2answers
72 views

How to build recursive function which only remembers every pth value and the last two values?

I need to create a recursive function of the natural numbers $f$ which only remembers the last two values it has found and every $p$th value. Below is the form of the code that I am working with, but ...
0
votes
1answer
40 views

Problem Plotting List Data [closed]

I'm trying to plot the following data but it's not producing a graph. It's really a graph of y = x^2 but it's not drawing the parabola. ...
1
vote
1answer
72 views

How to specify the number of precision digits for columns using DatabaseLink functions and options

Some databases (e.g. MySQL) does not store decimal places for seconds unless the number of digits needed is directly specified (e.g. DATETIME(4) for 4 digits) when creating the table in the database. ...
0
votes
1answer
57 views

Designing a loop that fetches 5 random vectors each with 5 components from a set of 10 until Linear dependence is found

I am currently trying to find a way to make a loop that will select 5 random columns without replacement of a 5x10 matrix until it finds a determinant equal to 0 out of the new matrix formed by the 5 ...
0
votes
1answer
71 views

LevelScheme Ticks hidden behind DensityPlot or SmoothDensityHistogram

I'm having a problem where the LevelScheme ticks are hidden by my SmoothDensityHistogram. In the above figure, I am sure that the ticks are there since you can ...
2
votes
2answers
104 views

Vertical rulings for a cylinder

I have: ...
0
votes
0answers
38 views

How to solve a system of equations which includes vectors? [duplicate]

I'm starting to wonder if this is something that mathematica just can't do? I thought something like this might work: ...
14
votes
3answers
336 views

Mimic a procedural, recursive clustering algorithm for site percolation using functional programming

Sorry in advance for my logorrhea: I just want to make sure all of the information is here. Context and Question I am investigating site percolation on a square lattice. I have a working, depth-...
6
votes
2answers
330 views

Solving a two variable two equation trig expression

I am trying to use Solve to get what two angles (A and B) are in a problem I have. ...
7
votes
2answers
169 views

Threading elements over corresponding elements in the second list

I often need to merge two lists like the following: $A=\{\{0.1\},\{0.2\},\ldots,\{1\}\}$ $B=\{\{x_1\},\{x_{21},x_{22},x_{23}\},\{x_{31},x_{32},x_{33}\},\ldots,x_N\}$ in a way to ideally obtain a ...
1
vote
1answer
64 views

Reducing a system of vector equations

I'm trying to solve a system of vector equations. I know this is solvable since I've done it myself by hand (I reduced it to solving the root of a quartic anyway). I'm trying to do it in Mathematica ...

15 30 50 per page