20
votes
4answers
652 views

How can I get the color of overlapping disks to be equal in any order?

When Graphics is used, necessarily the objects come in order. This affects which ones obscure others. When Opacity is not 1, it also affects the color. I would like the color of overlaps to depend ...
20
votes
15answers
1k views

How do I extract the middle element(s) of a given list?

How do I extract the middle element(s) of a given list? Here is some code that works, but seems a little too long: ...
20
votes
1answer
588 views

Can Enterprise Edition really encrypt code for distribution via CDF?

The Wolfram blog post: Using Mathematica Enterprise Edition to Create Professional Apps, Tools, and Reports makes the following statement (emphasis mine): Enterprise Edition allows you to create ...
20
votes
2answers
807 views

Efficient Generation of Random Variates from a Copula Distribution

I have a 7-asset portfolio for which I want to simulate daily log-deltas using a Student T copula. The marginal distributions are all either Stable or TsallisQGaussian. Using NMaximize, I have ...
20
votes
2answers
642 views

How to get shadows in Graphics3D?

It was a shock to me when I found that in Graphics3D a surface is always transparent to the light sources: ...
18
votes
1answer
1k views

Faster way to compute the distance from a point to a surface in 3D

I am trying to compute the shortest distance between a point and a triangle in 3D ...
18
votes
1answer
383 views

Unexpected behavior of confidence bands for data presenting two regions with uneven noise

Let's generate some noisy data with uneven noise. ...
18
votes
1answer
779 views

Peirce's quincuncial projection

The Peirce quincuncial projection is the cartographic projection of a sphere onto a square. In short, I would like to see it implemented in Mathematica. Here is my code: ...
18
votes
3answers
1k views

Using Inset[..] to overlay a Graphics3D with its raster version

Preamble First let me explain the why. You can skip this and go directly to the question if want to answer it right away. We had more than one discussion about how to produce nice looking 3d plots ...
17
votes
5answers
6k views

How to find the domain and range of a function with Mathematica?

I'm studying calculus and in some exercises I am asked to find the domain and range of a function. Does Mathematica have already a built-in function for this? I can imagine some ways of doing so, ...
15
votes
4answers
1k views

Plotting data points: Optimizing size and visuals

The following problem is one that may have showed up to you while plotting a large data collection. Suppose you have a data set of say 1 million points. ...
15
votes
1answer
2k views

2D Heat equation: inconsistent boundary and initial conditions

I'm attempting to use NDSolve on a 2D boundary value problem with initial conditions. Upon running my code, I get the following message: "NDSolve::ibcinc: Warning: Boundary and initial conditions are ...
14
votes
1answer
545 views

Efficient code for tallying entries in very large lists

I am dealing with data sets containing tens of millions of (hashable) entries and simply using the Tally function to count the frequency of each unique list element ...
13
votes
3answers
1k views

Can Mathematica's random number generation be improved?

Performance on Random Number generation is intolerable. Whenever you need many deviates from the same distribution but with different parameters it takes forever. Here is a thread on Poisson ...
13
votes
1answer
625 views

Image Processing: Edge detection of the tumor on tomogram. Сalculation area of the tumor

The task is to identify the image region of the tumor. I try to use example from documentation centre: ...
12
votes
2answers
3k views

FindRoot Domain restriction

I am solving a system of four non-linear equations in four variables using FindRoot. I have some sense of the relationship between the variables so I don't want Mathematica to do its computations in ...
11
votes
3answers
454 views

Visualizing directories

How do I plot the content of a directory and all its subdirectories into infinity using TreeForm? I've tried using a mix of ...
10
votes
0answers
1k views

How to visualize Riemann surfaces?

In WolframAlpha we can easily visualize Riemann surfaces of arbitrary functions, can we plot the Riemann surface of an arbitrary function using Mathematica and ...
7
votes
2answers
1k views

Measuring execution time of code

