## Chapter 8Year 2013

8.10 October 29, 2013
8.11 October 22, 2013
8.12 October 15, 2013
8.13 October 1, 2013

8.18 August 27, 2013
8.19 August 20, 2013
8.20 April 29, 2013
8.21 April 22, 2013
8.22 April 8, 2013

### 8.1 December 31, 2013

==================================
Top new questions this week:
==================================

[How to generate a random
snowflake]\url{http://mathematica.stackexchange.com/questions/39361/how-to-
generate-a-random-snowflake}

'Tis the season...
And it's about time I posed my first question on Mathematica Stack
Exchange.
So, here's an holiday quest for you Graphics (and P-Chem?) gurus.

What is your best code for generating  ...

----------------------------

[Exporting extremely large images; arrays generated via TensorProduct
use 5 times as much RAM as
expected?]\url{http://mathematica.stackexchange.com/questions/39412/exporti
ng-extremely-large-images-arrays-generated-via-tensorproduct-use-5-times
> }

I am generating plots of the roots of certain classes of polynomials, in
the spirit of the multicolored visuals on the Wiki page on algebraic
numbers. I've thus far been able to make some extremely  ...

----------------------------

[Plot discontinuous function with black and white disks marking
discontinuities]\url{http://mathematica.stackexchange.com/questions/39445/p
lot-discontinuous-function-with-black-and-white-disks-marking-discontinu
ities}

Let's say I'd like to plot Sign[x + 0.5]:

Plot[Sign[x + 0.5], {x, -1, 1}]

Mathematica will give this:

This plot does not show very clearly the value of Sign[x + 0.5] at x =
-0.5: is it 1? is  ...

----------------------------

[Zero-dimensional
matrices]\url{http://mathematica.stackexchange.com/questions/39522/zero-dim
ensional-matrices}

In a recent Mathematica project, $(n \times 0)$- and $(0 \times n)$-dimensional matrices have suddenly become a frustratingly common
edge case for me.  For instance, consider the following two  ...

----------------------------

[Can I return lists with different dimensions from a compiled
function?]\url{http://mathematica.stackexchange.com/questions/39360/can-i-r
eturn-lists-with-different-dimensions-from-a-compiled-function}

Sometimes I'll need several lists with different dimensions to be
returned by a compiled function, but compiled function will fail if an
irregular list contained:

