# All Questions

817 views

### Pattern to match a non-empty list of non-empty lists

Is there a pattern to match a list of lists, containing at least one list, with each list containing at least one element? In the Mathematica documentation it says that the pattern ...
267 views

### How to fix errors in Gram-Schmidt process when using random vectors?

I first make a function to get a random vector on unit sphere in a swath around the equator. That is what the parameter $\gamma$ controls; if $\gamma = 1/2$, the vectors can be chosen anywhere on the ...
346 views

### Why does ListPlot ignore some global options?

Why does the following plot no use the global PlotMarkers option? ...
374 views

### Parallelize evaluation of function with memoization

I have a complicated function that I need multiple times, so I want to memoize it and have the first evaluation done in parallel. Unlike in my example below it's not a continuous function, so ...
487 views

### Fit an image within a Rectangle [] in Graphics

Based on the following Code (yet the white text in the image is added with PPT), I would like to have an image fit within one of the rectangle. For Example the image from there : ...
418 views

### How to get rid of Panel margins?

I have a feeling that there is something wrong in general with Mathematica's way of dealing with margins and spaces among/around objects in Graphics, ...
470 views

### Toolbars in Mathematica

Mathematica seriously lacks some useful toolbars. I wonder why keeping a totally barebone gui is part of WRI's policy? Would such a feature be so platform-specific that it does not worth design it? I ...
420 views

### How to develop an Import/Export converter for Compress[]ed data?

Mathematica has a cross platform data exchange format, WDX. Unfortunately importing or exporting large data from/to WDX is very slow. Using MX files is very fast, but they are not compatible across ...
828 views

### Selectively Mapping over elements in a List

I am using the following code to easily generate a row of images of all eight planets of our Solar System: ...
325 views

### Generate Random Text within a Rectangle

I would like to generate images such as the four below. That is: some text of different length fit within a Rectangle[] using ...
715 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 ...
594 views

### Export Graphics[] without white edges

I am trying to generate & Export[] Image with the below code, but as shown in the images I get some white border around my rectangle. How could I export an images that stopes right at the edge of ...
697 views

### creating vectors with normal distribution of lengths

First consider vectors of unit length, say on the unit sphere. Now I want to give some magnitude to these vectors and I want the magnitude to be chosen from the normal distribution. In one dimension ...
280 views

### CUDA: setting grid dimensions

I'm new to CUDA, and CUDALink. I see how CUDAFunctionLoad allows one to set the block dimensions. On calling the function, you can also either pass as argument or have MMA automatically select the ...
711 views

### Good ways to organize and document collections of mathematica notebooks?

I've now been using Mathematica for about a year, and am starting to get a somewhat unwieldy collection of notebooks. Sometimes I've figured out how to do a particular task in one of them, and want ...
232 views

### Replace rule also matching complex numbers

I'm having the replace rule: rule = {-g_ x_^4 - 2 g_ x_^2 y_^2 - g_ y_^4 -> -g (x^2 + y^2)^2}; Now, ...
301 views

### Using variables in function names

I want to make a list of plots and my functions are named C1, C2... Cn. The command I wish ...
267 views

### Multiple colors in Graphics[] environment

There are other questions on the site that are similar to this one, but the answers provided didn't help me. I want to draw disks of different radii. Each radius is the absolute value of a variable, ...
914 views

### Manipulate with a variable number of sliders

I have a function that operates on a list of variable-length $n$. I would like to create a Manipulate[] that has $n$ sliders, one for each list element, each ...
453 views

### Creating randomly oriented planes

I would like to create randomly oriented planes. This is how I'm attempting to do that: I create a 2 random unit vectors, $\mathbf{v}_1$, and $\mathbf{v}_2$, in the $x$-$y$ plane I assume that if I ...
279 views

### Why is MainEvaluate being used when LinearSolve can be compiled?

According to this question LinearSolve can be Compiled. However, CompilePrint shows a MainEvaluate but no-warning is generated. It appears that LinearSolve is not ...
151 views

### Knowing when a notebook has changed programmatically

Is there any way I can programatically determine whether a notebook has unsaved edits? Is that asterisk on the right of the notebook name represented in a notebook option or something, like ...
806 views

A quick question, but which I don't believe has been asked here or at SO. Does Mathematica have a simple way to just download a file from the web? i.e. if I have a list of PDF links (~ 2,000), can I ...
429 views

### How to draw multiple coordinates on mathematica?

For example: How can I draw such kinds of coordinates? Thank you~
143 views

### RunScheduledTask didn't execute itself the first time, why?

