8
votes
0answers
370 views

Import an SPSS, SAS, or STATA file into Mathematica

I would like to import the World Value Survey data file into Mathematica, but it's only given in spss, sas or stata formats, which are statistical analysis softwares format I think. I can't get to ...
0
votes
1answer
447 views

NIntegrate & non-numerical values

I am wondering why I am receiving the message "The integrand ... has evaluated to non-numerical values for all sampling points in the region ..." for a particular calculation I am running. How can I ...
2
votes
1answer
178 views

How can I mix colors?

As far as I know if you combine Blue and Green the result is Cyan (using additive mixing). ...
5
votes
2answers
253 views

Random Matrix with integer coefficients and inverse also having integer coefficients

I'm trying to build a function that gives me matrices such that each: Has integer coefficients. Is non singular. Has inverse which also has integer coefficients. I have some code that one of my ...
5
votes
0answers
184 views

Visualizing nested lists for easier human understanding

When interacting with Mathematica, I often find myself staring blankly at waves of curly braces, trying to understand how data is organized hierarchically. For example, the beginning of the result to ...
2
votes
1answer
449 views

Simulated Annealing InitialPoints option

I have a cost function that depends on 4 parameters: CostFunction[{tx,ty,tz,ox}]. I used NMinimize[] function with ...
0
votes
1answer
223 views

Solve[polynomial, x, Reals] doesn't get all real roots or correct ones?

My main confusion is about the difference between the two code blocks at the end of this long spiel, but the spiel contains the code to create the polynomial if its coefficients are helpful for ...
1
vote
0answers
91 views

NMinimize memory consumption problem in Mathematica 9 vs. 7 & 8

I am having trouble using NMinimize in Mathematica 9 - Memory consumption overflows. The same NMinimize command, with the same ...
1
vote
3answers
203 views

plotting an Integration output

How to solve this integral by Mathematica even by numerical methods (plotting the solution) Integrate[(Cos[x] - a)/(1 + a^2 - 2*a*Cos[x])^1.5, {x, 0, 2*Pi}] It ...
1
vote
2answers
87 views

Missing something in my input for CountryData dependencies

I'm trying to find (a)which countries have dependencies (b)and a list of countries that consider themselves dependencies (c)and a list of countries that don't consider themselves dependencies. ...
-1
votes
1answer
332 views

Gamma Incomplete Function representation in Mathematica and Matlab

I am confused about Gamma Incomplete function calculation in Mathematica and MatLab: For example, in Mathematica: Gamma[5,3] = 19.56 But in MatLab: ...
1
vote
1answer
110 views

Unit ratio in plots? [closed]

I want to make a plot in which unit interval on both axes to have equal lengths visually. i.e. I want (1,1) and (0,0) to make a square rather than an elongated rectangle.
8
votes
2answers
253 views

Problem importing a JCAMP-DX mass spectral file

I have some problems importing a JCAMP-DX EI-mass spectral file using Mathematica 9. For example, if I download the mass spectrum of nonacosane in JCAMP format from NIST, ...
0
votes
1answer
122 views

Manipulating and using result of DSolve

I have an unsightly looking equation that nonetheless has an analytical solution. The solution is ugly as hell, but exists; I use the following code with the DSolve ...
4
votes
2answers
731 views

ArcTan[z] and ArcTan[x,y], Restriction and Conversion

In Mathematica there are two different forms for the arctangent (inverse tangent), namely ArcTan[x,y] which gives the arc tangent of $y/x$, taking into account ...
2
votes
1answer
221 views

Why is this expression being held, and how can I evaluate it?

I can't figure out why an expression isn't evaluating, even though there's no Hold* in its FullForm: ...
2
votes
4answers
188 views

Where did I go wrong with my implementation of finding a plane tangent to a surface?

I am working on finding the plane tangent to a paraboloid at a given point. My code: ...
1
vote
1answer
147 views

DSolve expression not evaluating

I entered the following into Mathematica: p[x_] := 4 x q[x_] := 4 Sqrt[x] - 3 f[x_] := E^-Sqrt[x] DSolve[y''[x] + p[x] y'[x] + q[x] y[x] == f[x], y[x], x] ...
3
votes
1answer
200 views

When does the real part of Zeta vanish on the critical line?

This seems to be a quite a simple problem but I cannot make it work. I am trying to find all values within a given range for which the real part of the Zeta function vanishes on the line: ...
1
vote
1answer
259 views

How to effectively compare two sentences and say both are equal

want to compare two text file. Suppose file AA contains following text ...
5
votes
1answer
238 views

Efficiently searching a list for the position of the closest number to a specified number

Searching by closest and position I wasn't able to find an answer—but found Nearest by guessing. Nearest, however, returns ...
1
vote
3answers
149 views

automatic processing of numerical results in `Plot`

First I want to solve an equation $F(x,y)=0$ for $y$ by supplying a value of $x$. (suppose obtaining the analytic form of $y(x)$ is too difficult) Then I want to plot root $y$ (numerically calculated) ...
0
votes
1answer
187 views

Recurrence relation: Find a recurrence and evaluate (on WolframAlpha) [closed]

I am trying to get WolframAlpha to solve a recurrence and evaluate a result in one query. For example: If ...
1
vote
1answer
141 views

Plot3D missing a zone

I am trying to plot a simple graph using Plot3D: ...
3
votes
2answers
263 views

Assigning an analytical approximation to the error function erf(x)

Working with some iterative integral equations I have Gaussian density functions involved therein. Integrating the gaussian function I obrain the error function. When I take the second integration, ...
0
votes
1answer
99 views

Function generating a rule with a Patterns: e.g. toRule[ lhs, rhs] into lhs[x_] -> rhs [duplicate]

I want to create a rule as a function of z from a left and right hand side. My (non-working) code and usage is: ...
0
votes
2answers
84 views

Display Part Of or Summarize Other Notebooks

How might I display parts of(or basically summarizing) one Notebook from parts of several other Notebooks? This isn't a strict question question but more of a general/wiki question of how to organize ...
2
votes
3answers
304 views

How Can I superpose an image and a graphics?

I want to superpose an image with a graphics in order to evaluate their alignment. I am writting this exemple of code. ...
1
vote
1answer
553 views

Is LinearSolve the most robust way to solve the equation $Ax=b$?

I want to solve the equation $Ax=b$, where $A$ is an $n\times n$ matrix, and $x$ and $b$ are $n\times 1$ column vectors. Here $n=124$. LinearSolve[A,b] I got the ...
0
votes
2answers
214 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
132 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
182 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
130 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
33 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
171 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
262 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
378 views
0
votes
0answers
154 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
260 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
299 views

FindMinimum [] methods

Which algorithm is used when we do not use the option Method of FindMinimum[] function. FindMinimum[f,{x,x0}]
1
vote
0answers
93 views
5
votes
0answers
208 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
108 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
25 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
474 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
100 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
173 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
82 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
178 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, ...
0
votes
1answer
266 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 ...

15 30 50 per page