# All Questions

211 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: ...
931 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 ...
259 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 ...
204 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 ...
597 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 ...
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 ...
348 views

### Mathematica style guide?

I encountered this site today https://code.google.com/p/google-styleguide/ regarding the programming style in some languages. What would be best programming practices in Mathematica, for small and ...
148 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 ...
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 ...
425 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 ...
1k views

### No warning when extrapolating with Plot

One of the most annoying "features" of Mathematica is that the Plot family does extrapolation on InterpolatingFunctions without ...
1k views

### Mathematica 10 Notebook Fonts Look Bad

Bug introduced in 10.0.0 and persisting through 10.0.2 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 ...
8k views

### How to find the phase difference of two sampled sine waves?

I'm trying to measure a phase difference between two Sine functions I've acquired with a computer. I'm uploading one of the .txt files with the data I'm working with here: txt file. To remove the ...
497 views

### How to write beveled fractions?

How to write beveled fractions like ${}^a/_b$? In contrast to $\frac{a}{b}$ and $a/b$ (see this question).
2k views

### Will Mathematica install and run on Raspberry Pi computer?

My club is considering buying a Raspberry Pi computer for tinkering. Can Mathematica be installed on and ran from it?
366 views

### What is the equivalent of a prototypical Manipulate in lower level functions?

Background: In the Mathematica tutorial 'Dynamic Interactivity' I read that there is a way of developing GUIs in Mathematica that do not use Manipulate. I want to ...
1k views

### Formatting a fraction as a mixed number

Is there a command that will take a rational number and rewrite it in a mixed-number-like form? That is, I'd like to apply a command to something like 10/7 and get ...
903 views

### How to efficiently import videos

I need to do frame-by-frame analysis of videos. I can import the video files I need, but each file is too large to import at once. I can use the ...
2k views

### How to demodulate an FM signal in continuous-time?

I'm not sure if this is a math or Mathematica question, but I'm posting it here because I'm interested in possible Mathematica tools/functions to solve the problem. I'm stuck. I want to simulate ...
2k views

### Parallelization problem in LinearSolve and Minimize

My CPU has got 8 cores (it is Intel Core i7-2600 3.40 GHz). When I try to solve a linear matrix equation using LinearSolve for large matrices, Mathematica just uses 4 cores to solve the problem (CPU ...
387 views

### Visualization: elliptical insights into data sets…

I was recently reading the following paper on visualization techniques using ellipses to gain statistical insights. Elliptical visualization for looking at correlations has briefly been touched on ...
2k views

### List of Parallelize[]-able functions

The question is clear and is inspired by this question and the first comment on this question. Although there are many tricks for parallelizing things that are not ...
4k views

### How to install packages?

This is always a problem when I distribute my packages to colleagues working on different platforms. I have my packages installed into a private directory and I autoload some of them when Mathematica ...
651 views

### How can I speed up the classic GA for graph coloring?

I'm trying to compute the chromatic number of this graph (which is 28): g = Import@"http://www.info.univ-angers.fr/pub/porumbel/graphs/dsjc250.5.col"; My genetic ...
456 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 ...
1k views

### Mathematica color schemes for the colorblind

Does Mathematica have a graphics option that makes plots intelligible for people with colorblindness?
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 ...
676 views

### 2D Visualization of links and knots

I am trying to draw a picture using Mathematica of three loops linking together in 3D as follows. ...
168 views

### How to find out what files are touched when Get is called?

Is there a way to capture all package files touched whenever a package is called via Get, Needs, ...
839 views

### How to map an image to get an illusion of 3D

I would like to distort or map a given jpg so it looks 3D when viewed from certain angle, as in the following youtube video: http://www.youtube.com/watch?v=IfCCUd8mFtg. The most interesting part of ...
210 views

### Creating documentation for sub-packages in Workbench

I'd like to create proper documentation for a package of mine, and Workbench in principle provides the tools to do this. However, I've split my package into multiple sub-packages (because I found it ...
598 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 ...
313 views

### Using Boost with CreateLibrary

I was looking at the answer of Leonid of Faster alternatives for DayOfWeek and wanted to see how hard it would be to do something similar in C++ using an external library like Boost. I tried to ...
294 views

### Is it possible to cause a notebook to be hidden when pressing the close button?

Is it possible to cause a notebook to be hidden (Visible -> False) instead of closing it when pressing the close button in the title bar? The ...
467 views

### Intersecting parabolas in an image

I have a friend who is a math teacher (like me) and while out cycling took this picture. The idea would be to create the equations of the quadratics that model the bridges and super-impose them on ...
365 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), ...
804 views

### What compilers are “suitable” for CompilationTarget->“C”?

The documentation for CompilationTarget says, "if you do not have a suitable C compiler then you will not be able to set CompilationTarget to C". Well at this time, I don't have a compiler installed ...
1k views

### How to determine how much of a table is generated?

If I'm generating a table from a slow function, like this: foo = Table[SuperSlowExpression, {1000}] is there a way to determine after submission (so it is too ...
204 views

### Graph smoothing keeping vertices fixed?

Context Given a Graph like this one: ...
255 views

### Making a Mathematica package manager?

I'd like to get a serious discussion started about a package manager. This has come up elsewhere, and many people have implemented their own solutions. It would be nice to have a standardized way to ...
150 views

### GraphicsMeshFindIntersections[ ] fails to detect intersections

GraphicsMesh`FindIntersections[ ] is an undocumented function for, well, detecting intersections very efficiently. Take a look: ...
375 views

### Dynamic visualization of Graph[] on a webpage

How can we embed a dynamic version of a Graph object on a web page, similar to the one showcased on the networkx home page? This sort of dynamic visualization can ...
543 views

### Finding the perimeter, area and number of sides of a Voronoi cell

Does anyone have any suggestions how to determine the perimeter, area and number of sides of each Voronoi cell in Voronoi diagram?
202 views

### Temporal database reconstruction in mathematica

<EDIT> after some internet research I found the database domain that deals with this kind of thing: Temporal Databases. I think my question therefore becomes how to reconstruct a temporal ...
288 views

### How can I extract the outline of bubbles in my image?

I have an image: I tried to extract the outline of the bubbles, but I met with some problems. Firstly I tried the method used in Mathematica documentation for ...
434 views

### Exporting data extensions in fits file

Context In Astronomy the de facto standard for images and data is FITS. I would like to export heterogenous data sets into a single fits file. Attempt I am ...

15 30 50 per page