I have a problem with RunScheduledTask (new in Mathematica 8). A task that I usually need to do is to set a cron to start at a specific time and repeat itself at the same time every day (or the same ...
1k views

### How to use a matrix variable for a compiled function

I want to compile the following function which takes a matrix variable. ...
809 views

### Discrete Convolution

Ask to compute the convolution of 2 lists, I managed to do so, with what I feel is rather heavy : Let my 2 lists be : a = {1,2,3,4} b = {1,1,1,1,1,1}; The below function adds 0s on each part of ...
637 views

### Expand modulus squared

Is it possible to make a function in Mathematica that expands expressions of the form $$|z + w|^2 = |z|^2 + 2\text{Re} \overline{z}w + |w|^2?$$ Preferably it should also be able to handle things ...
3k views

### Does Mathematica implement the fast Fourier transform?

Is there a fast Fourier transform in Mathematica? Although looking in the help I could not find one. I am looking to implement the equivalent of fft in MATLAB.
273 views

### Conditional T distribution

Suppose $(X,Y)$ has a bivariate t distribution. I want to plot the density of the conditional density of $Y$ given $X$, i.e. $Y|X$. I wonder why the following does not work: ...
219 views

In the ideas shared in my answer to this post Struct equivalent in Mathematica? at the end I propose a solution that changes the way Set works in a particular case that can be expressed in plain words ...
465 views

### MySQL Connection Problem

I have a problem with the configuration of the J-Connector plug-in with a MySQL database. Most of the time all works well, but sometimes the connection remains blocked for 2 hours and then it gives ...
268 views

### Silence debug output from Parallelize?

I have this script, which does a bunch of image aligning in parallel: https://gist.github.com/8848a25a15da013ed1ad However, on EVERY print, Mathematica also prints from what Kernel the message came ...
318 views

### Invisible \[Conjugate] glyph in the linux frontend

I have a very annoying problem. The Conjugate glyph (*) does not show when I type. That is, if I type \[Conjugate] or ⋮co⋮ then ...
525 views

### Can the position of Tooltips be changed?

Is it possible to change the position of tool tips, which currently always appear to the lower right of the mouse position. In the screen grab below the mouse is over 10000000 and the tooltip appears ...
149 views

### Generate a new output using Manipulate

Thanks to methods found in the below, I was able to assemble those elements : Tile image on specific location without space between them How to combine images with the same dimensions in a grid? ...
189 views

### NullSpace[_, Method->“OneStepRowReduction”] is sometimes wrong; how can I work out when this happens?

(This is on MMA 7.0.1.0 on OS X) I've just found a large matrix m for which NullSpace[m] and ...
159 views

### Cleaning up a List of HTML Data to Render Usable Information

I am using Mathematica to scrape information from webpages. To get file information, I am gathering plain text that is enclosed by <tr> and ...
794 views

### How to “Copy as Unicode” from a Notebook?

I spent some time manually editing a post replacing Mathematica ASCII \[Alpha] with Unicode α. I did this by laboriously ...
523 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

### Plotting piecewise function with distinct colors in each section

I have a piecewise function that I would like to plot but I was wondering if it is possible that each part of the function that is plotted when its corresponding condition is true be plotted with a ...
371 views

### Which Distributions can be Compiled using RandomVariate

Recently, Oleksandr kindly showed a list of Mathematica commands that can be compiled. RandomVariate was part of that list. However, whether this can be compiled depends upon the distribution that is ...
455 views

### Efficient image Import

I have several sets of 20 images I need to import. Each time they have different categories. "Name"<>"Cat"<>"No" Electric B 1 for example. I need to create lists that contain the images ...
455 views

### Built-in Mathematica data: are they cached? how to speed up the loading?

Mathematica has numerous built-in data for science and math. Every first call to a data function in a new Mathematica session will "re-initialize indices" (download the data). Is there a way to store ...
372 views

### Why these (error) messages?

Testing this answer I used: stream = OpenWrite["A:\\out.txt"]; Block[{\$Messages = stream}, Mod[1, 2, 3, 4, 5] ] and I was surprised to find that the contents ...
400 views

### Is it safe to launch/close kernels in the middle of a parallel calculation?

It appears that it is possible to launch additional kernels (or close existing ones) during a parallel calculation. The newly launched kernels will be utilized for the rest of the calculation. ...
262 views

### Making sure that Timing[] isn't thrown off by caching

In playing with and comparing the various answers to my question here, I tried applying Timing[] to see how fast things ran, but it seemed that some of the answers ...
132 views

### FE`symbols that remain in notebook internals even after removing them and SaveDefinitions->True issue

How does one clear the notebook from symbols that remain in it after an edit session?