# All Questions

521 views

### Using Goto and Label in compiled function?

Below I post some rudimentary code to show that there is something wrong using Goto and Label commands in compiled functions (or I believe there is something wrong). It seems that the command Label is ...
303 views

### Unexpected behavior from VectorPlot

I am surprised at the behavior of VectorPlot in the following sense: plotting a vector field and examining the output at a point $(x_0,y_0)$ reveals that Mathematica doesn't draw the tail of the arrow ...
317 views

### What is an efficient way of selecting multiple colors via Manipulate?

Background: The following snippet is what I (intend to) use in a Manipulate form where up to 12 different colors can be selected: ...
182 views

### Solve[ ] with Method -> Reduce gives a different result than Reduce[ ]

Why does Solve[Sqrt[x + Sqrt[x]] - Sqrt[x - Sqrt[x]] == m Sqrt[x/(x + Sqrt[x])], x, Reals, Method -> Reduce] give a different result than ...
464 views

### Phase portrait on a cylinder

It is very nice and very easy to make a sketch of a phase portrait with StreamPlot. For example, for the classical pendulum, defined by $$\dot x=y,\\ \dot y=-\sin x,$$ The code ...
183 views

### Unwanted PlotMarkers appear at non-existent places

In this simple code ...
190 views

### How to collect expressions from cells created by Print?

I have a notebook where evaluation of a certain cell produced hundreds of adjacent output cells using Print. I need to create a list containing all expressions from ...
650 views

### List comprehension in Mathematica

Python supports a concept called "list comprehensions". Following is sample example ...
233 views

I don't want to necessarily put my packages in Mathematica's $UserBaseDirectory, which is on my local hard drive. Can I somehow tell Mathematica to look for ... 1answer 188 views ### How to find longest monotonic sequence? I have a list, for example list = {2, 1, 3, 5, 4, 6} How to find longest ascending sequence of this list? There are two meanings of this question: Find the ... 1answer 432 views ### RLink and R v3.0.1? Running InstallR["RHomeLocation" -> "C:\\Program Files\\R\\R-3.0.1"] results in a popup box titled "Version Mismatch" saying Error: R.DLL version does ... 1answer 277 views ### Overloading second argument of CountryData For convenience I'm trying to add an extra property to CountryData ... 4answers 651 views ### Second level depth pure function? I have the following working construction: Select[ln125, # == Nearest[ln125, 551.748][[1]] &] Here, ln125 is a one ... 5answers 257 views ### Construct an infix operation from a list Inspired by this question, if I have a list {a, p, b, q, c} where p and q are binary ... 3answers 904 views ### Derivatives (divergence, gradient, curl) of interpolated 3D data How can I calculate a vector derivative (i.e. divergence, gradient, curl) of interpolated data? For sample data, you can use: ... 3answers 174 views ### Emulating Sequence with my own function I just considered if/how one could implement Sequence in Mathematica if it were not predefined. It turned out that the following simple definition has in all my ... 2answers 597 views ### Google Code Jam: Mountain View code review After participating in Google Code Jam 2012 Round 2, it occurred to me that the Mountain View problem boiled down to solving a set of linear inequalities, which could be done in Mathematica. I've only ... 7answers 326 views ### Question about evaluation control I want to make a function that takes a function as a parameter and prints an integral with the function inside. I've tried this: ... 1answer 1k views ### How to export transparent raster plots? Is there an easy way to get transparent plots that work with Save Graphic As using a compatible file format such as GIF or PNG? I tried ... 3answers 257 views ### Numbers in alternate bases transcend the evaluator? It looks to me like a number in a base other than base 10 gets evaluated before the evaluator ever gets a chance to be tweaked. For example, FullForm[16^^abcdef] ... 4answers 712 views ### How do I get rid of the overlap of gridlines and tick mark labels? I wish to include the plot generated by the following Mathematica code ... 3answers 2k views ### Poor rendering of fractals Could someone explain why I get those ugly graphics .. ..trying to use fractals in mathematica 8 ? I'd also like to know if it is possible to draw 2D fractals in Mathematica My configuration ... 2answers 174 views ### How to restore function attributes to default Adding an attribute to a function is easy and clearing attribute is easy also. But I don't know really how to restore the attributes of a function to its defaults. All I do is quit the kernel or close ... 5answers 812 views ### The mysterious gap inside Grid There's this gap inside Grid which I cannot seem to remove. Perhaps someone knows how. ... 4answers 263 views ### No response to an infinite limit Trying to compute this limit, things seem to get frozen, even for hours. What would you recommend to fastly compute it? ... 1answer 460 views ### How do I place a texture on an irregular 3D model? I'm trying to reproduce a textured head in Mathematica, and I'm using a kind of 'net' of a head which contains all the features on the face. The texture looks like this: which is supposed to look ... 1answer 206 views ### Is there a method to enumerate the keys/values of SystemUtilitiesHashTable Lacking from the simple API of SystemUtilitiesHashTable is a method to enumerate the keys/values. ... 2answers 361 views ### How can I access the internal function that plots a molecule from a formatted XYZ file? Mathematica has the ability to plot a molecule using the data contained in an XYZ file. This is a simple text file, of which this is an example. The molecule is plotted using the Import command. ... 1answer 384 views ### How to make a volume CUDA rendering isometric? I just realized that the output of CUDAVolumetricRender[] uses (quite marked) perspective, which I do not want (for scientific data representation, it can be very ... 1answer 631 views ### NDSolve Differential Equation Error I am trying to solve the following differential equation- ... 1answer 202 views ### Unexpected result from Flatten Consider the following three evaluations involving Flatten: Flatten[f[f[f[x, y], 1, 2], f[x, y]], Infinity, f] f[x, y, 1, ... 1answer 191 views ### Why do DateList, DateString, and AstronomicalData ignore$TimeZone?

My reading of the documentation for DateList and DateString lead me to believe that both functions use ...
781 views

### Implementing CGS unit system in Mathematica 9

So I've just installed the trial version of Mathematica 9. The first noticeable feature for me is the new built-in physical units. I used AutomaticUnits package ...
348 views

### Determining the default Method used in optimization and root-finding algorithms

Is it possible to extract the Method which is used in functions like NMinimize, FindRoot, ...
524 views

### Mathematica Plot: Inconsistency when plotting large values

I am working with a function in Mathematica and I am getting some inconsistencies when I plot it. As I really need to understand were this comes from I would appreciate any help. I am working with a ...
399 views

### Animation: presenting events that persist in time

I have a list of events that occurred on specific moments in time. In the example below, the three events occurred at 23:09, 23:13 and 23:17. I was able to build an animation that flows from time ...
1k views

363 views

### Count consecutive occurrences in a list above a certain value

I am trying to tally and sort the number of consecutive occurrences in a list above a certain value. For instance: ...
127 views

### What are the scoping rules for function parameters shadowing System` symbols?

Here are some very contrived code snippets, highly unlikely to appear in real code, but still I am curious why they behave like this: ...
391 views

### FindShortestTour for charity (or: How can I optimize meal delivery with FindShortestTour?)

I've been wondering about this for a while - but never got around to asking - until I saw faleichik's incredible answer to Mathematica Minecraft. I did some work at a not-for-profit a little while ...
### Determining whether two $k$-chromatic graphs are isomorphic (respecting vertex coloration)
Consider the case where I have two $k$-chromatic graphs $G_1$ and $G_2$, i.e. two graphs where individual vertices can be colored with one of a set of $k$ total colors, and I would like to determine ...