2
votes
1answer
207 views

How can I create a colour image using raw black and white data? (FITS data cube)

I have a data cube containing pictures of a galaxy across a thousand wavelengths. I want to take the data for the image slides in the red and blue parts of the spectrum, and have them represented in ...
0
votes
0answers
80 views

Error Interpretation with NIntegrate, max. possible accuracy/precision

I guess the right question to this is: Which method is used at NIntegrate with Mathematica 8 as default and which is used with Mathematica 9 as default? ...
4
votes
2answers
123 views

How to constrain the generation of all possible orderings?

Here is code from Simon Woods' answer for getting all possible weak (equal ranks allowed) orderings for $N=3$ objects: ...
13
votes
1answer
537 views

Block Matrix Algebra with Mathematica

I have come up with some BlockMatrix Algebra for Mathematica to make notations easier. I have the following: ...
3
votes
1answer
304 views

How to speed up Manipulate with Graphics3D

How do I speed up the Manipulate of the Graphics3D objects here? It is currently painfully slow, and I'm at a loss. I have reviewed many other posts and implemented what I could based on them, but it ...
7
votes
1answer
771 views

What are the algorithm details of FindRoot?

The Help page of FindRoot says: "by default, FindRoot uses Newton's method (Newton-Raphson) to solve a nonlinear system". But I ...
6
votes
1answer
235 views

Computations in the exterior algebra

I want to be able to compute with explicit exterior algebras of vector spaces. For example, given a real vector space $V$ of $3 \times 3$ matrices, I want to consider expressions of the form $v\wedge ...
4
votes
2answers
192 views

Upsampling matrix by inserting zeros inbetween elements

I want to essentially take an image with $n \times n$ pixels and expand it into a sparse array, spacing out the pixels by a factor $2$ or $3$. Each pixel in the input image occupies one of the corners ...
8
votes
2answers
423 views

How to make use of an interpolating function outside of Mathematica? [duplicate]

I'm currently working on a project where I have to solve some partial differential equations. Initially, I made some approximations so that an analytic solution could be obtained, and my ...
1
vote
0answers
317 views

Why DSolve and NDSolve give different answer

Consider these code, which solve the same equation using DSolve and NDSolve, why do they give different answer? Which one is ...
6
votes
1answer
417 views

Having trouble fitting data using NonlinearModelFit

I'm trying to fit data = {{2002, 45000}, {2004, 90000}, {2005, 120000}, {2013, 211000}}; to an exponential function ...
0
votes
0answers
58 views

Can you set up a remote kernel for computation and a local kernel for predictive interface?

I am able to launch remote kernels from my Windows box to our Linux cluster that has the data I need and the capacity to run analysis (numerous & speedy cores, spacious memory, etc.). Works ...
22
votes
1answer
222 views

Why is multidimensional Reverse slow?

I have found that multidimensional Reverse is ~10 times slower than exact -1 ;; 1 ;; -1: ...
1
vote
2answers
214 views
1
vote
1answer
273 views

How do I select a random sample without replacement? [closed]

What is the module that selects a random sample of size k (without replacement) from a given population of size n, involving the command Subsets.
2
votes
1answer
133 views

What is going wrong when I save an animation as a SWF-file?

The first I am trying to export animations from Mathematica to a file and then to LaTeX. Don't assume I know anything about what I'm doing. The following definitions defines the still image of a ...
8
votes
1answer
215 views

How do I indent C code generated by SymbolicC?

I'm continuing to experiment with the SymbolicC` package, and it's crucial to be able to inspect the generated code in order to do, well, anything useful with it. ...
13
votes
1answer
156 views

CompiledFunction returns machine numbers smaller than $MinMachineNumber

When thinking on the workaround for this LogLogPlot bug suggested by halirutan I noticed that CompiledFunction actually can ...
2
votes
2answers
233 views

Weighted mean of complex exponential function using NIntegrate

I have defined the following functions: ...
7
votes
1answer
158 views

Is it possible to get the transformation PrincipalComponents uses to transform data?

As far as I can see PrincipalComponents[data] just gives data in the principal component basis. The problem is that after this, I would like to transform new data ...
6
votes
2answers
187 views

How to Clear variables represented as a list of strings?

Say I have a string list called fullpara fullpara={"width", "long", "line", "distance"} And there are corresponding variables ...
4
votes
1answer
177 views

How to ListPlot over an Imported Image

I would like to plot the gray scale (average of RGB) of an imported image, and combine the graph with the imported image. How can I do that in Mathematica? Say, the imported image is a 800x5-pixel ...
9
votes
1answer
537 views

NDSolve::ndcf: Repeated convergence test failure. How to solve?

I am trying to simulate a system of $n$ pendulums with some friction in Mathematica 9. This is the code I am using: ...
3
votes
1answer
251 views

How do I convert from NAD 83 State Plane Coordinates to Latitude and Longitude?

I am trying to convert NAD 83 State Plane New York Long Island coordinates to Latitude/longitude. Below is my code - what am I doing wrong? ...
1
vote
1answer
207 views

Alternating Axis Labeling between Left and Right Axis

I'm using the following to label a MatrixPlot: FrameTicks -> {{yticks, None}, {None, xticks}}, I'm labeling these ticks with text. It is impossible to get the ...
0
votes
1answer
66 views

use variables again after derivation

I have something the following form: a= 3*k; b=c*d*a; h[k_]=b*k^3; so if I use l[k_]=D[h[k],k] I get ...
6
votes
2answers
196 views

