4
votes
1answer
928 views

Methods for NonlinearModelFit

I am using NonlinearModelFit for a thesis project. I get quite different results if I change the Method to LevenbergMarquardt or QuasiNewton or ConjugateGradient ...
5
votes
1answer
96 views

What happened with the file?

What happened with this file? infile = "\\test data.txt"; outstr = OpenWrite[infile]; instr = OpenRead[infile]; Read[instr, Record]; Close[instr]; All ...
7
votes
5answers
353 views

Efficiently finding the positions of a large list of targets in another, even larger list

I have a big list. It contains nearly 60,000 sub-lists. It's structured like bigList = {{x1,y1,z1},{x2,y2,z2},{x3,y3,z3},.....,{x60000,y60000,z60000}}; I have ...
4
votes
1answer
186 views

ContourPlot from Vector Data

I have data in the form of x, y, vx, vy where vx and vy are components of the velocity vector at point x,y. I want to plot a contourplot of this. How can I do that since contourplot asks for three ...
16
votes
4answers
539 views

Clustering a set of points

I have a set of 2D points in the square defined by {-1, -1} and {1, 1}. These points typically form compact groups. I need to ...
3
votes
0answers
327 views

How to make 3D object smooth?

This thread considers mathematical methods here to make the 3D object smooth but this question consider how to achieve the goal of smoothing a 3D object in Mathematica. I want to get smoother ...
12
votes
1answer
105 views

Is there a callback for notebook exit?

I know that $Epilog is called when Mathematica is exited; is there a callback upon exiting the notebook? If so, what is it?
0
votes
2answers
266 views

Creating an API or Widget based on a Mathematica notebook

I'm trying to create a matrix calculator and graph tools for our website and was wondering if there is a way to create Wolfram API or Widgets based on a Mathematica notebook.
4
votes
1answer
312 views

How do I set the boundaries of the legend for a ListDensityPlot?

I have a 3-d array imported from a text file. One dimension represents time, and the other two represent space. It's basically an array of 2-d arrays of temperature values. I want to plot these values ...
11
votes
5answers
336 views

Faster way to convert triangle list to edge list with no duplicates

I have a list of triangles returned by a Delaunay triangulator, in the following format: ...
1
vote
3answers
324 views

How to revolve a surface about a line other than the $x,y,z$ axes? [duplicate]

I just started working with Mathematica 8 and I'm having trouble revolving a function the way I want. I have to revolve the function $x^2/4 +2$ and $y= 0$ around $y=6$ to form an ashtray, but I ...
3
votes
1answer
668 views

Manipulate (Linux version of Mathematica)

I'm runnning Mathematica 9 on Ubuntu 11.10. After installing CDF player I still have problem (most of time) with Manipulate. Only way I'm able to change value of a ...
5
votes
2answers
208 views

Update a function avoiding infinite recursion

I am quite new to Mathematica and not completely familiar with functional programming. I am currently working with a function (call it foo) and wish to change its behaviour, for example, by adding 1 ...
3
votes
2answers
453 views

Evaluating the integral of $\cos (\theta )\cos\left[\tan ^{-1}\left(\frac{a^2 \tan (\phi )}{b^2}\right)\right]$

I am trying to evalute the following integral: Integrate[Cos[θ] Cos[ArcTan[a^2/b^2 Tan[φ]]], {φ, 0, 2π}] I know that for $a=b$ I should get 0 out of the integral ...
1
vote
1answer
107 views

Only perform a symbolic differentiation once

I want to define a function that involves a differentiation step that Mathematica can do easily, which might be of the form ...
2
votes
1answer
78 views

Numerical integration with OwnValues

Say I have a symbol with an OwnValue a = y And we define an integration like this ...
1
vote
1answer
372 views

Problem using NDSolve

This might be some simple mistake, but I am running out of ideas. I am trying to fit an ODE system to some data. This error keeps appearing NDSolve::nlnum: "The function value {0.299812 - ...
9
votes
2answers
256 views

How can I get the right hand side of a delayed expression?

Imagine there is a given function f, defined with SetDelayed, say f[x_] := Sin[x]^2 + Cos[x]^2. Is it possible to get rhs of ...
1
vote
1answer
301 views

Substituting solution from Solve into the equation and making a plot

I want to solve an equation and substitute it into a Plot expression. My code looks something like this a[b_, x_] := bx + 1; sol = Solve[(1 + b)x + 1 == 0, b] I ...
4
votes
2answers
274 views

How can I change a Slider's appearance?

I am using Mathematica 9.0 and Windows 7. I want to create a Slider that looks like the following: I tried the following: ...
0
votes
0answers
35 views

Define a Plot3D function with custom options [duplicate]

I am trying to define a Plot3D function with custom options, following (this previous SE question), but I'm running into a brick wall. I've narrowed the problem to the following 'toy' code: ...
1
vote
1answer
172 views

Automating sequential import of data from web

I am trying to import data from multiple web pages hosted by a single online source. The data is posted by the source as one data set per web page for each week of the year. I would like to import the ...
0
votes
1answer
158 views

Alleviating a bottleneck involving a function call with symbolic derivatives

I have a bottleneck problem involving a function call with symbolic derivatives. I don't have much experience with Mathematica (or any dynamic language) and I'm certain that the way I've set this up ...
0
votes
2answers
443 views

Using Mathematica to find poles of Gamma functions

