9
votes
1answer
353 views

Caching of Graph Graphics

In this answer, Simon Woods concludes that when you display an expression with head graph more than once, something is getting stored somewhere. I looked into it too and found out this only happens if ...
9
votes
2answers
298 views

Remove versus ClearAll

What is the difference between Remove and ClearAll? I thought that "not being recognized by Mathematica", which is the effect ...
9
votes
1answer
1k views

Simplify an expression containing NonCommutativeMultiply

How does mathematica evaluate the following expression to zero: ...
9
votes
2answers
206 views

Substituting confidential tagged cells by a “content removed” cell

When producing a notebook with both code and text, I often end up with pieces of code, or even entire chapters, that I don't want to be shown on the final output. I generally hide or close them by ...
9
votes
1answer
289 views

How do I determine astronomical transit times?

Mathematica, through the "legacy" Scientific Astronomer package, used to have the ability to easily determine accurate transit times of astronomical objects simply, with ...
8
votes
2answers
210 views

Keywords to find documentation for this syntax

Mathematica allows this syntax, but I cannot find any documentation (or books) that discuss the various uses/advantages of it ...
8
votes
1answer
407 views

Treat all variables as local in a module [duplicate]

In most languages, any variable defined inside a function is considered local. ...
8
votes
2answers
418 views

Retrieving duplicates from nested list

Consider the following: data={{1,a},{10,a},{5,b},{4,c}}; In my case duplicates are defined when for {x1,y1} and ...
8
votes
2answers
750 views

Finding differences between Pi with varying number of decimals

I have the following code In[32]:= N[Pi, 2] Out[32]= 3.1 In[33]:= N[Pi, 1] Out[33]= 3. In[34]:= N[Pi, 2] - N[Pi, 1] Out[34]= 0.*10^-1 Why can't Mathematica ...
8
votes
1answer
457 views

Combining and aligning “chart” type graphics with regular plots