Finding common roots of a specific system of polynomials

Some of my colleges are interested in finding common zeros of the following four polynomials: ...
0
votes
0answers
52 views

Why are fonts in my notebooks grainy after transferring to a new machine? [duplicate]

After transferring Mathematica (and successfully transferring my license) to a new machine (a Retina MacBook Pro) all the fonts in my documents look jagged: How do I get Mathematica to show smooth ...
1
vote
1answer
45 views

Different ordering for KroneckerDelta?

I have an expression like this: Assuming[m [\Element] Integers && n [\Element] Integers, 1/2 I J n (4-m n+n^2) KroneckerDelta[m,-n]]//FullSimplify Now, ...
5
votes
1answer
450 views

p-iteration algorithm to solve Lambert's problem for interplanetary trajectories

I've been reading up on using the p-iteration method to solve Lambert's problem for choosing the correct interplanetary trajectory between two planets given the ...
1
vote
1answer
88 views

Simplify ignores DiracDelta contribution from Coulomb sources

Executing the following line, Simplify[Div[Grad[-1/Sqrt[{x, y, z}.{x, y, z}], {x, y, z}], {x, y, z}]] yields 0. However, this is incorrect, since ...
0
votes
1answer
141 views

Small problem at equation solving

I have $2$ equations in $2$ parameters which involve integrations. The limits of the integrals can not be defined analytically. They also require equation solving and eventually I couldnt incorporate ...
8
votes
2answers
884 views

Running CUDA or OpenCL using Mathematica on Raspberry Pi

I am wondering if someone can use CUDA and (or) OpenCL on a Raspberry Pi as in any normal PC equipped with a GPU. The main processor runs at 700 MHz and maybe will be slow for some imaging ...
3
votes
2answers
114 views

Why does the iterator index in Table not work here?

I type the following command line Table[D[#1,varx[[i]]] &,{i,3}] where varx is a vector of dummy variables ...
2
votes
1answer
328 views

Legends in a combined Plot and ListPlot

This question is related to the previously asked question Legends in combined Plot and ListPlot. Since Mathematica 9 introduced new option PlotLegends, I was ...
11
votes
7answers
393 views

Concatenation of lists in a Fibonacci-like pattern

I am trying to create a List of elements that follow the general pattern: $$X_{n+1} = X_n X_{n-1}$$ where the operation on the right hand side is concatenation, i.e., joining. I want to achieve the ...
2
votes
2answers
193 views

Fastest way to concatenate many text files in a given directory

I have about 1 million .txt text files in a directory which I would like to all concatenate in one single text file (separated by a newline character "\n"). Because of the number of files and their ...
2
votes
2answers
115 views

J/Link: getArray2() returns wrong array

I want to convert a matrix from Mathematica to an int[][] in Java. I use the code below: ...
20
votes
2answers
1k views

How to plot a certain surface? What is its parametric equation?

The surface show below is very beautiful; however, I don't know its function either as an implicit function or in parametric form. Anyone have an idea about it and how to draw it with Mathematica?
3
votes
1answer
123 views

With limited memory, how can I export very long Print results into a PDF or a notebook file?

I have a script with a long loop and very long formatted outputs like the following example code: ...
0
votes
3answers
103 views

How to get the indices of values in a list which are NOT an specific integer?

I got a real array A, where Dimensions[A] == {5000, 5000, 5}. Some of the values in A are ...
1
vote
0answers
280 views

Google speech API . Speech to text recognition with Mathematica

Has anyone tried to use the Google speech API with Mathematica? This would open up exciting possibilities when combined with the free form input already available in Mathematica and with the recently ...
5
votes
3answers
665 views

Increase 3D Graph thickness for 3D printing in Mathematica?

My code: Plot3D[{(2*x*y)/(x^2 + y^2)}, {x, -2, 2}, {y, -2, 2}] Output: And now I can export this to STL by using the export STL command, however, when I try ...
3
votes
3answers
331 views

How would I plot the volume element in cylindrical coordinates?

I have this graph: But it doesn't have a function so I can't just plugin in a function into wolfram or mathematica to plot it. I have these coordinates to make it however: ...
3
votes
1answer
120 views

Nested NDSolve with WhenEvent: setting up new equations and discarding old ones

I am checking a complex situation where a function x1[t1] only exit in a finite time span, and after this a new function x2[t2] ...
7
votes
2answers
268 views

Union of plotted regions as sum of colors

I wish to plot 2 functions $f$ and $g$ so that the region bounded by $f$ has color $c_f$, the region bounded by $g$ has color $c_g$, and the region bounded by both has color $c_f+c_g$. E.g. $c_f$ is ...
1
vote
1answer
71 views

Use boundaries of one plot for another

I am writing some code in which I combine a ParametricPlot[] with a RegionPlot[]. Mathematica is very good at figuring out ...
11
votes
3answers
187 views

Creating a custom context with a Hold construct

I'm trying to create a function "InContext" to execute a piece of code inside a certain context (and to return the result of evaluating that piece of code). One approach is to place the code inside a ...
4
votes
1answer
153 views

Volume within parameter space

Imagine a parameter space with variable 0<p<1, 0<e1<1/2 and 0<e2<1/2. ...
3
votes
1answer
103 views

Check that a relational expression is true for all complex numbers

How can I use Mathematica to check if a statement like $$\left| \frac{\sqrt{1+2z}-2}{2z-3} \right| \le 1$$ is true for all complex numbers $z$? Also, how can I use Mathematica to check such a ...

15 30 50 per page