All Questions

196 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 ...
469 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 ...
2k views

Mathematica 10 Notebook Fonts Look Bad

Bug introduced in 10.0.0 and persisting through 10.1.0 or later I've upgraded my home installation of Mathematica from version 9 to 10 today on a Windows 8.1 machine, and I'm getting a weird font ...
309 views

Random polyhedra walk

I would like to recreate ssch's random polyhedra random walk, which he posted in the chat. For convenience here it is again: Since it's been one and a half year since then I've certainly had time ...
651 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 ...
2k 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 ...
758 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 ...
354 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 ...
2k views

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 ...
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: ...
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 ...
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 ...
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 ...
521 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 ...
657 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 ...
390 views

Applying different functions to different columns of a Dataset

Suppose I have different functions: Total, Mean and Max and the following ...
565 views

Paste data into Mathematica with formatting

Select the following Mathematica code and paste it into a notebook. In Windows 7(Mathematica 8) the line breaks are not interpreted in the expression. In fact any data copipasted from stackexchange ...
864 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 ...
2k views

Edit a Mathematica plot in Illustrator, missing font problem

I export my Mathematica generated plot as an eps and then open it in Adobe Illustrator to make a few changes. When I try to do this I get this error message: Times-Roman: Font not found on ...
489 views

How can I trace a functional expression's evaluation visually?

Ok, so the goal is to visualize the execution of this expression foo /@ {3 + 1, bar /@ {1 + 2, {4 + 7}}} in the following fashion using nested rectangles with ...
894 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 ...
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 ...
274 views

What are SparseArray Properties? How and when should they be used?

A strange undocumented form of SparseArray is increasingly used in answers on this site: ...
764 views

How to sort digits in a string while keeping other characters untouched?

Now there is a string with digits and letters, for instance, "95uge678r3gi89hgfe30kgh063d51". And the expected output is ...
325 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 ...
612 views

Block Matrix Algebra with Mathematica

I have come up with some BlockMatrix Algebra for Mathematica to make notations easier. I have the following: ...
630 views

Poor results with ImageLines function

I'm trying to get my mind wrapped around Mathematica's image feature recognition functions. I'm intrigued by the ImageLines function for a couple future ideas I ...
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 ...
518 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 ...
391 views

how to make cursor jump automatically to next input cell after evaluating previous one?

When making separate cells in order to make separate computations to better see the result of each one before going to the next cell to do the next computation (which is a good way of doing things), ...
487 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 ...
3k views

I have a large Excel .xls file. Miniature version shown below: (formatting should appear as two columns...) ...
631 views

Determine frequency of oscillations

I am wondering how I could determine the frequency of oscillations of a differential model equation? How could I find the frequency from this example given in Mathematica Documentation: ...
953 views

Enlarge an image and increase its resolution

An ongoing purely recreational project. I got my introduction to image processing with this Rotating perspective... question and had a lot of fun with it. Now I want to take it to the next step. ...
238 views

How to use C language functions in Mathematica? [duplicate]

I'm trying to find out the way to use c-functions in Mathematica (I'm using 14 version) on OS X 10.10. For example I've got this lines of code: ...
712 views

How to position text labels automatically to not overlap other graphics elements?

I was plotting reciprocal frame projection using Locators for a point to be expressed in terms of both the original basis (also specified with ...
982 views

Mathematica code for hidden Markov models (HMM)

I am looking for some simple Mathematica code to model an HMM with just a few states and an equal number of observable signals (emissions). I am hoping to generate sample paths and keep track of the ...
649 views

How to copy code out of notebook to an external text editor without extra line feeds being added?

I am simply trying to copy code from a cell (input cell) in a notebook, to paste the code into a plain text editor, and not have some lines wrap in the middle. I need to copy the code, as is, to a ...
267 views

Avoiding MainEvaluate in a CompiledFunction to fetch global variables

I'm trying to write a simulation using Mathematica 8.0. Since I will most likely be doing the same operation over and over again, I'm trying to Compile whatever I ...
206 views

How can I make Which format its output?

Functions like Piecewise have cool, easy-to-read formatting. In the same vein, I think it would be wonderful if the Which ...
174 views

How to use RunProcess to import external function?

I have a functions written in an external language called GO. How can I quickly load them into the kernel for use as Mathematica functions? The two ways I've tried are with MathLink and LibraryLink ...
1k views

Rebinding keys to define new keyboard shortcuts

I've checked Mathematica → Preferences, and poked around the options on the toolbar. However, I don't see a way to define new keyboard shortcuts in Mathematica. I've used VIM for 10+ years, and I've ...
219 views

How can I add arbitrary code into DefaultKeyTranslations.tr?

The solution to this question on how to get latex code for a text cell (which Mathematica doesn't do correctly) was formulated as a palette but I need it as a keyboard shortcut. How can I add an ...
448 views

Detecting double click events

Is there a way to detect double click events? I did not find anything on the doc page of EventHandler. Use case: I want to re-implement the ...
2k views

Spiral pattern and Fibonacci numbers

I'm want to generate a 2D spiral pattern like the the one shown in the following figure. I can generate the spirals one by one, but I think there ought to be a more efficient method for generating ...
1k views

How do you draw credible regions/intervals on a 2D PDF?

I have some numerical data from which I generate a PDF via: pdf = HistogramDistribution[data]; Which can then be easily visualised thus: ...
2k views

Doing a chi-square independence test in Mathematica

I have a matrix consisting of the following data: Needs["HypothesisTesting`"] data = {{11, 206}, {32, 1374}} How would I make a chi-square independence test ...
9k views

Plot legend inside a Show [duplicate]

Possible Duplicate: Using PlotLegends with Show messes up the graphics I have created a composite plot function: I want to add a legend to it, but ...