How one can measure the execution time (time that is spent for code to finish) of a program in Mathematica? I understand that there are general timing functions (Timing, AbsoluteTiming, TimeUsed, ...
7
votes
4answers
1k views

3D Random Walk with Periodic Boundary Conditions

I am working on a 3D random walk with periodic boundary conditions and have written a program that will do this for me but it is extremely slow. Does anyone have any suggestions on how I could speed ...
7
votes
1answer
193 views

How can I have interruptible computations inside a manipulate?

Here's a perfect example of my problem: Manipulate[Pause[n], {n, {1, 10}, ContinuousAction -> False}, SynchronousUpdating -> False] It is illustrated by ...
28
votes
1answer
432 views

Do Mathematica notebooks include personal metadata?

I am about to send a Mathematica notebook to someone and I would like to make sure it does not contain any information that could personally identify me. I would also like to produce pdf files from ...
27
votes
2answers
637 views

Counting radial ridges on an image

After happily using the v9 image assistant to crop elliptically an image, and then the drawing tools to put a white disk in the middle, I turned this image: into the following one: that can be ...
24
votes
3answers
1k views

How to find the center of a circular pattern?

I am writing an algorithm that finds the center of 500 x 500 pixels images coming from a live feed from a camera at 50 Hz. So it has to be quick! The images are images of an optical field which looks ...
22
votes
7answers
669 views

Alternative ways to implement a triangular recursion

Triangular recursions are a class of algorithms that frequently turn up in computational mathematics. These recursions are expressible in the general form ...
20
votes
1answer
337 views

How can I see which transformations Simplify attempts?

The documentation for Simplify[expr] says that it performs a sequence of algebraic and other transformations on expr, and returns the simplest form it finds. How can I see which transformations it ...
20
votes
4answers
787 views

How to partition a disk into individually spaced bricks?

What I want to do is in any way produce a picture that looks like this Given a set of words, how can I partition a disk into bricks for these words, such that it looks good? Here is my sucky ...
19
votes
4answers
2k views

How many Christmas gifts?

This question is based on the old song, The Twelve Days of Christmas In a comment made on a recent question, Yves Klett remarked, "no seasonal questions this year?" This reminded me of one I solved ...
19
votes
3answers
5k views

What are the advantages of using .nb rather than .m files?

I can edit a notebook within the mathematica front end and then Save As a .m file, which produces output like this: ...
19
votes
1answer
1k views

The Orbit and Perigee of the Flamsteed comet

Historical context This year we have the 330-th anniversary of the Battle of Vienna - one of the great formative events of European history, it took place on September 12, 1683. Kara Mustafa, Grand ...
19
votes
0answers
727 views

How would I improve this Karaoke machine code?

I was looking at a large collection of Import/Export user suggestions the other day and it dawned on me that we finally have MIDI import in Mathematica 9, which is rather interesting since MIDI ...
19
votes
3answers
1k views

Removing In/Out Labels before printing

I know that I can close a notebook and open it again in order to remove the In/Out labels. What I would like to know is if there is another easy way of removing these labels without having to close ...
18
votes
1answer
1k views

Rotating perspective of an image in the z axis

A purely recreational question, but one I hoped the community would find interesting enough to suggest a way to approach it. Let me preface this question with the admission that I have done nothing ...
18
votes
1answer
514 views

NotebookFind and String Pattern Expressions

Is there a way that NotebookFind can be used to match string pattern expressions rather than just strings? The documentation for ...
16
votes
6answers
896 views

How to understand the usage of Inner and Outer figuratively?

Description: In Mathematica the functions like Thread, Inner, Outer etc. are very important ...
16
votes
4answers
789 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 ...
15
votes
3answers
368 views

Applying different functions to different columns of a Dataset

Suppose I have different functions: Total, Mean and Max and the following ...
15
votes
0answers
604 views

Nonlinear least squares on a GPU with Mathematica 9

Update: A Mathematica wrapper for (https://github.com/zitmen/cuLM) should allow for us to directly implement the Levenberg-Marquardt algorithm in CUDA for nonlinear least squares fitting. In a ...
14
votes
1answer
357 views

Is it possible to insert new colour schemes into ColorData?

Because of the standards in my field, for many plots I need to use (or at least end up using) rather narrowly defined colour schemes, and in particular the Matlab "Jet" scheme, which is well described ...
14
votes
2answers
842 views

How to make a parallel auto-generated .m package from Initialization cells?

according to the documentation at ref/InitializationCell, When you first save a notebook that contains initialization cells, you have the option to make a ...
14
votes
3answers
1k views

WYSIWYG table creating and editing

In Microsoft Office OneNote 2010, creating and editing tables is easy. There are simple toolbar controls for creating tables: , and editing them once they exist: . My question is, what's an easy ...
13
votes
1answer
321 views

Combining BarChart and Grid - IPCC style

I would like to combine a plot with a table. Something like this famous plot/table from IPCC: So after reading Combining graphics & lists / tables I tried an approach using ...
13
votes
1answer
559 views

Block Matrix Algebra with Mathematica

I have come up with some BlockMatrix Algebra for Mathematica to make notations easier. I have the following: ...
13
votes
2answers
2k views

How to convert an image to a graph and get the positions of the edges?

I am trying to convert an image to a graph. My image is already skeletonized and looks pretty much like this: What I need to do is identify all vertices and edges, and in particular get a list of ...
13
votes
1answer
505 views

How to guarantee that NDSolve correctly detects abrupt changes in parameters?

When using NDSolve, I often have parameters that, in most of their domain, have a constant or null variation, but that suffer from abrupt variations on a very small ...
12
votes
1answer
463 views

Microsoft SQL DatabaseLink connection using Windows Authentication

For those who use Mathematica with databases in companies, a common way to securely connect to those is using Windows Authentication (detailed here). Mathematica doesn't seem to support this ...
12
votes
3answers
3k views

Excel Headers --> Mathematica

I have a large Excel .xls file. Miniature version shown below: (formatting should appear as two columns...) ...
12
votes
1answer
1k views

Reference request for neural network programming in Mathematica

I'm looking for a good reference/book on programming neural networks in mathematica. I've been working through Freeman's "Simulating Neural Networks with Mathematica," but it is from 1994 so is quite ...
11
votes
2answers
327 views

Modify existing color scheme

I am using the "TemperatureMap" color scheme for image processing. How can I set the lowest color value to Black? Generally ...
11
votes
2answers
191 views

How do I override options with my own defaults?

I'm calling a function f from within a function g and would like to pass any valid options for ...

15 30 50 per page