4
votes
3answers
36 views

Turning a set of random walk data 45 degrees

I have a set of data that is just a "random" (generated by me, not by computer) sequence of length 2000 of 1's and (-1)'s. I used it to plot a 1-D random walk where +1 is step up, (-1) is step down, ...
0
votes
4answers
19 views

How do I write a condition for Position that uses both the current and previous element?

For example, given {57, 3, 40, 94, 9, 84, 81, 93, 76, 5, 7, 76, 38, 9, 23, 95, 49, 0, 30, 3} I'd like to get all the indices at which the elements cross from ...
3
votes
1answer
118 views

How do I prevent Mathematica from reformatting the expressions that I copy as LaTeX?

When I choose something that looks like $$ W_1(1)=\rho ^{5} \omega _1 \rho ^{-5}\\ W_2(2)=\rho ^{23} \omega _2 \rho ^{-23}\\ W_3(3)=\rho ^{10} \omega _3 \rho ^{-10}\\ W_4(4)=\rho ^{9} \omega _4 \rho ...
0
votes
2answers
14 views

Defining the domain of positive real numbers

I am trying to solve an equation by assuming that all the variables are real and strictly positive. I can use the keyword Reals for the argument ...
0
votes
1answer
10 views
9
votes
1answer
114 views

Why does cropping an image improve TextRecognize so much?

I am trying to use the TextRecognize function to extract data from certain screenshots. This is already a cropped version. Using TextRecognize on this yields ...
5
votes
2answers
111 views

How can I generate a $2n$-point moving maximum of a list as efficiently as MaxFilter?

This is based on the prior question, Moving maximum function?, where @rasher provided two winning solutions (i.e. clearly the most efficient): MaxFilter[list, 1] ...
0
votes
1answer
25 views

FindRoot, Loops and multivariate nonlinear system

I posted a question yesterday asking how I could get all the solutions to my system of 4 nonlinear equations with 4 unknowns. I gave up on this since it seems ...
2
votes
2answers
95 views

WorkingPrecision causes issue in the NIntegrate

I really can't figure out why my code sometimes is not working. My integrals involve two variables (k and kz). The integration ...
3
votes
4answers
75 views

Get Axes Range of Plot?

Say I have some plot plot = Plot[Sin[x], {x,0,10}] (*as an example*) Is there a way I can get the x and y axes min/max values from the "plot" variable? If I ...
0
votes
1answer
62 views

Floating point arithmetic bug caused by Table[]

I was doing something fairly ordinary and noticed something I can't, for the life of me, explain. For context, I wanted to take make a function that takes an array of data like the one below, then an ...
1
vote
1answer
54 views

Can Save[] produce a .nb file instead of a text file?

(I use Mathematica 9.0.1 on OS X 10.10.2.) Suppose I have a notebook in which I make some definitions and assignments. ...
0
votes
0answers
24 views

If the earth's rotational speed increased by 2% each day starting today…what would be the difference in age 20 years from now? [on hold]

If the new adjusted revolution of the earth still equaled one day and 365 days still equaled one year, how old would someone be 20 years from now (20 years based on the current rotation of the earth) ...
0
votes
4answers
63 views

Find all disjoint subsets of equal length

Suppose that $A$ is a list with $n$ elements where $n$ is even. I want to write a function that returns all pairs $(A_1,A_2)$ where the sets $A_1$ and $A_2$ each have length $\frac{n}{2}$, $A_1 \cap ...
8
votes
2answers
677 views

Mathematica: Retrieving PlotRange from Histogram

I know that one can retrieve PlotRange of a plot by using AbsoluteOptions[plot,PlotRange] but that won't work on Histogram. Here an example: ...
0
votes
1answer
64 views

WSMModelData Error

I am getting this error message when I run simulation in Mathematica that makes iterations to a SystemModeler model. ...
0
votes
1answer
17 views

Parallel evaluation hangs before doing anything

[I use Mathematica 9.0.1.0 on OS X Yosemite 10.10.2.] I am experiencing difficulty with parallel evaluation that I am finding extremely perplexing to troubleshoot. I define the following function in ...
0
votes
1answer
58 views

Eliminating parameter from parametric equation

In Mathematica Online I tried: Eliminate[{x == t + t^3, y == t - t^3, z == 1 + t^4}, {t}] ...
4
votes
3answers
106 views

Testing a package in Mathematica 9

I am in the process of writing a package, but my way of testing it just seems wrong and inefficient. Each time I edit the .m file, I save it, quit the kernel, call the package in a separate notebook ...
0
votes
0answers
12 views

How to debug an existing notebook in Workbench

I have an existing notebook that I want to debug in workbench. This notebook is a self contained program that does not use any .m files. From what I can tell from the Workbench documentation you ...
0
votes
0answers
39 views

Any way of solving this system of nonlinear equations with non integer powers?

I have a system of four nonlinear equations. Some of the exponents are fractions. I was wondering if this is what is causing NSolve to run for hours without giving ...
3
votes
1answer
36 views

How to change line lengths in LineLegend

How can I shorten the lengths of the LineLegend[] lines in the following plot? Is there a way to control line spacing as well? ...
0
votes
0answers
47 views

Simplified expression is different than original

I have a question regarding the Simplify command in mathematica. I am working with a 4 x 4 table called Eqs, filled with symbolic expressions. I then do ...
1
vote
1answer
20 views

Memory Problem with Modules and NDSolve

I'm using NDSolve inside a module, and I appear to have a memory leak. The relevant code is: ...
0
votes
0answers
16 views

How to identify primary keys in an existing database table

