3
votes
1answer
158 views

How to dequantify units in mathematica?

Is there a function which applied to a quantity returns its numerical value so I for instance can fill it into my Predictorfunction?
2
votes
2answers
125 views

Image Processing: Using AdjacentBorders with SelectComponents

I've been doing some image processing and have been having trouble with the AdjacentBorder command. I've got an image in which I have several elements that are on ...
3
votes
3answers
241 views

How to combine a plot with an image

I have an external data file data which contains the position of stars of a galaxy simulations and it looks like this ...
6
votes
0answers
91 views

Behaviour of Plot3D with large numbers [duplicate]

I have a problem with Plot3D. At first I thought it was a problem in general, but while creating a minimal example for posting here, it came out to be a problem with large numbers ...i guess. Let's ...
1
vote
3answers
151 views

Selecting a specific complex number from a list

I have a formula which is producing a large (hundreds of elements) list of complex numbers of the simple form $x+iy$. However I'm only interested in the one value which satisfies the conditions: ...
3
votes
1answer
128 views

fragment loss with ContourPlot3D

I expect to have a chimney-look plot out of the function z = 1/(x^2 + y^2), but what I got is a broken one. Is there a way to get an intact plot from ...
1
vote
4answers
234 views

How to extract only real solutions from the result of Solve

