All Questions

17
votes
4answers
6k views

How to calculate scalar curvature Ricci tensor and Christoffel symbols in Mathematica?

I am seeking a convenient and effective way to calculate such geometric quantities. I've used packages like TensoriaCalc, but they don't work at all time. ...
3
votes
2answers
205 views

What does MinimalPolynomial do?

suppose $x^5-x-1=0$, $y^7-y-1=0$ and $z=x+y$. I want to find a minimal polynomial expression of $z$, such that $p(z)=0$, and the code can be written like this: ...
33
votes
7answers
6k views

How can I draw the Olympic rings with Mathematica?

How can I draw the 5 interlocking Olympic rings with Mathematica? (SVG version) Edit Hard choice, but some pretty cool answers here. I didn't have 3D answers in mind when I posted the question ...
2
votes
2answers
272 views

Creating a “Live” Index Notebook --to load other Notebooks

I am new here, so let me know if this question is inappropriate. I've been stuck for many hours on this puzzle. I know it should be easy, but for me...? I want to create a Notebook (call it "Index ...
8
votes
2answers
291 views

Restrict Sensitivity of Locators in LocatorPane

We can restrict the movement of locators in a LocatorPane as follows: In the following example, the first locator's movement is confined to the x-axis and the ...
6
votes
3answers
2k views

Finding the linear regression of data and plotting it

This is for a physics report that I have to hand in. I have a list of two-dimensional data points that approximately form a linear line. I want to: calculate the best linear fit. put both data ...
3
votes
2answers
277 views

Problems with DumpSave and memoization

