All Questions

642 views

How can I influence the spaces between labels on a BarChart

I want to chart data using a BarChart, the labels on the x-axis are numbers. Unfortunately they are so close to each other it really looks strange and more like one ...
603 views

How do I introduce a new variable in a trigonometric equation?

I have the trigonometric equation \begin{equation*} \sin^8 x + 2\cos^8 x -\dfrac{1}{2}\cos^2 2x + 4\sin^2 x= 0. \end{equation*} By putting $t = \cos 2x$, I have \begin{equation*} \dfrac{3}{16} t^4+ ...
158 views

Front ends gone wild with named slots

Bug introduced in version 10, persisting through 10.3 Assume the following simple expression {#"Test"}& Now go in front of the ...
264 views

A bug in Commonest in version 10

Bug introduced in 10.0.0 and fixed in 10.0.2 m_goldberg demonstrated that in Mathematica 10 Commonest does not behave as the documentation indicates that it ...
313 views

Why does Mathematica simplify $x/x\to1$?

If I enter x/x, I get 1. Such behavior leads to this: Simplify[D[Sqrt[x^2], x, x]] 0 ...
429 views

Bug still present in version 10 under Windows. In a recent posting, Belisarius solved a problem related to the display of arrows on the x and y axes by setting ...
435 views

Strange behaviour of Reduce for Mod[x,1]

For every integer $x$ the equation Mod[x, 1] == 0 holds. While Simplify[Mod[x, 1] == 0, Element[x,Integers]] gives ...
120 views

Why does the Ver. 10.0 FrontEnd lose matching of parentheses when we insert quotations?

I am running Mathematica 10.0.1 on a four-year old iMac running OS 10.6.8. The following irritating behavior occurs regularly: I have a list with parentheses, and later on I need to add something to ...
615 views

How would I return a random Mathematica command?

I'm doing some metaprogramming. How would I make a Mathematica function that returns a random Mathematica command? Is there a list of command names that I could use ...
432 views

Why do NumberForm and Round apparently use different tie-breaking methods?

When rounding numbers (for example, rounding a real number to the nearest integer), the "round to nearest" rule is usually used. For example, 1.4 is rounded down to 1 and 1.6 is rounded up to 2. ...
356 views

FindInstance returns Indeterminate in version 9, but not in 8

Bug introduced in 9.0 and fixed in 10.0.0 Here is a trivial system of equations in three unknowns for which FindInstance obtains a solution: ...
742 views

How do I “start a reference system”?

When I attempt to insert a citation or specify a database to use as a bibliography, I get a message that I need to "start" the "reference system" "manually": I have no idea what a references system ...
851 views

How to remove accents from text?

I would like to know how I can remove accents from a string. For example, how can I transform "string test áéíóú" into ...
552 views

How to embed an image into a string?

Note: The bug described in the post is in Mathematica 9, and has been fixed in 10.0. The documentation for String contains the following statements: Strings ...
333 views

ToNumberField won't recognize Root as an explicit algebraic number

Bug fixed in 10.0.0 In Mathematica 9.0.1, it appears that ToNumberField will not always recognize a Root object as an ...
441 views

Is there a way to use functions like Prime[n] within Solve[]?

I'm trying to see if a number can be written as the sum of two prime numbers. Ideally, I would like to use Solve[ Prime[n] + Prime[m] == 100, {n, m}] But that ...
499 views

Evaluation indicator for a notebook

I have a GUI with a number of TabView and other Manipulate controls. Sometimes clicking from one tab view to the other can take ...
807 views

Does $x>0$ imply that $x\in\mathbb{R}$?

Let’s assume I input Assuming[x > 0, expression] Is it assumed by Mathematica that $x$ is a real number? Or that the real part of $x$ is positive? Something ...
135 views

Strange result of Reduce and ForAll

In the question Can Mathematica tell me if a polynomial has all real roots?, quite a few of interesting answers were given. I wanted to add another one, using quantors, and observed some strange ...
264 views

Evaluate selection in new window or new notebook?

Sometimes when you have long code you need to check some part of this code. the way I am using currently is to selected the part that I want and then copy it to new notebook and then evaluate it ...
200 views

Possible bug with FourierTransform linearity

Each component is easily transformed but the sum is not: FourierTransform[f''[x], x, k] FourierTransform[f'[x], x, k] ...
1k views

How to solve a stiff nonlinear second-order ode?

I want to solve a nonlinear second order ODE as an initial value problem (IVP). Unfortunately, for certain values of first derivative at starting point I get a stiff-problem. I tried to overtake this ...
691 views

Replicating a discontinuous graph

I'm trying to replicate a graph from my math book for my notes as well as to learn Mathematica. I was hoping someone would be able to help me figure out how to add the open points to the graph, and ...
322 views

Parallelization of distinct array write access from subkernels

I'm working on an implementation of a multivariate FFT, which is (or at least should be) highly parallelizable due to the row-column-algorithm. However, i can't figure out how to implement that. The ...
337 views

I have a ragged list ragged = {{a,b,c,d,e},{x,y,z}} that I would like to trim (on the right) to be rectangular. The desired result is ...
437 views

Predictive interface eats my Esc key

After updating to version 9, I found the predict interface very helpful except there is a small problem always annoying me: Consider this: I have a list ...
544 views

How can I highlight a moving bar in an animation of a bar chart?

I wrote the following code, but I don't know how to highlight the moving bar. ...
452 views

Get the name of a symbol passed to a function

I'm trying to get the name of a symbol passed to a function with this: f[x_] := {SymbolName[x], x} SetAttributes[f, HoldFirst] x = 5; f[x] But ...
450 views

How to deduce a generator formula for a polynomial sequence?

Consider a polynomial sequence $\{p_n\}$ generated by some (simple) rule:  \begin{array}{l} p_1(x)=x \\ p_2(x)=2 x-x^2 \\ p_3(x)= x^3-3 x^2+3 x \\ p_4(x)=-x^4+4 x^3-6 x^2+4 x \\ p_5(x)= x^5-5 ...
382 views

Memory leak in FE?

A very abridged example of what was originally a major leak ...
855 views

Manipulate BarChart with Mathematica

In the following minimal working example: Manipulate[BarChart[{a,b}],{a,1,2},{b,1,2}] I'd like to be able to control the size of the bars by using some sort of ...
1k views

Why is ListDensityPlot unable to plot datasets with extreme ranges

Consider the following dataset: data = Flatten[ Table[{x 10^-9, y 10^-9, x^2 + y^2},{x, -100, 100, 10}, {y, -100,100, 10}] , 1]; If I try to ...
171 views

How to define a function that is Listable for some but not all arguments?

I want to define a function f[x,y] that is Listable for only the first argument, not the second. If we use ...
176 views

How to add arrows in the middle of the Plot-lines

If I got a bunch of numbers,then I can plot it with ListPlot: ...
637 views

Flatten nested lists

I have a list as follows lis= {a, {{{b}, {c,d,e}}, {{f}, {g,h,i}}}} which I would like to flatten to ...
206 views

InputAliases and SelectionPlaceholder issue in V10

Bug present on Win V 10.0 - 10.3 Let's create an example and do the test: ...
416 views

Finding a point from a set of contours such that it is nearest to a given point

I have several contour lines and one point. How can I find a point in one of those contour lines which is nearest to the given point? ...
2k views

problem with coloring spherical harmonics

I want to color a spherical harmonics. So I write as follows. ...
4k views

Plot columns of table if some condition is fulfilled

I have a table with data, for example MT = {{1, 80.3, 1, 4, 68}, {2, 80.5, 1, 5.5, 102}, {3, 80.0, 0, 4.2, 78}, {4, 80.4, 0, 3, 17}, {5, 80.2, 1, 5, 180}}; ...
256 views

How to pass composite function list to SortBy?

In order to sort alphanumeric-as-string data of the form {"T3", "T14", "T1", "E2"}, so that "T14" comes after ...
1k views

Height-dependent filling color in 3D Data Plots

I would like to have the filling of my ListPlot3D display the same color than the one applied to the data. This question makes sense only in the case of conditional coloring of data (according to ...
510 views

Why does ListPlot ignore some global options?

Bug introduced in 7.0.1 or earlier and fixed in 8.0.1' Why does the following plot no use the global PlotMarkers option? ...
128 views

Filling option failing when ListLinePlot given my data

Context I want to do Filled plot such as: ...
319 views

Front end crash on Export in 10.2 on OS X

Bug introduced in 10.2.0 and fixed in 10.3.0 Appears to be specific to OS X Mathematica 10.2 is reliably crashing for me when trying to export a pdf that has text with ligatures. For example: ...
383 views

Generalization to AllTrue, AnyTrue and NoneTrue

I am wondering if there is a natural Mathematica way to generalize those functions. To be specific, All three functions AllTrue, ...
219 views

After editing a file Mathematica 10 interprets […]^2 as […(])^2

Bug introduced in 10.0 and persisting through 10.2 or later This is a very weird bug and I don't really know how to reproduce it, so I'll just copy-paste the whole code ...
432 views

Modelling the effect of a structure on a “tsunami” (hyperbolic wave equation)

So, the hyperbolic wave equation can be quite easily solved in Mathematica like this: ...
139 views

Is it possible to use the global definition of a symbol as part of its new local definition set in a Block?

Consider the following expression: Block[{Print = CopyToClipboard}, doSomething[]] Now all calls to Print from ...