# All Questions

206 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 ...
1k views

### Suppressing negative roots in Mathematica

Problem Using Mathematica's Solve operator can sometimes lead to an output involving a positive and negative root (say when solving for a variable such as ...
201 views

### How to specify PDE Boundary condition on Bspline?

Context I would like to solve a PDE on a boundary which is parametrized as a BSpline. I am trying to solve the force-free Grad-Shafranov equation on a ...
188 views

### Faster trimming of leading/trailing zeroes in rectangular array

Given a (large) rectangular array, e.g. (small for example case): ...
129 views

### Adding Trace produces error messages

This is very strange. As I was trying to debug this problem, I noticed when I add Trace then I get lots of internal errors generated. This also happens the first ...
204 views

### Bug in plotting function using FindMinimum?

Bug introduced in 10.0 and persisting through 10.2 or later While working on an answer to RegionPlot from NDSolve, I came across this strange behavior of ...
303 views

### What is the best way to flatten a linked list with lists as values?

By following the advice on this site I have ended up with a linked list like the following: acc = {{1, 2}, {{2, 3}, {{3, 4}, {{4, 5}, {{5, 6}, {}}}}}}; This was ...
600 views

### Annoying FrontEnd bugs in Mathematica 10

Recently I installed Mathematica 10 on Windows 8 x64 machine. Before that I had a prerelease version of Mathematica 10 installed on my laptop. I observed very annoying bugs in the FrontEnd on both ...
128 views

### Possible Bug in ProbitModelFit when used in a Dataset

Since upgrading to Mathematica 10 on Mac OSX I have come across a number of instances of this error, which occurs using Probit and Logit model fit. A bit of googling show this is something to do ...
198 views

### Why doesn't repeated PatternSequence work with explicit pattern names?

Why would this work: Clear[f] f[a : PatternSequence[b_, c_]] := {a}; f[1, 2] (* {1, 2} *) and this also works: ...
552 views

### Are there tools for getting Mathematica 9 Notebooks working in Mathematica 10?

As often happens with Mathematica updates, nearly all of my notebooks no longer work as they did with the previous version. The upgrade from 9 to 10 has changed the appearance or introduced errors ...
206 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 ...
260 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 ...
409 views

### How to convert a notebook cell to a string retaining all formatting, colorization of identifiers etc?

I have an opened Mathematica notebook containing several cells. Suppose, I am interested in one of them -- it may contain a complete or incomplete expression (e.g. with syntax errors, highlighted ...
512 views

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 ...
815 views

### NDSolve Differential Equation Error

I am trying to solve the following differential equation- ...
321 views

For convenience I'm trying to add an extra property to CountryData ...
510 views

### Any built-in function to generate successive sublists from a list?

Given lst = {a, b, c, d} I'd like to generate {{a}, {a, b}, {a, b, c}, {a, b, c, d}} but using built-in functions only, ...
376 views

### Proving (self) similarity with Mathematica - Reccurrence Plots, Similarity Plots etc

I posted this question in math.se but given the sheer tumultuous number of questions that keep appearing on math.se and also given that I am trying to accomplish this in Mathematica, I thought I'd ...
570 views

### Toggle visibility of elements in a plot

I have three simple graphs in one Plot. Now I am trying to make a button for each graph so you can hide or show it in the plot. Until now I was just able to make a checkbox with the Manipulate ...
1k 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: ...
183 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 ...
2k views

### How to convert from base 2 to base n?

I'm trying to use baseform to convert numbers in base 10 to base n, how can I make the convertion between, say base 2 to base n? Baseform seems to always think that the base in expr ...
430 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 ...
335 views

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: ...
272 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] ...
735 views

### How to plot a barycentric line

I want to plot a barycentric function on an equilateral triangle (ternary plot). For example f1 = {Abs[Sin[x]], Mod[x, 2], Abs[Cos[x]]}; At the moment I evaluate ...
436 views

### Mathematica implementation of Earth Movers Distance?

Has anyone implemented in Mathematica the Earth Mover's Distance (EMD)? A concept dating back to Monge 1871, used to compare histograms and images, e.g., the CIEDE2000 Color Difference algorithm. ...
682 views

### How to set row height in Grid?

I always thought that Grid (and the underlying GridBox) and the general handling of tabular objects is a bit weird in ...
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 ...
299 views

### Why can I not replace a Dataset using a rule?

Simple replacement of a Dataset object does not seem to follow the expected behavior... Dataset[{}] /. _Dataset->1 Returns the empty Dataset not 1 as I would ...
364 views

### Make a series of points curl

Say I have a series of points that make a straight line... (Fig 1) points = {{0, 0, 0}, {1, 0, 0}, {2, 0, 0}, {3, 0, 0}, {4, 0, 0}, {5, 0, 0}} I can rotate these ...
851 views

### The mysterious gap inside Grid

There's this gap inside Grid which I cannot seem to remove. Perhaps someone knows how. ...
589 views

### Breaking up long equations in TeXForm

If I have a horrifically long expression and output it to TeX using TeXForm, I get a long equation which needs to be split up into multiple lines. But splitting it up manually can be quite cumbersome. ...
319 views

### Efficient way of identifying the indices of first occurrences

It seems to me like identifying the first occurrence of unique elements should take about the same amount of time as it takes to delete duplicates. My data sets are much larger than this (...
567 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 ...
1k views

### Plotting an epicycloid

I am fairly new to Mathematica and I cannot figure out how to plot an epicycloid. I have plotted some neat looking things in my attempts, but can't make one. I am not looking to make an animation, ...
322 views

### PlotRangeClipping not working correctly with small ImageSize and PDF-export

Although Mathematica has some nice plotting capabilities, there are some things which are annoying me: I like to export a Graphics oder Plot to PDF for use in $\LaTeX$. I like to a have an ImageSize ...
272 views

### Giving JLink Huge Memory by Default

I have noticed that Mathematica makes use of Java by way of JLink, for example, in the extensions such as DatabaseLink and (I think) RLink. It also seems like Java is a first-class citizen for writing ...
136 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: ...
215 views

### Is there a method to enumerate the keys/values of SystemUtilitiesHashTable

Lacking from the simple API of SystemUtilities`HashTable is a method to enumerate the keys/values. ...
446 views

### FourierSeries for rational function looks wrong

I have the following code: ser[x_] = FourierSeries[(\[Pi]^2 + a)/(3 x^2 + a), x, 10] // N // Chop It gives me some series, which I then try to plot. And ...
306 views

### 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 ...
420 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 ...
203 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 ...
668 views

### Changing default ImageSize in the frontend?

I would like graphs to appear somewhat larger in my notebooks (running v8.0.4 on OSX 10.8.2). Naturally I can specify ImageSize in each individual plot, or drag ...
397 views

### Symbolic Integration along contour: branch cut problem?

Context Following this question on path integrals in the complex plane, having defined again a numerical and symbolic integrator along a path as ...
175 views

### Algorithm used by IsomorphicGraphQ

I'd like to know which algorithm is used to test if two graphs are isomorphic?