I am concerned about the expression on the RHS of equation A.5 (page 19) in this paper: $$\int\frac{d^d ...
4
votes
2answers
237 views

Mathematica averaging a big list of large images

I have a list of several hundred images, and I want to average the list to get a single image. Each image is 12bit TIFF with 2048*2048 pixels, and I am using the following to do the job: ...
10
votes
3answers
2k views

Solving a time-dependent Schroedinger equation

I want to solve the time-dependent Schroedinger equation: $$ i\partial_t \psi(t) = H(t)\psi(t) $$ for matrix, time-dependent $H(t)$ and vector $\psi$. What is an efficient way of doing this so ...
24
votes
4answers
910 views

What tools can help in realizing tail recursion?

I had nice discussions with Leonid and Rojo that got me interested in tail recursion. Tail recursion is not always easy to realize with Mathematica, so it would be nice to have some tools to help with ...
11
votes
1answer
250 views

Can Wolfram's Player Pro use proprietary packages?

A few entwined/related questions: Can Wolfram's Player Pro use proprietary packages? I have searched Wolfram's site pages on Player Pro and don't see anything that provides a clear answer to this ...
1
vote
0answers
100 views

Extracting Facebook Managed accounts (pages) in Mathematica? [duplicate]

I want to use Mathematica to explore various relationships on my Facebook pages. I've been able to successfully extract information on my personal Facebook page using the build in Social Media ...
2
votes
1answer
124 views

Any solution to system of equations?

I need ANY combination of 8 variables which satisfy: a+b+c+d+e+f+g+h=0 a^2+b^2+c^2+d^2+e^2+f^2+g^2+h^2=1 a*b+b*c+c*d+d*e+e*f+f*g+g*h+a*h>2/3 Ideally these ...
6
votes
3answers
382 views

How to use custom Dynamic inside Manipulate

I was wondering if it is possible to use a custom Dynamic[var, function] inside a Manipulate. The reason for the need is this: ...
6
votes
2answers
324 views

How to punch a hole in some 3D distribution of points

Suppose we have a long list of 3D Cartesian coordinates, defining a distribution of random points in 3D space. How could we remove all the points inside a sphere of radius ...
6
votes
1answer
143 views

Position with Except returns first item {0} and last item {}. Why?

Here is a simple list: l={1, 0, 2, 1, 0, 1, 0, 1, 2, 0, 2, 0, 1, 0, 1, 0, 0} To get the position of non-zero elements I use ...
14
votes
6answers
2k views

X-Y scatter plot with coloring dependent on Z value

I have an array of $(x,y,z)$ triples (array dimensions: N x 3), from which I can make a 2D scatterplot of $(x,y)$ values: ...
3
votes
6answers
1k views

Why is this Mandelbrot set's implementation infeasible: takes a massive amount of time to do?

The Mandelbrot set is defined by complex numbers such as $z=z^2+c$ where $z_0=0$ for the initial point and $c\in\mathbb C$. The numbers grow very fast in the iteration. ...
8
votes
1answer
261 views

DeleteDuplicates[] does not work as expected on floating point values

Here is my simple example, and in this case function DeleteDuplicates does not work as expected. I want to FindRoot of my ...
9
votes
2answers
143 views

Unexpected behaviour of SeriesCoefficient?

Following this question/answer I discovered and played with SeriesCoefficient. In particular, I tried ...
11
votes
2answers
221 views

SaveDefinitions->True changes the displayed image

I have a Manipulate[ ] that displays an image with a superimposed Locator object. It works fine when I have ...
9
votes
2answers
509 views

Find closed form expression for series expansion coefficients [duplicate]

Is there a built-in function that will find a general expression for the coefficient of the series expansion of a function? Series will only give the explicit ...
6
votes
1answer
196 views

Digital Elevation Maps (DEM) are Warped yet ReliefPlot renders as a rectangle - how do i join?

I downloaded several USGS Digital Elevation Maps (DEM files) corresponding to 12 adjacent areas. Each file Imports[] into Mathematica and I can render the individual ...
1
vote
0answers
238 views

Data structure for a list of actions

The idea: I need to generate a sequence of events then run a "propagator" over the list of events where the "propagator" will update the state of the following event. I can then write functions that ...
4
votes
2answers
167 views

How to use ScientificForm in computation

Lets say I want to add 2 values : ...
4
votes
0answers
290 views

Cubic polynomial interpolation with velocities listed rather than some points

I am trying to use the function BSplineFunction[] to create a natural cubic spline. Normally what is done is that you specify "SplineDegree -> 3" and include a list of points and it will carry out ...
7
votes
2answers
657 views

How can I mesh a solid cylinder with triangular or tetrahedral elements

I need to plot triangular mesh on a cylinder. However the function Cylinder doesn't have a mesh option. By using ...
3
votes
1answer
412 views

Controlling ColorFunctionScaling

Is there a way to control the scaling of ColorFunction beside just to turn it off and on with ColorFunctionScaling? Two ...
24
votes
7answers
881 views

Graphical representation of a moving sound source

Some explanation since I have got a specific and another more open-ended question: I used two microphones in a 90° arrangement (see picture below) to capture sound from a source moving around the room ...
5
votes
3answers
389 views

Replace very small numbers by zero in the output of a list

I have a long nested list, but many elements are numbers of order 10^-18 or less, eg ...
3
votes
1answer
66 views

DateString and localization, $Language ignored

I have a DateString calculated in English. Now I would like to change the output according to localization. I have read that localization is possible for Menu, ...
2
votes
0answers
81 views

Exporting large numbers to a text file [duplicate]

I need to export large numbers to an ASCII text file, but as simple digits without powers of ten, e.g. I need to write 123456.789 to the file and not 1.23456789E10^5. It seems like such a simple ...
5
votes
4answers
424 views

How can I randomly color Graphics3D objects?

I have a set of Graphics3D primitives (here, spheres) which I would like to assign either: (1) One of a subset of colors, e.g. {Green, Red} (2) A random color over some RGB interval Writing ...

15 30 50 per page