I defined a function that takes some time to compute using memoization: y[a_, b_, c_] := y[a, b, c] = First[$y /. NDSolve[.........] so that if I call y[a,b,c] ...
10
votes
2answers
2k views

Pass function or formula as function parameter

I can write either Integrate[x^2, {x,0,3}] or f[x_] = x^2 Integrate[f[x],{x,0,3}] and get the same computation. Suppose I ...
3
votes
2answers
141 views

Is there a quick way to find a built-in function by name search?

Is there a quick way to search all built-in Mathematica functions by name? Say I want to find all functions whose name contains "Graph", such as GraphPlot, NeighborhoodGraph, Subgraph, and so forth. ...
1
vote
1answer
438 views

I ran into an error when I was trying to solve a PDE with a piecewise initial condition by NDSolve

This is a very simple one-dimensional heat-conduct equation, the only special part of it is the piecewise initial condition: ...
11
votes
1answer
194 views

How does bandwidth selection work for low-variance dimensions with KernelMixtureDistribution?

I am puzzled because this toy example (in Mathematica 8) ...
6
votes
1answer
482 views

Celebration: How to golf a marriage with a prefix free code

We all know a conspicuous member of our community got hitched recently. As most of us are not in Malta, and weren't able to fly there, I thought of a celebration question. Sort of. The challenge is ...
2
votes
1answer
339 views

non-linear trend reduction using thresholds

Doing some mappings of the earth magnetic field results in the left-hand figure below (which consists of 181 profiles): To improve this I tried a non-linear trend reduction using, for example, ...
12
votes
4answers
9k views

How can I plot the direction field for a differential equation?

I'd like to plot the graph of the direction field for a differential equation, to get a feel for it. I'm a novice, right now, when it comes to plotting in Mathematica, so I'm hoping that someone can ...
8
votes
2answers
724 views

Speed up Mathematica code involving Convolve

I'm trying to plot the averaged autocorrelation function of a random wire profile $\xi(x)$ which is build from unitsteps which are each L units long. To calculate the average I'm generating nMax ...
5
votes
1answer
229 views

Incompleteness of FindInstance

I've been playing around with Resolve and FindInstance. I know that Resolve should always ...
5
votes
2answers
2k views

Making mathematical animations with Mathematica

I recently stumbled upon the Cycloid and was working on finding its length and such when I found this animation on Wikipedia. Strikingly pretty and small in size too (66KB) So on searching how he ...
10
votes
1answer
993 views

What is the difference between Set and SetDelayed?

I have a problem with defining a function and most of time I get confused by Set or = and ...
0
votes
1answer
81 views

Need help to finish this prime signature function?

I'm trying to create a prime signature for line segments. ...
1
vote
1answer
215 views

Version differences in Parallelize

I am having a problem which I guess is due to version difference. I have to generate a list of unitary matrices, which I can do easily. However I came to know about ...
3
votes
1answer
266 views

Exporting lists to files

I am trying to write a program which will generate a list of objects and then exports it in a separate file and clears its memory. As an example I tried the following ...
5
votes
2answers
2k views

Creating Optimal “Smoothed” Contour-Type Plots (X,Y,Z) Using Mathematica 8.04

Update: data here Here is a contour plot produced in the SAS program: In this plot, variable 23405 forms the X axis, variable 20201 forms the Y axis, and outcome variable 50502 forms a pseudo Z ...
6
votes
2answers
410 views

Monochrome PNG (and GIF) Export

Is there a way to Export expressions to a monochrome PNG? I have tried the ColorQuantize function which is mentioned in ...
0
votes
1answer
151 views

How to enable-dynamics on CDF's on web?

Went through the wizard to export cdf /w embed code: The positions and sizing are correct, but there's no interactive side to it: data I'm using: ...
8
votes
1answer
265 views

BubbleChart Text Tooltip's

Is it possible to display "name" in the tooltip? It won't chart the full dataset, so I can't make a custom labeling function that takes it in. ...
2
votes
1answer
429 views

Why is slider not working properly in Manipulate?

This script is an abstraction from a script intended to plot errors in guiding a small telescope that is tracking a guide star. The data loosely imitate the kind of data one might get from the program ...
4
votes
5answers
1k views

Dealing with Empty Brackets in a List

I have a large list with varying constituent parts. Some of these are like this: i.e. graphlist[[34]] ...
6
votes
0answers
471 views

Optimizing NIntegrate for higher PrecisionGoal

By default, NIntegrate works with MachinePrecision and its PrecisionGoal is set to ...
6
votes
2answers
559 views

Evaluating an If condition to yield True/False

I would like to decide whether an option passed to my custom function has the value Automatic or something else. This is my attempt: ...
5
votes
2answers
544 views

Finding concave hull for separated small clusters

Data : data3D = Import[file, "VertexData"]; Graphics3D[Point[data3D]] How to find concave polygon for separated small clusters.
12
votes
2answers
975 views

Image Processing: Isolating areas of an image with internal irregularity

I am trying to isolate each of the blue painted fingernails in the image. However, I am not sure what approach should be considered due to the white design on each nail interrupting the otherwise ...
9
votes
2answers
2k views

Two x-axis with different units connected by function using CustomTicks

I am trying to make a plot of some photoluminescence data, where wavelength is on the x-axis, and intensity is on the y-axis. Also, I would like to have the graph boxed, with the upper x-axis having ...
7
votes
1answer
203 views

Built in way to de-list singletons?

Is there a built in method to de-list singleton expressions, like this rule-based solution: expr_ :> If[Length[expr] == 1, First@expr, expr] In data ...
8
votes
3answers
467 views

Find subexpression to minimize leafcount after replacment with temporary variable

Given an expression expr, is there an automated way to find a subexpression subexpr such that replacing ...
5
votes
3answers
519 views

Multidimensional array reduction through summation over one of its dimensions

1. Introduction I am using an array of dimension 3 (might become more) to store some values. I would like to implement a function that takes as argument the array and a couple of numbers smaller than ...
3
votes
1answer
318 views

parameter optimization

Does anybody know of any tutorial material that explains how to use Mathematica to fit parameter values used in a set of ordinary differential equations to experimental values stored in a comma ...
0
votes
1answer
280 views

SetDirectory - predefined directory possible? [duplicate]

Possible Duplicate: Relative paths for portable notebooks in Mathematica I have a deep subdirectory structure, and the calculations should always be done in one of the deepest ...
5
votes
2answers
363 views

Variable Boundaries on ParametricPlot3D

Is there any way to plot correctly using the ParametricPlot3D command with one of variable's boundaries defined in function of the other ? In the example given ...
2
votes
1answer
1k views

Methods to speed up numerical NDSolve, NIntegrate,

I am not very used to do numerical simulations on Mathematica. Do you have any ideas how to improve i.e. speed up my code? ...
3
votes
1answer
169 views

Right aligning a button in a dialog

What is the best way to right align a button in a dialog window, regardless of the window's WindowSize? Here is a resizable window to test on: ...
5
votes
3answers
342 views

How to preserve clipping when exporting a framed histogram with font embedding?

I work with histograms and would like to export it to EPS format. I've noticed that my exported image loses the PlotRangeClipping option that I set up when I export the plot. This is true for at least ...
22
votes
2answers
547 views

Saving my code before cell evaluations: Insurance against front end hanging

I guess my programming working style is not unique. I develop programs one cell at a time, and when I have some confidence about what I did, I put all my mess together refining the code, building up ...
10
votes
1answer
325 views

Possible to import Excel formatted text?

Is it possible to import Excel text markup such as underlines? For example: Yet ...
4
votes
0answers
83 views

Mathlink and Parallelization [duplicate]

Possible Duplicate: How to run mathlink external commands in parallel? Abstract I have a binary file compiled to work with MathLink. I can install the file and run the component functions ...
11
votes
2answers
1k views

Finding a Concave Hull

I have a 3d clustered data: Is there any other way to get concavehull of 3D data points?
3
votes
0answers
91 views

AbsoluteOptions of a Histogram with PlotRange [duplicate]

Possible Duplicate: Mathematica: Retrieving PlotRange from Histogram I would like to evaluate the AbsoluteOptions of one of my ...
22
votes
4answers
918 views

Create colour with given lightness value

How can I create a colour of my chosen hue with a given fixed lightness level? For example, how can I create a reddish colour, col, so that ...
27
votes
2answers
2k views

Efficient Langevin Equation Solver

This question is not about good algorithms for solving stochastic differential equations. It is about how to implement simple codes in Mathematica efficiently exploiting Mathematica's programming ...
7
votes
4answers
316 views

Can I stop edges in graphs from drawing on top of the vertices?

Consider the following testadj = RandomVariate[BernoulliDistribution[0.15], {50, 50}]; AdjacencyGraph[testadj, VertexSize -> Large] The nodes are almost ...
4
votes
3answers
282 views

Exporting a rasterized Row of Graphics

I'm running some code based on @R.M.'s answer to this question to create a couple plots side by side. I want to export the plots rasterized to a png. However, when I ...

15 30 50 per page