I would like to identify the primary keys in a DB table using DatabaseLink commands trying to exclude SQLExecute. It seems like SQLTableInformation or SQLColumnInformation may not show that ...
4
votes
0answers
76 views

Delete duplicates by a criteria

Given that I have a set of points as below ...
1
vote
0answers
43 views

Better layout for large a directed graph?

This shows a directed graph for an iterated n-bit pseudo-random function parameterized by s. ...
1
vote
1answer
44 views

Using Specularity effects and ColorFunction in Plot3d

I'd like to reproduce the 3d surface of the attached image . What I'm interested in, is the light reflection at the basis of the surface and the rainbowlike color. I use Plot3d and colorfunction in ...
0
votes
0answers
16 views

about Updating Wagon's FindAllCrossings2D[] function

I am working with the shortest version of FindCrossings2D, which was provided by Vitaliy Kaurov. Here is Vitaliy's function: ...
-1
votes
0answers
28 views

Finding R^2 and R^3 of relations [on hold]

Let R be the relation on the set { 1 , 2 , 3 , 4 , 5 } containing the ordered pairs (1 , 1) , (1 , 2) , (1 , 3) , (2 , 3) , (2 , 4) , (3 , 1) , (3 , 4) , (3 , 5) , (4 , 2) , (4 , 5) , (5 , 1) , (5 , ...
0
votes
0answers
38 views

Long term growth model. Recurrence solution in NestList not behaving as expected compared to NDSolve

I'm trying to model the long term growth of a bioreactor according to monod kinetics: $ x'[t] = $$Qin \over V$ $( x_0-x[t]) + x[t]*\mu[t]\\$ $ s'[t] = $$Qin \over V$ $( s_0-s[t]) - x[t]$ $\mu[t] ...
2
votes
1answer
45 views

Mathematica on Raspberry Pi

Can I develop BSD/MIT open-source library for Mathematica using free non-commercial version on Raspberry Pi?
1
vote
2answers
122 views

Perturbation theory with Mathematica: Definite integral of polynomial times exponential times hypergeometric function of imaginary argument

I would like to ask also Mathematica users about my question from the math forum. To expand, I'm adding the code which calculates the full double integral for $n=0$ and $\mu=0$ (the second in the ...
9
votes
1answer
261 views

Is there a way to convert mathematica code to OpenMP or OpenACC?

I see that Mathematica has limited support for things like OpenCL and CUDA, but what about other standards like OpenMP or OpenACC?
1
vote
1answer
42 views

NDSolve in Mathematica won't use all the cores avaiable

When I solve a system of differential equations in Matlab, the task manager shows that all the CPU cores are in use. This is not true when I solve the same system in Mathematica. I have six cores. ...
2
votes
3answers
85 views

Converting between AbsoluteTime and Unix time

By trial and error, I've found that the following gives the current Unix time: AbsoluteTime[] - UPOCH where UPOCH can be defined in any of the following ways: ...
1
vote
1answer
13 views

SetterBar Display using MatrixForm

I have vAwGOptns = { {{0}, {0}}, {{1}, {0}}, {{0}, {1}}, {{1}, {1}} }; and would like to select ...
6
votes
2answers
546 views

UNIX time to DateList

I have data that is timestamped with UNIX time, which is the number of seconds since January 1, 1970 UTC. Unfortunately, it seems that most of the date and time functions in Mathematica are based on ...
0
votes
0answers
16 views

FindMaximum slow for fixed parameters

I hope my problem can be solved by just showing you this tiny part of my code which does not run on its own. I have an optimization problem and want these functions to work on various data sets. ...
1
vote
2answers
173 views

3D Gamma function

I try to plot the following function: Plot3D[Gamma[1+0.5*(n+m)]/Sqrt[Gamma[1+n]*Gamma[1+m]],{n,0,1000},{m,0,1000}] I expect that for m=n and near to it the value ...
0
votes
0answers
21 views

How to investigate the seasonality of the data

After asking how to get rid of the seasonality of this set of data, I'd like to close the circle with a last question: How to detect seasonality in data using Mathematica? A generic answer (not ...
2
votes
2answers
157 views

Strange result of an infinite sum

I have the following definition: o[a_] := Sum[ x^(2 k + 1) Product[(2 i + 1)^2 - a^2, {i, 0, k - 1}]/((2 k + 1)!), {k, 0, Infinity}] Now when I evaluate ...
3
votes
3answers
45 views

Multiple integrals where the number of integrals is aribtrary

I know that I can do, say, a triple integral such as $$\int_{a_x}^{b_x}\int_{a_y}^{b_y}\int_{a_z}^{b_z}f(x,y,z)\,dz\,dy\,dx$$ with the input ...
7
votes
3answers
338 views

Historical Exchange Rates via FinancialData

FinancialData["name"] and FinancialData["name", start] return respectively; the last known price, and the daily closing values ...
0
votes
1answer
27 views

how to download using weather data function many proporties exactly.

how to download using weather data function many proporties exactly. Example WeatherData["WMO44292", "Humidity", "Pressure", "Temperature", \ {{2005, 1, 1, 0, 0}, {2015, 1, 1, 0, 0}}] .
3
votes
2answers
60 views

Deseasonalize the data of traffic growth for the past data

In another question (Using TimeSeriesForecast for forecasting the traffic growth) I asked to use the TimeSeriesForecast on this set of data the answer provided the plot with and without the ...
0
votes
3answers
51 views

How to iterate through a list of rules?

Let's consider I have a list of rules: {Aa -> 1/2, Av -> 2/5, Bx -> 3/7, Ce -> 4/9, ...} I want to find all keys that contain the letter "A" and ...

15 30 50 per page