(* The real case is of course much  ...

----------------------------

[Output from Wolfram language in
Python]\url{http://mathematica.stackexchange.com/questions/39546/output-fro
m-wolfram-language-in-python}

I have a Python program which will run a script in the Wolfram language
and then return to the main program. Is it possible to return
values/variables to the main program?

This is the code in Python  ...

----------------------------

[Is it Possible to change dashes into circles with Plot
command?]\url{http://mathematica.stackexchange.com/questions/39394/is-it-po
ssible-to-change-dashes-into-circles-with-plot-command}

Is it possible to change the Dashed Style of a curve into circles with
Plot command ?

Plot[Cos[x], {x, 0, 2*Pi}, PlotStyle -&gt; Directive[Dashed,
Thickness[0.005]]]

==================================
Greatest hits from previous weeks:
==================================

[Are you interested in purchasing David Wagner's "Power programming with
Mathematica"?]\url{http://mathematica.stackexchange.com/questions/16485/are
mat}

I recently contacted McGraw-Hill to see if they have a mechanism in
place for printing out-of-print books that are still of interest.

----------------------------

[Pick elements of largest absolute
value]\url{http://mathematica.stackexchange.com/questions/31385/pick-elemen
ts-of-largest-absolute-value}

For example, given

list = {{1, -3, -5}, {2, 1, 6}, {0, 2, 4}, {-9, 2, 6}}

should return:

{-5, 6, 4, -9}

Updated

I found a undocumented function called "InternalMaxAbs",but it only
accept two  ...

==================================
==================================

[How to extract structured array data from DefineDLLFunction in
Mathematica]\url{http://mathematica.stackexchange.com/questions/39637/how-t
o-extract-structured-array-data-from-definedllfunction-in-mathematica}

I want to use my Bluechip PCI-ADC acquisition card in Mathematica via
his dynamic link library Bcdll32.dll; (used to access functions on my
PCI data acquisition cards). My problem is the function  ...

----------------------------

[Return struct from function (with
DownValues)]\url{http://mathematica.stackexchange.com/questions/39520/retur
n-struct-from-function-with-downvalues}

In Mathematica there is a way to create struct-like data type:

struct[myField]=value

I want to return myStruct from a function:

getStruct[input_List] := Module[{struct},
(*populate  ...

----------------------------

[Setting bash environment within external
call]\url{http://mathematica.stackexchange.com/questions/39509/setting-bash
-environment-within-external-call}

I would like to run external command from Mathematica. For this I need
to have bash environment configured via reading the content of
${HOME}/.bashrc file. When I execute the following code in ... - asked by mmal (1 vote)  ### 8.2 December 24, 2013 ================================== Top new questions this week: ================================== [Any ideas on how to use the Region context?]\url{http://mathematica.stackexchange.com/questions/39184/any-idea s-on-how-to-use-the-region-context} If you type ?Region* you'll get: which seems a bunch of interesting and not documented symbols. Any idea (or experience) on how to use them? Edit By using our "collective spelunking" I ... - asked by belisarius (23 votes), answered by m_goldberg (12 votes) ---------------------------- [How to create effect like Van Gogh's stroke brush?]\url{http://mathematica.stackexchange.com/questions/39003/how-to-cre ate-effect-like-van-goghs-stroke-brush} I need to apply Van Gogh's stroke brush effect to a random image Take the following image as an example: Thank you so much if you could help! - asked by user10495 (15 votes), answered by Simon Woods (15 votes) ---------------------------- [Elegant high precision log1p?]\url{http://mathematica.stackexchange.com/questions/39126/elegant- high-precision-log1p} Sometimes it is hard to understand how numerical expressions are evaluated. I remember reading claims by Wolfram on how smart the Kernel is to evaluate expressions trees numerically by recognizing ... - asked by alfC (12 votes), answered by Mark Adler (7 votes) ---------------------------- [Elegantly split a matrix into positive and negative parts?]\url{http://mathematica.stackexchange.com/questions/39113/elegantly- split-a-matrix-into-positive-and-negative-parts} I have a matrix$M$of real components, and I want to split it into two matrices$M^+$and$M^-$of the same dimensions as$M$, where$M^+$contains the positive components of$M$(the remaining ... - asked by becko (12 votes), answered by Yves Klett (20 votes) ---------------------------- [Is there a difference between Divide[a,b] and a/b?]\url{http://mathematica.stackexchange.com/questions/39200/is-there-a-d ifference-between-dividea-b-and-a-b} In this comment it was asserted that Divide[a,b] and a/b are different, though the documentation indicates that they are the same. In particular, it was asserted that a/b is evaluated as a * 1/b, ... - asked by Mark Adler (10 votes), answered by Szabolcs (10 votes) ---------------------------- [How many Christmas gifts?]\url{http://mathematica.stackexchange.com/questions/39338/how-many-c hristmas-gifts} This question is based on the old song, The Twelve Days of Christmas In a comment made on a recent question, Yves Klett remarked, "no seasonal questions this year?" This reminded me of one I solved ... - asked by m_goldberg (8 votes), answered by rm -rf (13 votes) ---------------------------- [Which ColorFunction should I use to get such a gradient of blue-cyan-green-yellow-orange-red?]\url{http://mathematica.stackexchange.co m/questions/39300/which-colorfunction-should-i-use-to-get-such-a-gradien t-of-blue-cyan-green-yello} I want to get the effect in the above Figure. Here is my code: Plot3D[Log[ 4*((1 + x)^2)*(0.0065^2)*Log[y]/(3*((1 - 2 x))^2*(0.0267^2)) + 1]/ Log[y], {x, 0.315, 0.45}, {y, 0, 1}, Mesh -&gt; ... - asked by Scott Wang (8 votes), answered by rm -rf (12 votes) ================================== Greatest hits from previous weeks: ================================== [List of compilable functions]\url{http://mathematica.stackexchange.com/questions/1096/list-of- compilable-functions} Is there somewhere a list on the functions that Compile can compile, or the cases in which a particular function can be compiled that I haven't found? I'd be glad even with a list of some of them ... - asked by Rojo (58 votes), answered by Oleksandr R. (66 votes) ---------------------------- [Can one identify the design patterns of Mathematica?]\url{http://mathematica.stackexchange.com/questions/24988/can- one-identify-the-design-patterns-of-mathematica} ... or are they unnecessary in such a high-level language? I've been thinking about programming style, coding standards and the like quite a bit lately, the result of my current work on a mixed ... - asked by Verbeia (65 votes), answered by Leonid Shifrin (50 votes) ================================== Can you answer these? ================================== [Efficient submatrix swaps for large sparse matrix]\url{http://mathematica.stackexchange.com/questions/39209/efficient- submatrix-swaps-for-large-sparse-matrix} I am implementing the 'swap' algorithm for a binary matrix to generate matrix permutations that maintain row and column totals. My problem is that my matrices are large and sparse (e.g., 19774 x 942, ... - asked by Gareth (1 vote) ---------------------------- [How to simplify expressions]\url{http://mathematica.stackexchange.com/questions/39341/how-t o-simplify-expressions} I read several similar posts but I have not found a solution yet. However, I think that my problem should be quite easy. So here we are. Relations Mt = M1 + M2; x1 = -(M2/Mt)*R; x2 = R*(1 - M2/Mt); ... - asked by Vaggelis_Z (1 vote) ---------------------------- [CountryData ->$Failed]\url{http://mathematica.stackexchange.com/questions/39110/countryda
ta-failed}

Today I started researching the "Four colours theorem" and to do so I
need data, regions for example. I tried using the following line:

CountryData["Ukraine", "Regions"]

But the result:

...

- asked by Vitaliy Sergeyevich Barash (1 vote)



### 8.3 December 17, 2014

==================================
Top new questions this week:
==================================

[How to plot contours in the faces of a
cube]\url{http://mathematica.stackexchange.com/questions/38656/how-to-plot-
contours-in-the-faces-of-a-cube}

I'm trying to plot contours of a function f[x,y,z] on the faces of a
cube as the example below, which represents the domain of this function.

Is there a way to do it in Mathematica? The  ...

----------------------------

[Creating new graphics primitive (EdgeForm,
FaceForm)]\url{http://mathematica.stackexchange.com/questions/38753/creatin
g-new-graphics-primitive-edgeform-faceform}

My question is strongly related to this question, nevertheless I would
like to bring it to every ones attention. Lets say I want to create a
new graphics primitive Boing which should look like this

...

----------------------------

[Graphics elements do not line up perfectly in exported
PDFs]\url{http://mathematica.stackexchange.com/questions/38745/graphics-ele
ments-do-not-line-up-perfectly-in-exported-pdfs}

Graphics elements do not always line up perfectly in exported PDFs.
Take for example

Graphics[{Point[{0, 1}], Line[{{0, 0}, {0, 1}}]}, AspectRatio -&gt;
Automatic]

It looks like this on screen:

...

----------------------------

[Drawing an arrow pointing at the "Enable Dynamics"
button]\url{http://mathematica.stackexchange.com/questions/38692/drawing-an
-arrow-pointing-at-the-enable-dynamics-button}

Sometimes my students are given Mathematica notebooks as part of an
assignment, and asked to go through some demonstrations contained in the
.nb file.  A lot of times I get complaints that the "graphs  ...

----------------------------

[ReplaceRepeated seemingly omits some
rules]\url{http://mathematica.stackexchange.com/questions/38668/replacerepe
ated-seemingly-omits-some-rules}

Is there a simple way in Mathematica to prevent rule reordering? Let me
give an example:

a -&gt; b //. {b -&gt; c, (x_ -&gt; y_) -&gt; (x -&gt; Expand[y])}
(* a -&gt; b *)

though

a -&gt; b /. {b  ...

----------------------------

[Formatting Excel Borders with
.Net]\url{http://mathematica.stackexchange.com/questions/38891/formatting-e
xcel-borders-with-net}

I have various tables generated in a Mathematica application and need to
export this to MSExcel formatted in a specific way.

The Excel formatting has to be generated by Mathematica. I am not  ...

----------------------------

[Problem with numerical evaluation of analytically solved integral,
solution way
off]\url{http://mathematica.stackexchange.com/questions/38734/problem-with-
numerical-evaluation-of-analytically-solved-integral-solution-way}

The following command in Version 9.0.1:

N[Integrate[x^50*Sin[x], {x, 0, 1}]]

gives $1.4615\times 10^{48}$ which is way off from the correct solution
which is between $0$ and $0.5$.

Interestingly  ...

==================================
Greatest hits from previous weeks:
==================================

[ShowLegend
values]\url{http://mathematica.stackexchange.com/questions/6236/showlegend-
values}

How do I get ShowLegend to put the max and min values that a plot
produces.

for example, when using ListDensityPlot, with PlotRange-&gt;Automatic,
the plot can sometimes clip.  How do I get  ...

----------------------------

[Get a "step by step" evaluation in
Mathematica]\url{http://mathematica.stackexchange.com/questions/148/get-a-s
tep-by-step-evaluation-in-mathematica}

Is it possible in Mathematica to get a step-by-step evaluation of some
functions; that's to say, outputting not only the result but all the
stages that have led to it?

Example : Let's say I want to  ...

==================================
==================================

[What are the limits of the
Prime-functions?]\url{http://mathematica.stackexchange.com/questions/38819/
what-are-the-limits-of-the-prime-functions}

Will Prime and PrimePi test up to 3 * 10^12? Where can I find the limits
for these funtions? Also, what are the limits for PrimeOmega and
PrimeNu? More generally, is there any documentation that gives  ...

----------------------------

[Efficient storage of Kronecker sum of circulant matrices+diagonal
matrix]\url{http://mathematica.stackexchange.com/questions/38901/efficient-
storage-of-kronecker-sum-of-circulant-matricesdiagonal-matrix}

I have a square matrix of the form
$$M=D+\overset{N}{\underset{n=1}\bigoplus}R_n,$$

where $R_n$ are circulant matrices, $D$ is a diagonal matrix and
$\oplus$ is Kronecker sum. Its size is quite big,  ...

----------------------------

[What is available for editing Mathematica source code with
Emacs?]\url{http://mathematica.stackexchange.com/questions/38838/what-is-av
ailable-for-editing-mathematica-source-code-with-emacs}

I can find several Emacs libraries for Mathematica, but I'm not aware of
a clear favourite, a definitive list, or of a library which is actively
maintained and developed. None of these appear to be in  ...

- asked by Ian Hinder (6 votes)

### 8.4 December 10, 2013

==================================
Top new questions this week:
==================================

[Unexpected dots from
Line]\url{http://mathematica.stackexchange.com/questions/38443/unexpected-d
ots-from-line}

I have noticed cases where Line produces dots in a graphics object when
I think it shouldn't. The first of these is:

Line[{{0., 0.}}]

The second is:

Line[{{0., 0.}, {0., 0.}}]

Longer lists of  ...

----------------------------

[How to replace an element in a list based on the value of the next
element?]\url{http://mathematica.stackexchange.com/questions/38472/how-to-r
eplace-an-element-in-a-list-based-on-the-value-of-the-next-element}

I use Mathematica a little bit. I try to understand it, but it is hard

I have a list of 5 numbers selected randomly from 0 and -1. I have to
replace a 0 with a 1 when the 0 is followed by -1.

My  ...

----------------------------

[How to pick increasing numbers from the
list]\url{http://mathematica.stackexchange.com/questions/38325/how-to-pick-
increasing-numbers-from-the-list}

How to pick increasing numbers from the list.

lst = {5, 3, 6, 2, 7, 4, 8};

out:

{5,6,7,8}

So many interesting answers, is it possible know the index of result
elements or position of  ...

----------------------------

[How to collect expressions from cells created by
Print?]\url{http://mathematica.stackexchange.com/questions/38216/how-to-col
lect-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 those output cells as elements, and  ...

----------------------------

[How to constrain memory usage on
HPC?]\url{http://mathematica.stackexchange.com/questions/38403/how-to-const
rain-memory-usage-on-hpc}

I found the performance of built-in function MemoryConstrained is very
poor. It stops the evaluation after the memory already exceeds greatly
than the values I set.

There are several other questions  ...

----------------------------

[Different results for integration using Mathematica and
MATLAB]\url{http://mathematica.stackexchange.com/questions/38457/different-
results-for-integration-using-mathematica-and-matlab}

I have the following integration:

$$\text{y}=2 \sqrt{\frac{1}{\pi }} \int_0^{\infty } \frac{e^{-z} \left(1-e^{-\frac{z}{b}} \left(\frac{a}{a+c z}\right)^L\right)}{\sqrt{z}} \, dz$$

I get different  ...

----------------------------

[Disconnected Frame/Axes in
Plots]\url{http://mathematica.stackexchange.com/questions/38581/disconnecte
d-frame-axes-in-plots}

Is it possible to have "Tufte" style figure axes? That is so that the
axes do not need to connect or span the entire data range?

For an example of what I mean from the R's default histogram style:

...

==================================
Greatest hits from previous weeks:
==================================

[How to determine the center and radius of a circle given three points
in
3D?]\url{http://mathematica.stackexchange.com/questions/16209/how-to-determ

I was wondering if anyone could give me a hand with this problem I have.

I have six points on a plane, and I am trying to determine if they form
a circle or not.

I know that any three points in 2D  ...

----------------------------

[Get a "step by step" evaluation in
Mathematica]\url{http://mathematica.stackexchange.com/questions/148/get-a-s
tep-by-step-evaluation-in-mathematica}

Is it possible in Mathematica to get a step-by-step evaluation of some
functions; that's to say, outputting not only the result but all the
stages that have led to it?

Example : Let's say I want to  ...

==================================
==================================

[Manipulating the pitch of a
sound]\url{http://mathematica.stackexchange.com/questions/38423/manipulatin
g-the-pitch-of-a-sound}

After reading Manipulating a continuous stream of sounds I have to ask
about controlling the frequency of a Sin sound in a continuous manner,
with a Play inside a Manipulate, for example. The result  ...

----------------------------

[How to get vertices of a polytope given by equalities and
inequalities?]\url{http://mathematica.stackexchange.com/questions/38414/how
-to-get-vertices-of-a-polytope-given-by-equalities-and-inequalities}

I have a polytope given by some equalities and inequalities, how can I
get all the vertices of the polytope?
If there's a way to deal with the one given by inequalities only, how
can I reduce the  ...

----------------------------

[Solar system simulation (n-body physics) with
OpenCL]\url{http://mathematica.stackexchange.com/questions/38478/solar-syst
em-simulation-n-body-physics-with-opencl}

I would like to simulate a n-body solar system in Mathematica. I have
found the following example:  ...

- asked by shrx (1 vote)


### 8.5 December 3, 2013

==================================
Top new questions this week:
==================================

[Can Mathematica determine part-of-speech for each word in a
text?]\url{http://mathematica.stackexchange.com/questions/38053/can-mathema
tica-determine-part-of-speech-for-each-word-in-a-text}

I've found that WordData has a database of English words and their
possible parts of speech. But some words are ambiguous, e.g. result can
be a verb or a noun:

In[7]:= WordData["result",  ...

----------------------------

[Whether Wolfram Mathematica suits well for doing app in it instead of
C++]\url{http://mathematica.stackexchange.com/questions/37888/whether-wolfr

At uni I have an yearly essay. I'm allowed to use any technology for
implementing it. I've been coding it in C++ with Qt. I thought of about
Wolfram Mathematica because I have some expirience in it.

...

----------------------------

[How to enumerate all possible binary
associations?]\url{http://mathematica.stackexchange.com/questions/37869/how
-to-enumerate-all-possible-binary-associations}

Suppose I have a list of symbols like:

{a,b,c,d}

I would like to enumerate all possible binary associations (combining
symbols and/or sublists pairwise):

{{{a,b},c},d}
{{a,b},{c,d}}
{a,{b,{c,d}}}
...

----------------------------

[How to get list of duplicates when using
DeleteDuplicates?]\url{http://mathematica.stackexchange.com/questions/37936
/how-to-get-list-of-duplicates-when-using-deleteduplicates}

This might be easy, but can't find a way to use DeleteDuplicates to get
also list of the actual duplicates.

Example:

lstA = {1, 2, 4, 4, 6, 7, 8, 8};
r = DeleteDuplicates[lstA]
(* {1, 2, 4, 6, 7,  ...

----------------------------

[Raspberry Pi GPIO operations with
Mathematica]\url{http://mathematica.stackexchange.com/questions/37926/raspb
erry-pi-gpio-operations-with-mathematica}

I started exploring GPIO operations on the RPi with Mathematica by
following this brief tutorial which describes how to use DeviceWrite to
cycle an LED on and off.  A natural extension is to use  ...

----------------------------

[Reduce can't reduce an equation without appropriate
assumptions]\url{http://mathematica.stackexchange.com/questions/38118/reduc
e-cant-reduce-an-equation-without-appropriate-assumptions}

When the number of unknowns is three (x, y, z), Mathematica can solve
it:

Reduce[Abs[x] + Abs[y] + Abs[z] == 1 &amp;&amp; z != 0, {x, y, z},
Reals, Backsubstitution -&gt; True]

for four variables  ...

----------------------------

[Pasting monospaced text into Mathematica notebook destroys
aligment]\url{http://mathematica.stackexchange.com/questions/38073/pasting-
monospaced-text-into-mathematica-notebook-destroys-aligment}

I drew the little ASCII-art electronics schema below in vim.

When i try to paste it into a Mathematica notebook, with:

A) A code cell
B) A monospaced font (Courier New)

Mathematica insists on  ...

==================================
Greatest hits from previous weeks:
==================================

[Mathematica9 linux version crash, how to fix
it?]\url{http://mathematica.stackexchange.com/questions/17163/mathematica9-
linux-version-crash-how-to-fix-it}

Ubuntu 12.04  x86_64   kernel 3.2.0-35-generic
Mathematica 9 linux version (x86_64) crashes with errors:

X Error of failed request:  BadGC (invalid GC parameter)
Major opcode of failed request:   ...

----------------------------

[Calling MATLAB from
Mathematica]\url{http://mathematica.stackexchange.com/questions/10231/calli
ng-matlab-from-mathematica}

How can I call MATLAB functions directly from Mathematica and transfer
data/variables between the two systems?

==================================
==================================

[ParametricNDSolve and
ProcessEquations]\url{http://mathematica.stackexchange.com/questions/37942/
parametricndsolve-and-processequations}

I have a question regarding NDSolveProcessEquations and
ParametricNDSolve.

When using the regular NDSolve we have the option to divide the
integration into the three steps ProcessEquations, Iterate  ...

- asked by jaclea (1 vote)

----------------------------

[How to set the working precision globally? $MinPrecision does not work]\url{http://mathematica.stackexchange.com/questions/38114/how-to-set-t he-working-precision-globally-minprecision-does-not-work} I want to increase the precision globally to 50 at least, but$MinPrecision does not work.

$MinPrecision = 50; x = Sin[2.] (* -&gt; 0.909297 *) Precision[x] (* -&gt; MachinePrecision *) How to set ... - asked by renphysics (3 votes) ---------------------------- [matrix with IF/THEN condition]\url{http://mathematica.stackexchange.com/questions/37905/matrix- with-if-then-condition} How to generate all posible matrices with some conditions on the elements? I need to make for given$n$all$n\times n$matrices$A=(a_{ij})$with three conditions: I.$a_{ij}=+1$or$0$or$-1$. ... - asked by aeiklmkv (1 vote) ### 8.6 November 26, 2013 ================================== Top new questions this week: ================================== [Is Mathematica an Implementation of the Wolfram Language?]\url{http://mathematica.stackexchange.com/questions/37557/is-math ematica-an-implementation-of-the-wolfram-language} I am trying to figure out what the announcement of the Wolfram Language means for Mathematica. Is Mathematica an implementation of the Wolfram Language, or is it something else? - asked by Eric Brown (21 votes) ---------------------------- [How to plot a certain surface? What is its parametric equation?]\url{http://mathematica.stackexchange.com/questions/37698/how-to- plot-a-certain-surface-what-is-its-parametric-equation} The surface show below is very beautiful; however, I don't know its function either as an implicit function or in parametric form. Anyone have an idea about it and how to draw it with Mathematica? - asked by LCFactorization (14 votes), answered by kirma (35 votes) ---------------------------- [CompiledFunction returns machine numbers smaller than$MinMachineNumber]\url{http://mathematica.stackexchange.com/questions/37764
/compiledfunction-returns-machine-numbers-smaller-than-minmachinenumber>
)

When thinking on the workaround for this LogLogPlot bug suggested by
halirutan I noticed that CompiledFunction actually can return machine
numbers smaller than $MinMachineNumber. Consider: f = ... - asked by Alexey Popkov (13 votes), answered by ybeltukov (12 votes) ---------------------------- [Laplace transform of$\frac{1-\cos
= 1$in the first octant: McVolume[Num_] := Module[{hit, miss, index, x, y, z}, hit = 0; miss = 0; For[index = 1, index ... - asked by johny (12 votes), answered by Szabolcs (15 votes) ---------------------------- [Making code version aware]\url{http://mathematica.stackexchange.com/questions/36806/making-code -version-aware} Mathics, a free Mathematica-compatible project has been recently launched. It provides a subset of the functions and capabilities of Mathematica at a slower pace. This opens us the tantalizing ... - asked by magma (11 votes), answered by magma (5 votes) ---------------------------- [Partitioning a list of numbers the Mathematica way]\url{http://mathematica.stackexchange.com/questions/36867/partitioning- a-list-of-numbers-the-mathematica-way} I have two sorted lists, one list will be called the "fences" and the other the "values" Fences could be:$\{1, 5, 9, 14\}$Values could be$\{-1, 1, 3, 4, 6, 9, 10, 13, 14, 15\}$I want to ... - asked by muzzlator (10 votes), answered by Ray Koopman (18 votes) ---------------------------- [Any way to make my equations look better, more Latex like?]\url{http://mathematica.stackexchange.com/questions/36697/any-way-to- make-my-equations-look-better-more-latex-like} I find that the equations I write in Mathematica are not always publication quality. Here is a typical example: If I copy as Latex, then I get the following code: \frac{\sum _{i=1}^N \frac{(k|k) ... - asked by Tyler Durden (9 votes), answered by Mike Honeychurch (9 votes) ================================== Greatest hits from previous weeks: ================================== [How to manipulate 2D plots?]\url{http://mathematica.stackexchange.com/questions/7142/how-to-mani pulate-2d-plots} When it comes to visual analysis, large datasets or data with intricate internal details often makes plotting in 2D useless, as the outcome is either just a fraction of the full dataset, or no details ... - asked by Istvan Zachar (58 votes), answered by Istvan Zachar (56 votes) ---------------------------- [Programmatic approach to HDR photography with Mathematica image processing functions]\url{http://mathematica.stackexchange.com/questions/9342/programm atic-approach-to-hdr-photography-with-mathematica-image-processing-funct > } The High dynamic range imaging (HDR or HDRI) direction in photography and image processing became very popular recently. Besides obvious photo art applications (see examples), there are many great ... - asked by Vitaliy Kaurov (44 votes), answered by Simon Woods (30 votes) ================================== Can you answer these? ================================== [How can I set constraints on parameters in NelderMeadMinimize package?]\url{http://mathematica.stackexchange.com/questions/35651/how-can- i-set-constraints-on-parameters-in-neldermeadminimize-package} I read about NelderMeadMinimize package. How can I set constraints on the parameters? For example I want to minimize an equation with 10 parameters such as {a1, a2, ....}. I want to put the condition ... - asked by Soodeh Z. (1 vote) ---------------------------- [WhenEvent method with 3 conditions]\url{http://mathematica.stackexchange.com/questions/36869/whenev ent-method-with-3-conditions} I am trying to solve system of differential equations below$x''(t)=-2.25cos(1.5t)-x(t)-x'(t)y''(t)=-1.125cos(1.5t)-4y(t)-y'(t)$for$x&gt;(1+y)$then$z'(t)=x(t)-(1+y(t))$for$|x|&lt;(1+y)$... - asked by Dadan Ari Wibowo (1 vote) ---------------------------- [Caching data in Mathematica package]\url{http://mathematica.stackexchange.com/questions/36875/caching-d ata-in-mathematica-package} Consider the following: m=Quantity[1,"meter"] If I run the package, it will return 1m But when I load the package, the package is re-evaluated meaning, that internet i required. Is it possible to ... - asked by OskarNS (1 vote) ### 8.9 November 5, 2013 ================================== Top new questions this week: ================================== [Incorrect result from Integrate]\url{http://mathematica.stackexchange.com/questions/35324/incorre ct-result-from-integrate} I attempted to calculate the following integral: Integrate[ Sqrt[x] Exp[-(x - a)^2], {x, 0, Infinity}, Assumptions -&gt; a &gt; 0] 1/(4 Sqrt[a])I E^(-(a^2/2)) Pi( a^2 BesselI[-(1/4), a^2/2] - (1 + a^2) ... - asked by DumpsterDoofus (12 votes), answered by Michael E2 (10 votes) ---------------------------- [Unpacked eigenvectors of complex matrices]\url{http://mathematica.stackexchange.com/questions/35266/unpacked -eigenvectors-of-complex-matrices} I want to calculate eigenvectors of a Hermitian matrix. For example$HistoryLength = 0;
n = 3000;
mat = # + ConjugateTranspose[#] &amp;@RandomComplex[{0, 1 + I}, {n, n}];
evec = Eigenvectors[mat];

...

----------------------------

[Wrong numerical value while exporting to a JSON
string]\url{http://mathematica.stackexchange.com/questions/35165/wrong-nume
rical-value-while-exporting-to-a-json-string}

The following code:

ExportString[{"a" -&gt; 2000000., "b" -&gt; 0.000001}, "JSON"]

Gives the results

{"a" : 2.e60,
"b" : 1.e-6}

The first one is obviously having a wrong numerical value. Also,  ...

----------------------------

[Boundary effect of Graphics3D object
Tube[]]\url{http://mathematica.stackexchange.com/questions/35331/boundary-e
ffect-of-graphics3d-object-tube}

I draw a Graphics3D object of two tubes:

Graphics3D[{Tube[{{-0.2, -1, 0}, {-0.2, 1, 0}}, 0.05],
Tube[{{0, 0, -1}, {0, 0, 1}}, 0.05]}, Boxed -&gt; False]

And I get this:

Now I want to have  ...

----------------------------

[Monitoring progress of long
calculations]\url{http://mathematica.stackexchange.com/questions/35139/moni
toring-progress-of-long-calculations}

I've came upon a few methods of how to display "processing" information
while Mathematica is running. But, from what I've understood, this only
works in between lines of codes. Is it possible to  ...

----------------------------

[How to find a specific color in one
picture?]\url{http://mathematica.stackexchange.com/questions/35132/how-to-f
ind-a-specific-color-in-one-picture}

In a picture, there are many different colors. How can I just want to
find the position of one color. In the following picture, if I would
like to find the coordinates of the position of blue, how can  ...

----------------------------

[Is there a way to make the "Details" section of the documentation
expand by
default?]\url{http://mathematica.stackexchange.com/questions/35370/is-there
-a-way-to-make-the-details-section-of-the-documentation-expand-by-defa}

By default, the Mathematica documentation opens with the "Details"
section collapsed.

This is never what I'm looking for  in fact, I've lost count of the
times I've sought help on a feature and  ...

==================================
Greatest hits from previous weeks:
==================================

[xkcd-style
graphs]\url{http://mathematica.stackexchange.com/questions/11350/xkcd-style
-graphs}

I received an email to which I wanted to respond with a xkcd-style
graph, but I couldn't manage it. Everything I drew looked perfect, and I
don't have enough command over PlotLegends to have these  ...

----------------------------

[Can one identify the design patterns of
Mathematica?]\url{http://mathematica.stackexchange.com/questions/24988/can-
one-identify-the-design-patterns-of-mathematica}

... or are they unnecessary in such a high-level language?

I've been thinking about programming style, coding standards and the
like quite a bit lately, the result of my current work on a mixed  ...

==================================
==================================

[Problem in exporting a plot with background to
pdf]\url{http://mathematica.stackexchange.com/questions/35131/problem-in-ex
porting-a-plot-with-background-to-pdf}

Just wondering if someone could help me for this problem. I have
utilised prolog to use a jpg image as the background of my plot in order
to compare my results with a reference plot.
Although the  ...

- asked by mak maak (1 vote)

----------------------------

[Series expansion: Taylor series takes huge amount of
time]\url{http://mathematica.stackexchange.com/questions/35372/series-expan
sion-taylor-series-takes-huge-amount-of-time}

I'm working on a notebook, trying to expand the root of a cubic
polynomial in Taylor series.  When I type:

Series[(Sqrt[46656 a^2 - 864 (3 2^(1/3) a^(2/3) + 2 a B)^3] + 216
a)^(1/3) , {a, 0, 2}]

...

----------------------------

[How to define tensor fields in
Mathematica?]\url{http://mathematica.stackexchange.com/questions/35374/how-
to-define-tensor-fields-in-mathematica}

I am wondering if the is any (neat) way to define tensor fields in
Mathematica. Let me be more specific, using an example:

For instance a tensor W with 3 indices, which is anti symmetric in the
first  ...

- asked by user10389 (1 vote)

### 8.10 October 29, 2013

==================================
Top new questions this week:
==================================

[Nice formatting for the results of a dice game
simulation]\url{http://mathematica.stackexchange.com/questions/34861/nice-f
ormatting-for-the-results-of-a-dice-game-simulation}

One of my Mathematica interests is in problems related to the formatting
of  output. Getting nice formatting from Mathematica is often
frustrating, but occasionally Mathematica will delight me by  ...

----------------------------

[Export Code to
Pseudocode?]\url{http://mathematica.stackexchange.com/questions/34997/expor
t-code-to-pseudocode}

I'm writing a paper and all my code is in Mathematica. The snippets are
mostly simple, and consist of loops, maps, variables, and conditionals.
I'd like add it to my paper, however, not many academic  ...

----------------------------

[How to efficiently find moments of a multinormal
distribution?]\url{http://mathematica.stackexchange.com/questions/34779/how
-to-efficiently-find-moments-of-a-multinormal-distribution}

I have a multinormal distribution with covariance matrix $\sigma$ and
zero mean. I want to find moment

$$E[x_1^{r_1}x_2^{r_2}\cdots x_n^{r_n}] =\,?$$

Of course, there is a build-in function  ...

----------------------------

[Problem importing a JCAMP-DX mass spectral
file]\url{http://mathematica.stackexchange.com/questions/34624/problem-impo
rting-a-jcamp-dx-mass-spectral-file}

I have some problems importing a JCAMP-DX EI-mass spectral file using
Mathematica 9.
For example, if I download the mass spectrum of nonacosane in JCAMP
format from NIST,
...

----------------------------

[How to partition a list of numbers in two lists of numbers such that
each lists elements sums up to the same
number?]\url{http://mathematica.stackexchange.com/questions/34952/how-to-pa
rtition-a-list-of-numbers-in-two-lists-of-numbers-such-that-each-lists}

I have the following list of squares.

{1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256}

Their sum is $1496$, I want to make two partitions with the given
numbers and each  ...

----------------------------

[finding
anagrams]\url{http://mathematica.stackexchange.com/questions/34720/finding-
anagrams}

What I'm trying to find are the 4 letter words in the mathematica
dictionary that have the most anagrams and the amount of anagrams these
have each.

But I can't seem to find all the 4 letter words in  ...

----------------------------

[How can I scale a plot in vector graphic or PDF
form?]\url{http://mathematica.stackexchange.com/questions/34909/how-can-i-s
cale-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  ...

==================================
Greatest hits from previous weeks:
==================================

[Mathematica9 linux version crash, how to fix
it?]\url{http://mathematica.stackexchange.com/questions/17163/mathematica9-
linux-version-crash-how-to-fix-it}

Ubuntu 12.04  x86_64   kernel 3.2.0-35-generic
Mathematica 9 linux version (x86_64) crashes with errors:

X Error of failed request:  BadGC (invalid GC parameter)
Major opcode of failed request:   ...

----------------------------

[Finding all simple paths between two vertices in a
graph]\url{http://mathematica.stackexchange.com/questions/25779/finding-all
-simple-paths-between-two-vertices-in-a-graph}

There are built-in methods to find a shortest path between two vertices
in a graph, and the question on finding all shortest paths between two
vertices has gathered quite a bit of attention.

A path  ...

==================================
==================================

[Visualizing nested lists for easier human
understanding]\url{http://mathematica.stackexchange.com/questions/34651/vis
ualizing-nested-lists-for-easier-human-understanding}

When interacting with Mathematica, I often find myself staring blankly
at waves of curly braces, trying to understand how data is organized
hierarchically. For example, the beginning of the result to

...

----------------------------

[how to load packages on local computer when using remote
kernels]\url{http://mathematica.stackexchange.com/questions/34966/how-to-lo

I usually works remotely using kernels on our hpc and front-end on my
local laptop. This enable me do relatively large computation within my
laptop(IP address of my laptop may change frequently). But  ...

- asked by xslittlegrass (1 vote)

----------------------------

[Strange behaviour of
InternalInheritedBlock]\url{http://mathematica.stackexchange.com/questions
/34698/strange-behaviour-of-internalinheritedblock}

I was going to post an answer for fast way to replace all zeros in the
matrix. I was even quite happy because timings were the same order of
magnitude as others.

The idea was to overwrite Identity:

...



### 8.11 October 22, 2013

==================================
Top new questions this week:
==================================

[How to remap a fisheye
image?]\url{http://mathematica.stackexchange.com/questions/34264/how-to-rem
ap-a-fisheye-image}

I want to flatten a series of fisheye images by remapping them to a
rectinlinear projection.

To achieve this, I need to be able to remap the pixels of the image
using fisheye correction formulas for  ...

----------------------------

[Using With to scope over pure
functions]\url{http://mathematica.stackexchange.com/questions/34345/using-w
ith-to-scope-over-pure-functions}

Consider this example: given an option for a function func as "x" :&gt;
(a&amp;), how can one assign different values to a locally inside func?

a = False; (* global value of a *)
func[opt_] :=  ...

----------------------------

[How do I place a texture on an irregular 3D
model?]\url{http://mathematica.stackexchange.com/questions/34144/how-do-i-p
lace-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  ...

----------------------------

[Finding a point from a set of contours such that it is nearest to a
given
point]\url{http://mathematica.stackexchange.com/questions/34204/finding-a-p
oint-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?

(*Create the implicit curves*)
...

----------------------------

[Organise a graph's vertices into
levels]\url{http://mathematica.stackexchange.com/questions/34106/organise-a
-graphs-vertices-into-levels}

I would like to organise a graph's vertices in levels. Consider

g = {
0 -&gt; 1, 1 -&gt; 2, 2 -&gt; 3, 0 -&gt; 4, 0 -&gt; 5, 2 -&gt; 6, 2
-&gt; 7, 8 -&gt; 3, 4 -&gt; 9, 5 -&gt; 9,
6 -&gt; 9, 6  ...

----------------------------

[Limit of sequence of functions behaving
strange]\url{http://mathematica.stackexchange.com/questions/34124/limit-of-
sequence-of-functions-behaving-strange}

I'm trying to determine the limit of the sequence of functions

$$f_n(x)=\left(\frac{1}{\pi}\arctan(n x) + 1/2\right)^n.$$

I define

f[x_, n_] := (1/2 + ArcTan[n x]/Pi)^n

And enter

Limit[f[x,  ...

----------------------------

[Extract urls from
list]\url{http://mathematica.stackexchange.com/questions/34484/extract-urls
-from-list}

If I have a list like

how do I get a list of the links inside each element?

Something like

StringCases[list, "http" ~~  ...

==================================
Greatest hits from previous weeks:
==================================

[Are you interested in purchasing David Wagner's "Power programming with
Mathematica"?]\url{http://mathematica.stackexchange.com/questions/16485/are
mat}

I recently contacted McGraw-Hill to see if they have a mechanism in
place for printing out-of-print books that are still of interest.

----------------------------

[How to create new "person
curve"?]\url{http://mathematica.stackexchange.com/questions/17704/how-to-cr
eate-new-person-curve}

Wolfram|Alpha has a whole collection of parametric curves that create
images of famous people. To see them, enter WolframAlpha["person curve"]
into a Mathematica notebook, or person curve into  ...

==================================
==================================

[Exporting graphics to PDF results in destroyed fonts on Windows
8]\url{http://mathematica.stackexchange.com/questions/34303/exporting-graph
ics-to-pdf-results-in-destroyed-fonts-on-windows-8}

Executing

plot = Plot[x^2, {x, 0, 100}, PlotLabel -&gt; "Plot"];
SetDirectory[NotebookDirectory[]];
Export["plot.pdf", plot, "PDF"];

results in

Is this a bug? OS is Windows 8, 64bit.

- asked by Frederik Ziebell (1 vote)

----------------------------

ines-do-not-show-up}

For a list list = {{"a", "b", "c"}, {"d", "e"}}; Table heading lines do
not show up

But it works if the list list = {{"a", "b", "c"}, {"d", "e",  ...

----------------------------

[Syntax for
FrontEndSelectionSetStyle]\url{http://mathematica.stackexchange.com/questi
ons/34297/syntax-for-frontendselectionsetstyle}

I know FrontEndSelectionSetStyle is undocumented, but its name suggests
it does what I need. What is its syntax?

I have already tried several variations of the following button on some
selected code  ...

- asked by Hector (2 votes)

### 8.12 October 15, 2013

==================================
Top new questions this week:
==================================

[Strip waste braces in nested
list]\url{http://mathematica.stackexchange.com/questions/33837/strip-waste-
braces-in-nested-list}

I have nested lists wherein there are a lot of waste levels which looks
like

l = {{{{{{2, 2}}, 3}, 2, {{2, 33}}, 4, 5}}};

I would like to reduce it to somthing like

l = {{{2, 2}, 3}, 2, {2, 33},  ...

----------------------------

[How to get intersection values from a parametric
graph?]\url{http://mathematica.stackexchange.com/questions/33947/how-to-get
-intersection-values-from-a-parametric-graph}

I have this graphed:

ParametricPlot[{2.4*Cos[t] + 1.6*Cos[3 t/2], 2.4*Sin[t] - 1.6 Sin[3
t/2]}, {t, 0, 4*Pi}]

It is a star, and the lines cross each other twice in the third

----------------------------

[Mathematica gives wrong result while Wolfram|Alpha is
correct]\url{http://mathematica.stackexchange.com/questions/33866/mathemati
ca-gives-wrong-result-while-wolframalpha-is-correct}

Why does Mathematica and Wolfram|Alpha give different results based upon
the same code?

I know Wolfram|Alpha's 7.85 is correct.

----------------------------

[Replace elements in list not matching elements of another list at the
same
position]\url{http://mathematica.stackexchange.com/questions/33731/replace-
elements-in-list-not-matching-elements-of-another-list-at-the-same-posit
> }

I would like to compare two arrays:

m = {a,b,c,d,d,f};
n = {b,b,a,d,d,e};

and get:

{0,b,0,d,d,0}

I have tried all kinds of things, like:

m = {a,b,c,d,d,f};
n = {b,b,a,d,d,e};
Transpose[{m,  ...

----------------------------

[How can I type-check the arguments of a Mathematica
function?]\url{http://mathematica.stackexchange.com/questions/33884/how-can
-i-type-check-the-arguments-of-a-mathematica-function}

(For educational purposes) I defined the following functions:

Translation (in $\mathbb{R}^2$):

trM[vec_] := {{1, 0, vec[[1]]}, {0, 1, vec[[2]]}, {0, 0, 1}}

Rotation (in $\mathbb{R}^2$):

...

----------------------------

[How to bend a logarithmic number line into a
circle]\url{http://mathematica.stackexchange.com/questions/33924/how-to-ben
d-a-logarithmic-number-line-into-a-circle}

One way to plot a sequence of numbers on a logarithmic number line is
this:

LogLogPlot[0, {t, 8, 16}, Axes -&gt; {True, False},
Ticks -&gt; {{8, 9, 10, 11, 12, 13, 14, 15, 16}}]

How can the  ...

----------------------------

[Is there a way to find out who is importing a
package?]\url{http://mathematica.stackexchange.com/questions/33949/is-there
-a-way-to-find-out-who-is-importing-a-package}

After calling some functions, if I look into $ContextPath, I can see that JLink is in there. Is there a way to find out what sequence of functions calls (like a stack-trace) imported a particular ... - asked by Adal (9 votes), answered by Leonid Shifrin (8 votes) ================================== Greatest hits from previous weeks: ================================== [How can I extract data points from a black and white image?]\url{http://mathematica.stackexchange.com/questions/3831/how-can-i-e xtract-data-points-from-a-black-and-white-image} Consider the following graph (source): Is there any way to extract the data points from this image in a semi-automatic way? I have seen, and tried the methods suggested in this question, but they ... - asked by Eli Lansey (29 votes), answered by Sjoerd C. de Vries (33 votes) ---------------------------- [Finding the centroid of the area between two curves]\url{http://mathematica.stackexchange.com/questions/17170/finding-th e-centroid-of-the-area-between-two-curves} When I have an area bounded by curves, is there a built-in way to find the center of the area? Or do I have to plot it first and then use ComponentMeasurements on it? For example: the area under$y=  ...

==================================
==================================

[How can I find the source of a memory
leak?]\url{http://mathematica.stackexchange.com/questions/33707/how-can-i-f
ind-the-source-of-a-memory-leak}

I found a really weird issue using NDSolveProcessEquations inside
module.

We start by setting HistoryLength to 0. After this we define a function
which takes in an integer and creates a Table of  ...

----------------------------

[Is there something like
MaxProcessorUsed?]\url{http://mathematica.stackexchange.com/questions/33775
/is-there-something-like-maxprocessorused}

For standard procedures it is easy to test if the implementation is
better or worse than other by using Timing etc.

It does not help us with creating Dynamic interfaces/visualisations.
Sometimes it  ...

----------------------------

[How does Mathematica estimate error on fit
parameters?]\url{http://mathematica.stackexchange.com/questions/33685/how-d
oes-mathematica-estimate-error-on-fit-parameters}

When performing a fit using NonlinearModelFit (or any of Mathematica
fitting functions, but I am particularly interested in nonlinear
models), Mathematica makes a covariance matrix available for all  ...

- asked by ydl (1 vote)

### 8.13 October 1, 2013

==================================
Top new questions this week:
==================================

[Compiling ColorFunction for faster complex phase-amplitude
plots]\url{http://mathematica.stackexchange.com/questions/32977/compiling-c
olorfunction-for-faster-complex-phase-amplitude-plots}

I have gotten into the habit of plotting complex-valued functions on a
plane using a color-function along the lines of

Function[{z}, Hue[Arg[z]/(2 Pi), 1, Abs[z]]].

For example, the following code  ...

----------------------------

[Pattern to match L, but not
L[_]]\url{http://mathematica.stackexchange.com/questions/33025/pattern-to-m
atch-l-but-not-l}

I have an expression where I want to replace L but not L[_]

For example, the following doesn't work and

sub = {L :&gt; 2};
L + L[tilde] /. sub
(* 2 + 2[tilde], but I want 2 + L[tilde]*)

Is there  ...

----------------------------

[Is there a Mathematica barcode

Is there a Mathematica barcode image reader (much like TextRecognize)
that allows the user to enter an image of a barcode and then read it to
get an output string?

----------------------------

[How to enlarge $\it{Mathematica}$'s knowledge about certain
functions?]\url{http://mathematica.stackexchange.com/questions/33251/how-to

I'm often troubled with the following task. I need to carry out
symbolical computations involving certain special functions. Let me take
as an example Barnes gamma-function. It is included in  ...

----------------------------

[Labeling a three-dimensional
plot]\url{http://mathematica.stackexchange.com/questions/33236/labeling-a-t
hree-dimensional-plot}

As the title says, I want to add some text in a three-dimensional plot,
thus labeling specific parts of it. Here is the corresponding
Mathematica code

V = 1/2*(x^2 + y^2 + z^2) + (x^2*y^2 + x^2*z^2 +  ...

----------------------------

[Mathematica: computing a difficult
integral]\url{http://mathematica.stackexchange.com/questions/33217/mathemat
ica-computing-a-difficult-integral}

I am trying to compute the following integral:

Integrate[Exp[Sum[-((cw*\[Lambda] - b[i])^2/(2*\[Sigma]^2)), {i, 1, n}]], {cw, 0, 1}]

And currently Mathematica outputs

(Sqrt[\[Pi]/2]\[Sigma](Erf[(Sqrt[n](\[Lambda]-

----------------------------

[How to always display current section identifier (number, name) in
notebook?]\url{http://mathematica.stackexchange.com/questions/33173/how-to-
always-display-current-section-identifier-number-name-in-notebook}

Because I find myself relocating frequently within a long notebook
divided into sections, subsections, &amp; subsubsections, I would like
to display the identifying information for the section, etc.  ...

==================================
Greatest hits from previous weeks:
==================================

[Plotting Complex Quantity
Functions]\url{http://mathematica.stackexchange.com/questions/3458/plotting
-complex-quantity-functions}

Trying to plot with complex quantities seems not to work properly in
what I want to accomplish. I would like to know if there is a general
rule/way of plotting when you have complex counterparts in  ...

----------------------------

[How can I extract data points from a black and white
image?]\url{http://mathematica.stackexchange.com/questions/3831/how-can-i-e
xtract-data-points-from-a-black-and-white-image}

Consider the following graph (source):

Is there any way to extract the data points from this image in a
semi-automatic way? I have seen, and tried the methods suggested in this
question, but they  ...

==================================
==================================

[How to embed graphic-element-specific metadata within a Graphics
object?]\url{http://mathematica.stackexchange.com/questions/33207/how-to-em

One of the most crucial requirements for rich, interactive scientific
graphics is being able to "annotate" individual graphic elements (e.g.
the data points of a scatterplot, the individual curves in  ...

- asked by kjo (1 vote)

----------------------------

[How to compute the Lovasz number for the given graph in
Mathematica?]\url{http://mathematica.stackexchange.com/questions/33010/how-
to-compute-the-lovasz-number-for-the-given-graph-in-mathematica}

Here is a graph whose adjacency matrix is

m = {
{0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0},
{0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1},
{0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1,  ...

----------------------------

[NDSolve error when solving
pde]\url{http://mathematica.stackexchange.com/questions/33166/ndsolve-error
-when-solving-pde}

I am trying to calculate speed of viscous fluid in a rotating hollow
sphere. The sphere is rotating round z axis. The fluid is
incompressible. I used Navier-Stockes equations. The only boundry  ...

- asked by Jure (1 vote)

==================================
New blog post:
==================================

[Plotting electronic orbitals using
Mathematica]\url{http://mathematica.blogoverflow.com/2013/09/plotting-elect
ronic-orbitals-using-mathematica/} by Jason B on Sep 27


### 8.14 September 24, 2013

==================================
Top new questions this week:
==================================

[Reconstruct text pages cut by
shredder]\url{http://mathematica.stackexchange.com/questions/32612/reconstr
uct-text-pages-cut-by-shredder}

Q1: I have a page of printed text file, but it was cut by a paper
shredder (from top to bottom). You can download all the paper fragment
here. There are some examples of them. How can I reconstruct  ...

----------------------------

[Generate a Random
Polygon]\url{http://mathematica.stackexchange.com/questions/32767/generate-
a-random-polygon}

Does some package exist with a function that takes a parameter $n$ and
generates a random 2D $n$-sided simple polygon (convex or non-convex),
possibly within a certain bounding box?

It does not  ...

----------------------------

[How to examine the structure of Graphics
objects]\url{http://mathematica.stackexchange.com/questions/32716/how-to-ex
amine-the-structure-of-graphics-objects}

One difficulty I'm encountering in studying the structure of Graphics
objects is that I have not yet found a way to print or display such
structure that is sufficiently general.

The FullForm of  ...

----------------------------

[Size distribution of nanoparticles from a transmission electron
microscopic
image]\url{http://mathematica.stackexchange.com/questions/32830/size-distri
bution-of-nanoparticles-from-a-transmission-electron-microscopic-imag}

I have found a research article about Martian sand grain size
determination from the image using Mathematica (Figure 2 in the linked
article). They have not provided any detail of the methodology. It  ...

----------------------------

[Slideshow mode: how to cycle slides
automatically?]\url{http://mathematica.stackexchange.com/questions/32768/sl
ideshow-mode-how-to-cycle-slides-automatically}

I'm doing a slideshow for an informative conference, so I need a
slideshow running in background on some monitors.

My question is: is there any way to make Mathematica to cycle slides
automatically?
...

----------------------------

[What's the cleanest functional-programming style way to perform this
list
operation?]\url{http://mathematica.stackexchange.com/questions/32675/whats-
the-cleanest-functional-programming-style-way-to-perform-this-list-opera
t}

I am looking for the correct method for accomplishing the unknown piece
in the following code snippet:

rolls = Tuples[Range[1, 4], {2}]

{{1, 1}, {1, 2}, {1, 3}, {1, 4}, {2, 1}, {2, 2}, {2, 3}, {2,  ...

----------------------------

[Solving Killing
equations]\url{http://mathematica.stackexchange.com/questions/32843/solving
-killing-equations}

Is it possible to solve Killing equations in Mathematica for a general
vector?

I am looking for a way to create Killing equations and then find what
the vectors are, but I have a problem with this.

...

==================================
Greatest hits from previous weeks:
==================================

[xkcd-style
graphs]\url{http://mathematica.stackexchange.com/questions/11350/xkcd-style
-graphs}

I received an email to which I wanted to respond with a xkcd-style
graph, but I couldn't manage it. Everything I drew looked perfect, and I
don't have enough command over PlotLegends to have these  ...

----------------------------

[How to compile
effectively?]\url{http://mathematica.stackexchange.com/questions/1803/how-t
o-compile-effectively}

What are the best practices of compiling functions? I understand that
this is a vague question, but let me list some aspects that might

==================================
==================================

[NDSolve and memory
usage]\url{http://mathematica.stackexchange.com/questions/32640/ndsolve-and
-memory-usage}

After some googling, i've found similar problems around, but didn't find

I'd like to solve a 1+1 problem using the method of lines. In spherical
...

----------------------------

[How to simplify really complicated symbolic
expression?]\url{http://mathematica.stackexchange.com/questions/32759/how-t
o-simplify-really-complicated-symbolic-expression}

I have an expression that contains Sinh[x], Cosh[x] and Sin[g], and I
want to simplify it into an easier form, based on the physics situation
(I am doing some general relativity calculation), I know  ...

- asked by Jason (1 vote)

----------------------------

[When should I begin a new line for more readable
code]\url{http://mathematica.stackexchange.com/questions/32870/when-should-

After a quick coding, I often try a lot of line feeds patterns on it.
And no matter how much I do, there's seems to be no end in sight.

Front end automatically indents the code, but I cannot fully  ...

- asked by asoldat (4 votes)

### 8.15 September 17, 2013

==================================
Top new questions this week:
==================================

[Is it possible to use RandomChoice to choose without other choices
being
evaluated?]\url{http://mathematica.stackexchange.com/questions/32175/is-it-
possible-to-use-randomchoice-to-choose-without-other-choices-being-evalu
at}

I'm trying to do this:

i1 = 1;
i2 = 1;

RandomChoice[{
(i1 = i1 + 1),
(i1 = i1 - 1),
(i2 = i1 + 1),
(i2 = i2 - 1)}]

In order to chose randomly which variable is going to be incremented or
...

----------------------------

[Color Histogram3D by Bin
Location]\url{http://mathematica.stackexchange.com/questions/32460/color-hi
stogram3d-by-bin-location}

I am using a Histogram3D plot to view the correlation of the R &amp; G
of an RGB image.  Naturally, I want the bins to have a color
corresponding to their $x$, $y$ (R,G) position on the chart.

...

----------------------------

[Method -> {"AxesInFront" -> False} for
Graphics3D]\url{http://mathematica.stackexchange.com/questions/32168/method
-axesinfront-false-for-graphics3d}

I'm aware of two ways to manage positioning of Axes for Graphics3D:
AxesOrigin and AxesEdge. They seem to be quite different in terms of
what is actually happening:

GraphicsRow[{
...

----------------------------

[Why does Mathematica return a Fourier transform for a function for
which it is not
defined?]\url{http://mathematica.stackexchange.com/questions/32387/why-does
-mathematica-return-a-fourier-transform-for-a-function-for-which-it-is-n
> }

The following function

$$g(x) = (1 + x^{1/a} )^a$$

should NOT have a Fourier transform, as far as I am aware, for any real
values of $a$ since $g(x)$ is not nice in the sense of decays quickly
...

----------------------------

[Find eigen energies of time-independent Schrodinger
equation]\url{http://mathematica.stackexchange.com/questions/32293/find-eig
en-energies-of-time-independent-schrodinger-equation}

I'm trying to get the eigenvalues of a one dimensional time-independent
Schrodinger equation,

$-\frac{h^2}{2m_0}\frac{d^2\psi}{dx^2}+U(x)~\psi=Ei~\psi$

where U(x) is some potential and Ei is the  ...

----------------------------

[Is there a triangle like
this?]\url{http://mathematica.stackexchange.com/questions/32338/is-there-a-
triangle-like-this}

I want to find the numbers $a$, $b$, $c$, $d$ of the function $y = \dfrac{a x + b}{c x + d}$ so that the triangle $ABC$ with three points
$A$, $B$, $C$  have integer coordinates and lies on the graph  ...

----------------------------

[Unexpected behaviour of Solve applied to two equations in two
variables]\url{http://mathematica.stackexchange.com/questions/32246/unexpec
ted-behaviour-of-solve-applied-to-two-equations-in-two-variables}

I have a simple Mathematica expression

Solve[{a(a-1)Sqrt[1+a^2+b^2] == b(a^3-1), b(b-1)Sqrt[1+a^2+b^2] ==
a(b^3-1)}]

which returns (on version 8.0, and also version 9.0)

{{b -&gt; -(a/(1 + a))},  ...

==================================
Greatest hits from previous weeks:
==================================

[Finding the centroid of the area between two
curves]\url{http://mathematica.stackexchange.com/questions/17170/finding-th
e-centroid-of-the-area-between-two-curves}

When I have an area bounded by curves, is there a built-in way to find
the center of the area? Or do I have to plot it first and then use
ComponentMeasurements on it?

\text{Li}_2\left(-1+\sqrt{2}\right)$. This turns out to be equivalent to$\displaystyle\log^2(1+\sqrt{2})-\frac{\pi^2}{4}$. How ... - asked by Oliver (3 votes) ---------------------------- [Why does NetworkGraphPlotwrapper appear in my GraphPlot?]\url{http://mathematica.stackexchange.com/questions/46377/why-do es-networkgraphplotwrapper-appear-in-my-graphplot} I'm making a GraphPlot of data similar to this: gpd = ... - asked by ArgentoSapiens (1 vote) ---------------------------- [Simplifying trig expressions containing Sqrt or Abs]\url{http://mathematica.stackexchange.com/questions/46560/simplifying-t rig-expressions-containing-sqrt-or-abs} The following Maple code can simplify abs(sin(x)) into -sin(x) given the condition -3Pi/4 &lt; x &lt; -Pi/2 simplify(abs(sin(x))) assuming -3*Pi &lt; x, x &lt; -5*Pi/2; I tried what I thought would ... - asked by mathe (6 votes)  ### 8.22 April 8, 2013 ================================== Top new questions this week: ================================== [Sketch-type graphics with transparency and dashed hidden lines?]\url{http://mathematica.stackexchange.com/questions/45410/sketch-typ e-graphics-with-transparency-and-dashed-hidden-lines} I'd like to create transparent graphs like the following from P1095, Calculus 6th Ed, by James Stewart. Can Mathematica accomplish this? By "transparent," I mean the ability to see the interior, ... - asked by LePressentiment (18 votes), answered by Silvia (35 votes) ---------------------------- [Animating moving surface of torus]\url{http://mathematica.stackexchange.com/questions/45417/animating-m oving-surface-of-torus} I would like to try to recreate something similar to Paolo eri's torus animation: I have isolated the moving surface torus section form this Wolfram Demonstration by Kevin Sonnanburg: t = s; s = ... - asked by martin (11 votes), answered by Kuba (15 votes) ---------------------------- [Fit two intersecting straight lines in Mathematica]\url{http://mathematica.stackexchange.com/questions/45401/fit-t wo-intersecting-straight-lines-in-mathematica} I am trying to do a Kurie analysis of the double beta decay of Strontium-90. Here we have two straight sections, and I need to obtain a value for the intersection along with an error for it. I ... - asked by ephimetheus (11 votes), answered by Vitaliy Kaurov (13 votes) ---------------------------- [Plotting Fourier spectrum versus frequency of a signal]\url{http://mathematica.stackexchange.com/questions/45502/plotting-f ourier-spectrum-versus-frequency-of-a-signal} I have looked around here, and i am sure this has been answered, but i don't understand it. The thing is, I have taken a introductory signal processing course, and we had to use Mathematica, and i had ... - asked by mickey (10 votes), answered by Vitaliy Kaurov (17 votes) ---------------------------- [Wikipedia People only search]\url{http://mathematica.stackexchange.com/questions/45393/wikipedia- people-only-search} I am trying to search people from Wikipedia(For example .*John.* in REGEX). The following query is close, but it isn't generalized like .*John.* and only gives back historic figures that have ... - asked by Liam William (8 votes), answered by Michael Hale (8 votes) ---------------------------- [Smoothing ListContourPlot contours]\url{http://mathematica.stackexchange.com/questions/45519/smoothin g-listcontourplot-contours} I have some data of type {{x1, y1, f1}, {x2, y2, f2}, ...} and want to do ListContourPlot. However, there is a problem that the data f is not smooth enough and has small errors. Here is a toy ... - asked by Yi Wang (7 votes), answered by Rahul Narain (8 votes) ---------------------------- [Half-delayed evaluation]\url{http://mathematica.stackexchange.com/questions/45361/half-d elayed-evaluation} In a certain wider context, I need to make some delayed definitions, such as x := a + b + c, but within these definitions I want a and b to be evaluated to their current values, not their later ... - asked by Dror Bar-Natan (7 votes), answered by WReach (5 votes) ================================== Greatest hits from previous weeks: ================================== [How do I plot coordinates (latitude and longitude pairs) on a geographic map?]\url{http://mathematica.stackexchange.com/questions/2076/how-do-i-plot -coordinates-latitude-and-longitude-pairs-on-a-geographic-map} I'm attempting for the first time to create a map within Mathematica. In particular, I would like to take an output of points and plot them according to their lat/long values over a geographic map. I ... - asked by Peter House (36 votes), answered by kguler (24 votes) ---------------------------- [What are the most common pitfalls awaiting new users?]\url{http://mathematica.stackexchange.com/questions/18393/what-are-t he-most-common-pitfalls-awaiting-new-users} As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ... - asked by belisarius (134 votes), answered by Michael E2 (67 votes) ================================== Can you answer these? ================================== [How to not include data value outside plot range in the plot]\url{http://mathematica.stackexchange.com/questions/45537/how-to-not-i nclude-data-value-outside-plot-range-in-the-plot} Consider this list plot ls = Table[Sin[t], {t, 0, 100, 0.1}]; p = ListPlot[ls, PlotRange -&gt; {{0., 0.1}, All}, DataRange -&gt; {0, 1}, Joined -&gt; True] If we look at the data in the plot, we ... - asked by xslittlegrass (2 votes) ---------------------------- [Finding undetermined coefficients with boundary conditions]\url{http://mathematica.stackexchange.com/questions/45219/findin g-undetermined-coefficients-with-boundary-conditions} I have 2 equations which are; To[x_] := c1 E^(-a1 x)/2 + c2 E^(a1 x)/2 + a2 Tu[x_] := c3 E^(-a3 x)/2 + c4 E^(a3 x)/2 Tu equals almost zero (10^-6) at end of the wires. To must be equal to Tu at ... - asked by CanYusuf (1 vote) ---------------------------- [Why does setting$Assumptions make my Fourier transforms
slow?]\url{http://mathematica.stackexchange.com/questions/45258/why-does-se
tting-assumptions-make-my-fourier-transforms-slow}

Consider these Fourier transforms

AbsoluteTiming[FourierTransform[Exp[(-I)*\[Omega]0*t]*Exp[-t^2], t, \[Omega]]; ]
AbsoluteTiming[FourierTransform[Exp[(-I)*\[Omega]0*t]*Exp[-(t/T0)^2], t, \[Omega]]; ]
...

- asked by xslittlegrass (2 votes)