For Example, I have the following polynomial equations: $$ \left\{ \begin{array}{ll} \dfrac{2025 (208 x+5 (y-3446))}{52 (y+90)^2}+\dfrac{300 (8 x-21 y+1920) (y-80)}{7 (x+30)^3}+\frac{300 (80 x-21 ...
4
votes
3answers
178 views

How to get a list of days from July 4th to Oct 4th over a range of years

I'd like to create a list with days from the 4th of July to the 4th of October starting in July 1970 to the current date. I tried to use DateRange, but I'm a bit ...
2
votes
0answers
83 views

Find where an error occurred in a bunch of command line scripts

I have been using my intuition to solve errors in my Mathematica scripts. But when calculations got more complex and I started getting errors involving code in more participating scripts (a script ...
2
votes
2answers
418 views

What is the proper way to operate on interpolating functions?

I am trying to multiply an interpolating function by -1. If I do this Mathematica does not seem to allow any further operations. Bear with me while I generate the Interpolating Function in question. ...
3
votes
0answers
132 views

Making time-index dependent state-space models - where has the Kalman filter gone?

How does one now implement a discrete set of state space models? I had used KalmanFilter in the old TimeSeries application, but was keen on trying to do all this ...
1
vote
2answers
152 views

Integral with unreliable result

I want to calculate $\int_R^1 \sqrt{r} |\cos((k+\frac{1}{2})\pi r)|dr $ and I get a result from Mathematica. Then I try to check the result putting the value of $k$ and $R$, (k=1 and R=0.5) in the ...
5
votes
1answer
175 views

Deploy a custom function to the cloud

Following my previous topic on how to optimize a complex function, I decided to write a custom algorithm because I need this task to be run locally and on machines with no access to Mathematica. ...
3
votes
1answer
162 views

Is there a function that, given a fraction, will return the general term of its infinite series expansion?

Is here some way to expand a fraction to an infinite sum in mathematica, i.e., a series? I want the general term of the series. For example, $\frac{2}{3(x-1)^3}$
6
votes
3answers
215 views

Problem with WordBoundary in string patterns

I am trying to extract from a string all words that end with "-man", but the problem is that WordBoundary does not seem to work as it returns whole string ignoring ...
0
votes
1answer
215 views

Finding maximum/minimum value of system of inequalites

How would I get the maximum values for x1 and x2 given that I have plotted the region governed by the following system of ...
0
votes
0answers
52 views

Evaluation inside Compile

here's a simple question: I have a function: ...
42
votes
5answers
1k views

V10's Operator Forms - what are they good for?

V10 introduces an operator form for several functions perhaps primarily due to their role in queries as part of introducing data science functionality. At first pass it seems a lot of effort to add ...
1
vote
3answers
131 views

How to select the text on the button?

For example, I have a Button ...
1
vote
1answer
135 views

Parameter Estimation of a mixture of sums of Lognormals

Let $X$ be a random variable that is of a mixture distribution of two lognormals (with the same sigma), so $X \approx p\cdot \mathcal L (\mu_1, \sigma) + (1-p)\cdot \mathcal L (\mu_2,\sigma)$. Now ...
1
vote
1answer
190 views

Solving a trigonometric equation with one parameter

I have the following equation: 2 a^2 k^2 Sin[b k] - 6 a (k Cos[b k] - Sin[b k]/b) == 0 I set the value of b to 1, and I want ...
17
votes
4answers
515 views

the winding number for the circle map (Arnold tongue)

I want to perform an iterative calculation and visualize the results: f[n_, a_, b_] := Nest[# + a - b Sin[2 π #] &, 0, n]/n; If I use machine precision, it ...
3
votes
2answers
259 views

Weird behavior when changing parts of matrix

I have this matrix: mat = {{1, 2, 3, 4, 5}, {6, 7, 8, 9, 10}, {11, 12, 13, 14, 15}, {16, 17, 18, 19, 20}, {21, 22, 23, 24, 25}}; and here are its second row ...
4
votes
3answers
379 views

How to correctly project heat map onto map

I'm importing the NGA ASAM piracy database into Mathematica for analysis. ...
4
votes
3answers
99 views

Question about Replacements and String Manipulations

I'm trying to get better at Mathematica and in the book I'm using (by Nancy Blachman) is the following question (which apparently was taken from another book: The Art and Science of C) which reads: ...
2
votes
2answers
221 views

Problem setting up C compiler on a Mac

This is a follow up to this question. I am using Mma 10 on a MacBook-Pro with OS-X Mavericks. After reading the documentation under CCompilerDriver/tutorial/SpecificCompilers I did the following: ...
6
votes
2answers
213 views

Why does Mathematica appear to change the head of certain expressions?

I don't know if the question trivial or not (if so I will delete it), but here is what I have: I know that x x (* x^2 *) Looking at the full form gives ...
2
votes
1answer
116 views

Minimizing a function with some restrictions

I need help in finding a way to minimize a function with some complex constraints. I'm not an expert in this field, but I'm still trying to understand if I can do something with my problem. So, ...
1
vote
2answers
69 views

How do I format expressions so that replacement rules correctly apply to exponents? [duplicate]

I have a series of rules that I would like to apply to a series of expressions with variables, but cannot get Mathematica to correctly recognize that these rules should apply when my variables have ...
1
vote
0answers
69 views

Internal self-test error MLParseStream|c|297

I have been plotting time-dependent vectors. Earlier I used the following plotting options: ...
4
votes
1answer
303 views

How to clean up messy data

The start of my question is about one specific situation - I have some erroneous lat/long values in a dataset which I need to clean up. But I'd like it to cover the overall topic of cleaning up messy ...
0
votes
1answer
95 views

Series expansion for $\frac{1}{x+1}$ in terms of $\frac{1}{x-1}$

I would like to expand a function as $$\frac{1}{x+1} = \frac{1}{x-1+2} = \frac{1}{x-1} \frac{1}{ 1+\frac{2}{x-1}} = \frac{1}{x-1} \left[ 1- \frac{2}{x-1} + \left(\frac{2}{x-1}\right)^2 + \cdots ...
1
vote
2answers
130 views

How do get an output table or a plot of individual variables from NDSolve output

I have the following equations and settings: ...
8
votes
3answers
177 views

Substituting values in 3j symbols

I believe these three expressions should give the same answer of -1/Sqrt[3], but the first gives +1/Sqrt[3] whereas the second ...
10
votes
8answers
547 views

Forming an upper triangular matrix from the elements of a list

I asked this question before, but i was closed because it the question was not comprehensible enough. So i reworded it, hope that's ok. I have a list with 6 elements. ...
0
votes
0answers
99 views

how to solve an optimization problem in terms of matrices as the argument

How can I minimize an expression of the form a^T A a where a is a matrix. The following approach does not work if ...
0
votes
1answer
74 views

Using ImplicitRegion to define an ellipse around Multinormal distribution for integration

I have both a 2D 'MultinormalDistribution', and also a single xy point, and I would like to be able to calculate the probability of this point (given the multinormal distribution) and also plot an ...
5
votes
1answer
113 views

Series expansion for $\frac{x}{1- \frac{1}{x}}$

I would like to expand $\frac{x}{1- \frac{1}{x}}$ as $$\frac{x}{1- \frac{1}{x}} = x \left( 1+ \frac{1}{x} + \frac{1}{x^2} +\frac{1}{x^3} + \cdots \right) = x + 1 + \frac{1}{x} + \frac{1}{x^2} + ...
1
vote
1answer
114 views

Manual maximum likelihood estimation of a mixture with no closed form

Let $X$ be a random variable that is from a mixture of two Lognormals (Lognormals(mu1,sigma) and Lognormals(mu2,sigma)) and set $Y=X_1+X_2+...+X_{10}$ a sum of 10 random variables from this mixture. ...
8
votes
2answers
273 views

Unexpected behavior when using SortBy as a dataset filter

I am still experimenting with datasets. Recently I tried to query the Titanic example to get info on the oldest passengers. Here is what I tried ...
3
votes
1answer
93 views

Is it possible to change the fontsize when printing a notebook in the working enviroment?

I want to print a notebook that owns syntax color,I use the Szabolcs's method SetOptions[$FrontEndSession, PrintingStyleEnvironment -> "Working"] Then I can ...
7
votes
1answer
133 views

User-defined DistanceFunction for RegionNearest

In the function Nearest , I can define my custom function using the DistanceFunction option. e.g: ...
2
votes
0answers
100 views

Displaying subscripted symbols with TraditionalForm

I have pasted this code in from Mathematica 10 ...
7
votes
2answers
164 views

How to name a variable with the value of another variable?

A simple but very important (at least for me) question. In some languages for defining a variable, for example, we can do: i=10 "d"&i=30 So I have defined the variable d10, and... d10=30 ...
11
votes
5answers
321 views

How to prevent function from passing values to slot

For the following example: {#, #} & /@ {1, 2} I am trying to find a method to hold one of the slots (or both ) so that the function do not pass the values to ...
2
votes
1answer
165 views

Graphic using manipulate runs too slow

Here is a naive coding of a projection of a point on a sphere. It runs very slow. Can it be changed to run faster without losing its essential analytic character? ...
1
vote
2answers
41 views

how to extract a matrix and a vector from a vector [duplicate]

I have a vector like this: V = {a*exp1+b*exp2+c*exp3, a*exp4+b*exp5+c*exp6, a*exp7+b*exp8+c*exp9} and I want to get : ...
4
votes
1answer
364 views

Use of Strassen's algorithm

Strassen's algorithm is an algorithm for matrix multiplication that is asymptotically faster than the naive one. In practice, the matrices involved have to be quite large before Strassen's algorithm ...
4
votes
0answers
110 views

Precision problem while evaluating RegionMember or Element in V10

I'll try to give you a background on where the problem occured. The problem itself is defined near the end of the post. I'm running a sort of a simulation of a particle in a box. I finally got my ...
4
votes
1answer
150 views

How can I efficiently ArrayFlatten a matrix of sparse matrices?

I have a matrix of sparse matrices that I want to convert to a sparse block matrix. So, basically I want what ArrayFlatten does, except that I want the output to be ...

15 30 50 per page