Is there an easy (recommended) way to align regular plots (e.g. ListPlot or Plot) with chart type graphics (...
8
votes
1answer
1k views

Why does Export drop namespace prefixes in the exported XML file?

I am trying to generate an Excel-compatible XML file from Mathematica. First, I created a test XML file by saving a Microsoft Excel workbook as "XML Table". Then I ...
8
votes
2answers
211 views

RegionIntersection puzzle

I am using RegionIntersection[] to intersect two rectangles, phrased as Polygon[]s: ...
8
votes
4answers
359 views

Generate PrimePower counting function

Is there a way to generate a counting function for prime powers - i.e. to create a similar function to PrimePi, but including prime powers. The following will, of ...
8
votes
1answer
239 views

Decomposition of a semialgebraic set into connected components

Is there any built-in function for doing decomposition of a semialgebraic set into connected components? The only way I now can think of is to use ...
8
votes
1answer
111 views

PlotMarkers shadows the settings by Style

The code below gives color-varying points with explicit Style wrappers: ...
8
votes
3answers
604 views

how to read in a file in the same directory?

Now I am writing a small package. I have written several files and put them in the same directory. And some files need to read in or include another file in the same directory. But when I simply write ...
8
votes
8answers
766 views

Replace interior of matrix with zeros

I have f.e. the following square matrix: ...
8
votes
2answers
438 views

Finding All Chordless Simple Cycles In A Graph

I am doing a research on networks which consists of polygons with different number of sides. I am trying to find all simple cycles in a network which are chordless. As an example, consider the ...
8
votes
1answer
484 views

CDF and personalized style

I recently created a custom stylesheet. I then created a notebook with the new style, confirmed that the notebook had adopted the style, and then saved a copy in CDF. But when I opened the CDF in ...
8
votes
1answer
586 views

How can I scale a plot in vector graphic or PDF form?

I am not at all a computer graphics expert, but it seems that portable document format (PDF) files have a "native size," even though they may (and usually do!) contain vector graphics that can be ...
8
votes
2answers
202 views

Obtain input expression from history without evaluating

I typed and evaluated an expression, but deleted it from the notebook. For instance, suppose it was In[1]:= Round@SessionTime[] Out[1]= 2 I now want to retrieve ...
8
votes
2answers
713 views

How to make a point's position time-dependent given a formula for the next step?

I've made a program that is just some points on a plane. Red points are cops and green points are robbers. Each point has a vector indicating where it is going to be in the next step of $t$. Right now ...
8
votes
1answer
152 views

How to grab output from evaluating input cells in a generated notebook

The notebook expression resulting from ... ...
8
votes
3answers
258 views

How to count all cliques (not just maximal ones) in graphs?

How can I count the numbers of $r$-cliques in a graph? In other words, the number of triangles, the number of $K_4$, the number of $K_5$ etc. I have tried for example ...
8
votes
1answer
108 views

Framing a combination of cells in the notebook

In my notebook, I have the following cells, which I tried to put around a single frame with a light blue background color. After entering the cells, I selected all four, then clicked the frame ...
8
votes
2answers
917 views

Indenting bulleted lists in Notebooks

I currently use Word for notes, making nested bulleted lists as I go. I've just started using Mathematica and would like to do the same in its Notebooks, but it doesn't look like it has that ...
8
votes
1answer
106 views

Iterator variable not blocked in ParametricPlot

Bug introduced in 10.0 and persisting through 10.2 or later It appears that perhaps the iterator variable r is not Block-ed ...
8
votes
1answer
377 views

Is there a built-in function to do binary search?

Is there a built-in function to do binary search? Say, given a list (sorted) and a number, find the position which keeps the listed sorted when the number is inserted. I know that ...
7
votes
2answers
219 views

Operate on several lists to create one list

How do you put corresponding values from different lists together according to some operation? E.g. I have three lists giving the velocity in the x, y and z direction respectively. I'd like create ...
7
votes
2answers
412 views

Revert FullForm-ed text to prettyprinted

Sometimes strings in a notebook/package file end up garbled due to some unknown/unintentional conversion of the expression/cell/notebook. I could not find a way to revert such unreadable text to its ...
7
votes
2answers
307 views

Generate cyclic list from a list

Given a list (for example, {3, 5}) I would like to make a function genCyclic[n_, list_] which generates a cyclic patterns of ...
7
votes
3answers
336 views

Why can't D[] be used in place here? [duplicate]

Possible Duplicate: General::ivar is not a valid variable when plotting - what actually causes this and how to avoid it? Beginner question: Why can't I use ...
7
votes
2answers
935 views

Cropped pdf file after export

I have plot generated by Plot[] function that I want to export to pdf file. The problem is that Export[] function somehow cuts a ...
7
votes
3answers
360 views

How to efficiently get breakpoints of piecewise functions

Setting. Imagine that we have several arbitrary linear functions in 2D that can be changed manually (say, slopes are parameters). Their Min (or ...
7
votes
2answers
967 views

How to plot BarChart with error bars on logarithmic scale in Mathematica 9?

I'm quite new in Mathematica, and I would like to ask you to consider the next case: I need to plot bar chart with error bars on logarithmic scale. From Wolfram site I took the function which allows ...
7
votes
5answers
279 views

How to write an operator that acts on pure function (to give another pure function)

I would like to write an operator oper that acts on a pure function f with an undetermined number of arguments, with the syntax <...
7
votes
3answers
350 views

Appending and Prepending columns to a dataset in 10.0.2.0

fixed in 10.1 (windows) I just experience a problem in prepending columns to a dataset. I did this a hundred times in 10.0.1.0 - no problems. Now it seems as if it is only possible to append/...
7
votes
4answers
1k views

How to find all data points within closed curve

I want to find all data points inside curve as given below: ...
7
votes
1answer
180 views

Can you make the new “Choose color scheme” helper larger?

Mathematica 10 has a cool new "color data chooser" feature: My question is: Can you make that window larger? Right now, I can only see 3-4 color schemes at once, even though all 51 gradients would ...
7
votes
1answer
1k views

Grain(Particle) Size Distribution (PSD) Analysis with Mathematica

I would like to do an analysis of the grain size distribution of a Monte Carlo Grain Growth simulation I implemented based on the nice example by Rituraj Nandan (see Link). The result of this ...
7
votes
1answer
152 views

Converting string representation of boxes into explicit boxes [duplicate]

It is very easy and convenient to write textual labels as Strings in the WYSIWYG mode. For example, I define a short form describing a linear model: ...
7
votes
2answers
584 views

Why does PlotRange in DensityPlot have no effect

It looks like DensityPlot and ListDensityPlot automatically clip the plot range to the min and max value of the data, when ...
7
votes
1answer
84 views

How to create permanent intra-notebook links [duplicate]

I'm trying to create a documentation notebook for a package and have entries which reference other entries. I'd like to include the hyperlinks in text formatted cells so that when a reader clicks on ...
7
votes
2answers
640 views

Define a function with a function for an input

I want to create the functions $even[f]$ and $odd[f]$ which will apply the formula $even[f(x)] = \frac{f(x)+f(-x)}{2}$ and $odd[f(x)]=\frac{f(x)-f(-x)}{2}$ for an arbitrary $f$. I tried using <...
7
votes
3answers
800 views

Color function doesn't span the whole color range in MatrixPlot

In matrix visualization, for instance, MatrixPlot[{{1, 2}, {3, 4}}, PlotRangePadding -> 0, ColorFunction -> "Rainbow"] the color map does not cover the ...
7
votes
1answer
126 views

Applying functions to irregularly distributed Keys in Association lists

This Q is related to this one, but now refer to the situation as irregularly distributed Keys in lists of Associations: ...
7
votes
1answer
526 views

Export to PDF on OS X, font missing on Windows

Here is another problem with Mathematica plots and PDF. I have Mathematica 9.0.1 on Mac OS X. I want to export my plots to PDF to include them in a LaTeX document. If I export the plot with the ...
7
votes
1answer
2k views

How can I get better control over StreamPlot?

I'm having some difficulties with the command StreamPlot in Mathematica 7.0. Here's the basic plots I'm doing : ...
7
votes
3answers
179 views

BarLegend can't make spaced contours when contours number>11

According to Document of BarLegend,BarLegend will select equally spaced contours: BarLegend[cf,contours] generates a legend that identifies color ranges from the color function cf based on the ...

15 30 50 per page