home
PDF (letter size)
PDF (legal size)

## Archive of Mathematica weekly newsletters

March 21, 2017 compiled on — Tuesday March 21, 2017 at 02:08 PM [public]

### 1 Tuesday, March 21, 2017

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

[V11.1: Effective methods to use paid functions economically] http://mathematica.stackexchange.com/questions/140261/v11-1-effective-methods-to-use-paid-functions-economically

In the newly released version 11.1, Mathematica introduces three new functions: WebSearch, WebImageSearch and TextTranslation that requires Service Credits. While I haven't found much information ...

—————————-

[How do I disable the stack tracing feature in Mathematica 11?] http://mathematica.stackexchange.com/questions/140285/how-do-i-disable-the-stack-tracing-feature-in-mathematica-11

Bug was introduced in 11.0 and persisting through 11.1

It looks like the Mathematica 11 stack tracing feature (see red ellipsis in front of any warning message) prevents the garbage collector from ...

—————————-

Generative adversarial networks (GAN) is regarded as one of ”the most interesting idea in the last ten years in machine learning” by Yann LeCun. It can be used to generate photo-realistic images that ...

—————————-

I would like to show the iterative stages of infection for problem 2 in this link.

In case the link dies, I have copied the text for the problem below:

One hundred computers are connected in a ...

—————————-

[how to remove the little × that shows up in frontend when typing?] http://mathematica.stackexchange.com/questions/140583/how-to-remove-the-little-x-that-shows-up-in-frontend-when-typing

Version 11.1 now shows a little grayed out x (a multiplication sign) when one is editing something, to warn them that the expression will be interpreted as the multiplication of what precedes and ...

—————————-

[Delete redundant x,y pairs] http://mathematica.stackexchange.com/questions/140571/delete-redundant-x-y-pairs

Working through the problems from Hazrat's Mathematica book and there's a simple exercise to find all the square numbers where yields as an integer (I think they're also called ...

—————————-

[Getting Compile to work with Visual Studio 2017 Community Edition] http://mathematica.stackexchange.com/questions/140071/getting-compile-to-work-with-visual-studio-2017-community-edition

The new Visual Studio is out since a week and I tried to get it to work with Mathematica (v 11.0). However the usual tricks for working with a new VS version fail here.

Related seems to be the ...

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

[1 Plot, 2 Scale/Axis] http://mathematica.stackexchange.com/questions/627/1-plot-2-scale-axis

I would like to plot those two datasets on top of each other. But they have very different range on the axis. How can I have two different axis?

I found the following on the help menu but quite ...

—————————-

[Assign the results from a Solve to variable(s)] http://mathematica.stackexchange.com/questions/6669/assign-the-results-from-a-solve-to-variables

I understand Mathematica can't assign the results of a Solve to the unknowns because there may be more than 1 solution. How can I assign the 4 values of following result to variables?

================================== Can you answer these? ==================================

[Explaining error when using Part inside Module in Dataset] http://mathematica.stackexchange.com/questions/140541/explaining-error-when-using-part-inside-module-in-dataset

I have a vague recollection of seen an explanation for this, but I can not find it, so it may be a false memory. Will delete if duplicated.

Let ds be a simple Dataset

ds = Dataset@Table[
...

—————————-

[Performance-driven approach to using Big Data without killing the hard-drive] http://mathematica.stackexchange.com/questions/140114/performance-driven-approach-to-using-big-data-without-killing-the-hard-drive

Situation

A calculation has to be done in which the amount of data is too much to fit into memory. Fortunately, only a part of the overall data set has to be known at a time. The preprocessing is ...

—————————-

[Bug with PlotLegends-¿Placed in GraphicsRow] http://mathematica.stackexchange.com/questions/140539/bug-with-plotlegends-placed-in-graphicsrow

Bug introduced in 11.0 and persisting through 11.1

The FrontEnd of Mathematica 11.1.0 on my Windows 7 box runs permanently at 100% CPU when I execute the following command:

...

### 2 Tuesday, March 14, 2017

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

[How to implement a discrete data representation?] http://mathematica.stackexchange.com/questions/139818/how-to-implement-a-discrete-data-representation

I'm currently working with large datasets of ”discrete data”. Each of these is a multiset of real numbers of the form , where is an integer, and (the ”scale”) and (the ”bias”) are ...

—————————-

[Mathematica incorrectly giving zero for partial derivative] http://mathematica.stackexchange.com/questions/139669/mathematica-incorrectly-giving-zero-for-partial-derivative

Bug introduced in 9.0.1 or earlier

Mathematica is incorrectly reporting that the partial derivative of a certain expression is zero.

I try to compute the following:

D[SymmetricPolynomial[3, {x1,  ...

—————————-

[Finding vampire numbers] http://mathematica.stackexchange.com/questions/139808/finding-vampire-numbers

How to find vampire numbers by using Mathematica?

A number with an even number of digits formed by multiplying a pair of -digit numbers (where the digits are taken from the ...

—————————-

[Why do subsequent evaluations seem to be stopped by a False Condition (/;)?] http://mathematica.stackexchange.com/questions/139461/why-do-subsequent-evaluations-seem-to-be-stopped-by-a-false-condition

Exploring another problem and this example of @halirutan, I came across an evaluation behavior I don't understand.

When g[] below is evaluated the first time, ig[] is evaluated and a message printed; ...

—————————-

[Bug? Numerical calculation error with FullSimplify and arbitrary precision] http://mathematica.stackexchange.com/questions/139697/bug-numerical-calculation-error-with-fullsimplify-and-arbitrary-precision

Bug introduced after 5.2, fixed in 8.0, reintroduced in 9.0 and persisting through 11.0.1

Is this a bug?

If I do

FullSimplify[n E^(010 n)]

then it returns

n/2

what is obviously incorrect.

...

—————————-

[Is there a convention on which name to use for a throwaway variable? (Like underscore in Python)] http://mathematica.stackexchange.com/questions/139622/is-there-a-convention-on-which-name-to-use-for-a-throwaway-variable-like-under

I would prefer to write {_, foo} = LongFunctionName[arg1, arg2] instead of
foo = LongFunctionName[arg1, arg2][[2]] or foo = Last @ LongFunctionName[arg1, arg2].
Using an actual name for the throwaway  ...

—————————-

[Extract images from large avi movies (50-100 GB)] http://mathematica.stackexchange.com/questions/139819/extract-images-from-large-avi-movies-50-100-gb

I will get large RGB avi files (35 Hz, 1600*1200 pixels) of up to 100 GB size. All three channels contain the same grayscale image.

I want to extract each avi file into one channel png images.

To do ...

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

[How to tell Mathematica that certain variables are real/imaginary, integer-valued, etc] http://mathematica.stackexchange.com/questions/66273/how-to-tell-mathematica-that-certain-variables-are-real-imaginary-integer-value

I'm trying to expedite some quantum mechanical calculations by running them through Mathematica. Expectation values and stuff like that. When I say, for example,

u[x_] := Sqrt[2/L] * Sin[Pi * n * x /  ...

—————————-

[Where can I find examples of good Mathematica programming practice?] http://mathematica.stackexchange.com/questions/18/where-can-i-find-examples-of-good-mathematica-programming-practice

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...

================================== Can you answer these? ==================================

[Integrating rational functions of several variables over ] http://mathematica.stackexchange.com/questions/139631/integrating-rational-functions-of-several-variables-over-mathbbh4

Let be a rational function of variables from this file, e.g.:

W = (256*b*d*f*(a^5 + b^4*(c - 2*e) - a^4*(3*c + 2*e) - c*(c^2 + d^2)*(e^2 + f^2) + a^3*(2*b^2 + 3*c^2 + d^2 +  ...

—————————-

[Best Wolfram tool for interactive web-based calculator] http://mathematica.stackexchange.com/questions/139954/best-wolfram-tool-for-interactive-web-based-calculator

A colleague is considering re-implementing this online ”Photon Propulsion Calculator” using a Mathematica-based product. I wanted to ask the community which product would be best.

WebMathematica

...

—————————-

[How to get rid of a built-in context from autocomplete?] http://mathematica.stackexchange.com/questions/139783/how-to-get-rid-of-a-built-in-context-from-autocomplete

I have noticed that when I type the name of built-in function Limit in Mathematica, the autocomplete suggests two variants at the top: the first one is the working one, and the second one is just ...

### 3 Tuesday, March 7, 2017

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

[What are some common issues with fitting functions to data?] http://mathematica.stackexchange.com/questions/139038/what-are-some-common-issues-with-fitting-functions-to-data

Mathematica has numerous functions designed to, or capable of, fitting known functions, and finding unknown functions to match data sets. What are some common issues that come with finding those fits? ...

—————————-

[Notebook's TaggingRules inherit too much] http://mathematica.stackexchange.com/questions/139017/notebooks-taggingrules-inherit-too-much

Bug introduced in V10.4 or earlier and persisting through 11.0.1

[CASE:3852725] was created

[...] I have forwarded an incident report to our developers with the information you provided. ...

—————————-

[Is ExportString defective in V11?] http://mathematica.stackexchange.com/questions/138932/is-exportstring-defective-in-v11

Mathematica doesn't do the best job of exporting figures with shading or transparency to vector graphics formats such as PDF.

A common trick employed here and elsewhere on the web to workaround this ...

—————————-

[Commands to stop and continue evaluation without Debugger] http://mathematica.stackexchange.com/questions/139377/commands-to-stop-and-continue-evaluation-without-debugger

I would like to stop the evaluation somehwere at a specifiy line in a notebook. Then I could for example check the state of some variables.

After that I would like to continue the evaluation from the ...

—————————-

[How am I misusing EvenQ, or, how are EvenQ and (Mod[2,#]==0)& differently evaluated?] http://mathematica.stackexchange.com/questions/139281/how-am-i-misusing-evenq-or-how-are-evenq-and-mod2-0-differently-evalua

While working on a problem, I was using EvenQ in a RegionPlot. I came across this interesting case (simplified here for specificity). I expected to see a bunch of stripes, but got nothing:

...

—————————-

[Partition a list by count of a number] http://mathematica.stackexchange.com/questions/138905/partition-a-list-by-count-of-a-number

I want to take this list when the 2 appear 3 times

SeedRandom[1]
list = RandomChoice[{.2, .5, .3} -&gt; {1, 2, 3}, 20]

{3,1,3,1,2,1,2,2,2,3,2,3,2,2,3,3,3,2,2,2}

Hope to get {{3, 1, 3, 1, 2, 1,  ...

—————————-

[Why SciDraw can not handle the StreamPlot?] http://mathematica.stackexchange.com/questions/138926/why-scidraw-can-not-handle-the-streamplot

I find that the package SciDraw is suitable for preparing the figure in the thesis. When I use it to plot the line, it works well. For example

<<SciDraw
...

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

[How to express trigonometric equation in terms of of given trigonometric function?] http://mathematica.stackexchange.com/questions/434/how-to-express-trigonometric-equation-in-terms-of-of-given-trigonometric-functio

How can I express a trigonometric equation / identity in terms of a given trigonometric function?

using following trigonometric identities

Sin[x]^2+Cos[x]^2==1
Sin[x]/Cos[x]==Tan[x]
...

—————————-

[Calculate the 2D Fourier transform of an Image] http://mathematica.stackexchange.com/questions/29203/calculate-the-2d-fourier-transform-of-an-image

I am new to Mathematica, and using version 8.0.

I would like to calculate the 2D Fourier Transform of an Image with Mathematica and plot the magnitude and phase spectrum, as well as reconstruct the ...

================================== Can you answer these? ==================================

[Two-Point correlation function of Ising data is not giving expected results] http://mathematica.stackexchange.com/questions/139016/two-point-correlation-function-of-ising-data-is-not-giving-expected-results

Due to the nature of my problem, and readers perhaps not having a physics background, I need to give some context to my problem which is intrinsic to it. The problem however is not a physics one, but ...

—————————-

[Evaluating an expectation expressed by a difficult expression] http://mathematica.stackexchange.com/questions/138917/evaluating-an-expectation-expressed-by-a-difficult-expression

Background

I have a 2-dimensional space. The receiver is at the center. The locations of transmitters are given by the PPP with density . The serving transmitter is the one that is ...

—————————-

[How to control indentation of a cell relative to it's parent?] http://mathematica.stackexchange.com/questions/138971/how-to-control-indentation-of-a-cell-relative-to-its-parent

Is there a stylesheet property that can be set to control the extra level of indentation of a cell in its group (I don't want to specify absolute CellMargins)?

Carl suggests in the comments to use ...

### 4 Tuesday, February 28, 2017

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

[Parallelize Map and ParallelMap] http://mathematica.stackexchange.com/questions/138476/parallelize-map-and-parallelmap

Bug introduced in 8.0 and persisting through 11.0.1 or later

It is stated in the documentation that

Parallelize[Map[f, expr]] is equivalent to ParallelMap[f, expr].

—————————-

This is a bid at creating a canonical Q&A.

Many questions have been asked that come down to the fact that Thread evaluates its first argument before threading is attempted. In a few minutes I ...

—————————-

[Learn Mathematica (Wolfram) Language in one day] http://mathematica.stackexchange.com/questions/138366/learn-mathematica-wolfram-language-in-one-day

Currently I am trying to learn Python. Searching for relevant material I came across

X in Y minutes

and books with titles such as Learn Python in one day, in 24 hours, etc.

Similar material exists ...

—————————-

[Puzzle — 20 People to consume 20 units of food under constraints] http://mathematica.stackexchange.com/questions/138637/puzzle-20-people-to-consume-20-units-of-food-under-constraints

I am learning Mathematica because I love it. I also love solving puzzles so I think it would be a nice way to learn Mathematica through puzzles. This is first puzzle in series I intend to solve.

So ...

—————————-

[Compute the curvature of a bent stack of paper] http://mathematica.stackexchange.com/questions/138583/compute-the-curvature-of-a-bent-stack-of-paper

My goal is to link the curvature of a bent stack of paper in a wind tunnel to its bending modulus , knowing all the other physical properties. To this end, I would like to reproduce the numerical ...

—————————-

[WordOrientation does not work in v11?] http://mathematica.stackexchange.com/questions/138811/wordorientation-does-not-work-in-v11

Bug introduced in 11.0.1

It seems that WordOrientation does not work in v11. The sample code

input = ExampleData[{"Text", "AliceInWonderland"}];
WordCloud[input, WordOrientation -&gt; "Random"]

...

—————————-

[Code request: Make ”copy formatted code” bulletproof] http://mathematica.stackexchange.com/questions/138436/code-request-make-copy-formatted-code-bulletproof

With the GeneralUtilities‘PrintDefinitions functions comes a usable code formatting engine. On this site, most of the time we share code. I believe it would be awesome to have a robust button that ...

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

[Why round to even integers?] http://mathematica.stackexchange.com/questions/2116/why-round-to-even-integers

According to the Mathematica help:

Round rounds numbers of the form x.5 toward the nearest even integer.

For example:

Round[{0.5, 1.5, 2.5, 3.5, 4.5}]

gives

{0, 2, 2, 4, 4}

What's the ...

—————————-

[Assign the results from a Solve to variable(s)] http://mathematica.stackexchange.com/questions/6669/assign-the-results-from-a-solve-to-variables

I understand Mathematica can't assign the results of a Solve to the unknowns because there may be more than 1 solution. How can I assign the 4 values of following result to variables?

================================== Can you answer these? ==================================

[Plotting a 2D slice of a 3D function] http://mathematica.stackexchange.com/questions/138808/plotting-a-2d-slice-of-a-3d-function

I'd like to plot (Sqrt[x] + Sqrt[y] + Sqrt[z])^2 in a slice defined by x+y+z=1

I figured out similar problem 5 years ago, but it was a bit involved, ie, needing 10 lines of Mathematica code. Is there ...

—————————-

[Export of Plot3D function completely different from the render within Mathematica] http://mathematica.stackexchange.com/questions/138412/export-of-plot3d-function-completely-different-from-the-render-within-mathematic

I am plotting a simple function:

Plot3D[-RandomReal[{0, 10}] Cos[x/3] Cos[y/3],
{x, -π, π}, {y, -π, π},
Axes -&gt; False,
Boxed -&gt; False,
BoundaryStyle -&gt; None,
Mesh -&gt; None]

...

- asked by waffl (1 vote)

—————————-

[CreateExecutable returns $Failed] http://mathematica.stackexchange.com/questions/138328/createexecutable-returns-failed My platform is win10 64b, Mathematica 11 and Visual Studio 2015. When I apply CreateExecutable, it always returns$Failed. The configuration is right. Please what is the problem? Thank you.

...

- asked by tu312 (1 vote)

### 5 Tuesday, February 21, 2017

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

For the purposes of creating a publication-quality plot marker I wish to convert a font glyph into a simplified Polygon where points are taken adaptively according to curvature of the boundary. ...

—————————-

[Can Mathematica be used to make anamorphic distortions like these?] http://mathematica.stackexchange.com/questions/137853/can-mathematica-be-used-to-make-anamorphic-distortions-like-these

We have all see these sidewalk and street images that appear to be 3D based on the viewers perspective, but then wildly distort when viewed from a different perspective.

Seems to me anamorphic ...

—————————-

[How to implement lane-change rules for Nagel Schreckenberg model] http://mathematica.stackexchange.com/questions/138138/how-to-implement-lane-change-rules-for-nagel-schreckenberg-model

I am trying to extend the Nagel-Schreckenberg model for traffic flow to include two lanes of traffic.

—————————-

[How to make a custom NN layer in Mathematica?] http://mathematica.stackexchange.com/questions/138230/how-to-make-a-custom-nn-layer-in-mathematica

Is there a way to create our own custom layers for Neural Networks in Mathematica ? I suspect it should be possible, any pointers or directions on how to go about it?

I am interested in ...

—————————-

[How to build private function with built-in function's option] http://mathematica.stackexchange.com/questions/138126/how-to-build-private-function-with-built-in-functions-option

Since this code work well:

Needs["GeneralUtilities"]
GeneralUtilitiesBenchmarkPlot[{SortBy[#, Identity] &amp;, Sort}, Range,
"IncludeFits" -&gt; True, TimeConstraint -&gt; 8]

I want to set ...

—————————-

[Doing combinations of sub-sublists] http://mathematica.stackexchange.com/questions/138178/doing-combinations-of-sub-sublists

To create a list of all the possible combinations of a sublist. I have a list, somewhat resembling the following format:

{{{a1, a2}, {b1}}, {{a1, a2}, {c1, c2}}, {{a1, a2}, {c1, c2}, {d1, d2}}}

...

—————————-

[Warning: FrontEnd crash with ‘Graphics@InfiniteLine‘ for unknown symbolic coordinates] http://mathematica.stackexchange.com/questions/137847/warning-frontend-crash-with-graphicsinfiniteline-for-unknown-symbolic-coordi

Bug introduced in 10.0 and persisting through 11.0.1 InfiniteLine is new in 10.0.

[CASE:3840702] From your description, I gather you are noticing an unexpected crash
while trying to evaluate  ...

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

In the plot below I would like to add two vertical lines at . How can I do that?

f[x_] := (x^2 z)/((x^2 - y^2)^2 + 4 q^2 x^2) /. {y -&gt; π/15, z -&gt; 1, q -&gt;  ...

—————————-

[Can Mathematica do symbolic linear algebra?] http://mathematica.stackexchange.com/questions/3242/can-mathematica-do-symbolic-linear-algebra

For instance, is there some way I can say ”let A and B be arbitrary real and matrices,

Simplify[Transpose[Transpose[A].Transpose[B]]]" and Mathematica would simplify it to B.A?
...

================================== Can you answer these? ==================================

[Calculate PDF of difference of Max and Min for Gaussian random variables] http://mathematica.stackexchange.com/questions/138027/calculate-pdf-of-difference-of-max-and-min-for-gaussian-random-variables

Although this should be a standard question I didn't find it in SE, and it was a nice exercise in Mathematica.

Let and be two independent Gaussian random variables with distribution . ...

—————————-

[Implementing t-SNE (t-Distributed Stochastic Neighbor Embedding)] http://mathematica.stackexchange.com/questions/137955/implementing-t-sne-t-distributed-stochastic-neighbor-embedding

Context

t-Distributed Stochastic Neighbor Embedding (t-SNE) algorithm by van der
Maaten and Hinton (2008). (@M.R.'s question)

@Alexey  ...

—————————-

[Is there an easy way to to collect a large number variables into a list or list of lists?] http://mathematica.stackexchange.com/questions/138225/is-there-an-easy-way-to-to-collect-a-large-number-variables-into-a-list-or-list

I have a large number of variables in a notebook from a data analysis routine, the results of which now need to be fed through a mathematical model and various items for visualization.

For example, ...

### 6 Tuesday, February 14, 2017

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

I have the following code that generates a finite element mesh:

Needs["NDSolveFEM"]
order = 2;
mesh = ToElementMesh[
DiscretizeGraphics[
GraphicsComplex[{{0, 4}, {5, 4}, {5, 0}, {8, 0}, {8,  ...

—————————-

[Why can't I plot Log[Gamma[x]] for x ¿ 170?] http://mathematica.stackexchange.com/questions/137666/why-cant-i-plot-loggammax-for-x-170

Bug introduced in 11.0

For some reason I can't plot Log[Gamma[x]] for values of x larger than approximately 170:

Plot[Log[Gamma[x]], {x, 130, 200}, PlotRange -&gt; All]

It works perfectly well ...

—————————-

[Finding the number of odd quintinomial coefficients] http://mathematica.stackexchange.com/questions/137692/finding-the-number-of-odd-quintinomial-coefficients

I am searching for the number of odd coefficients of

for arbitrary .

It took some hours to compute the result for . There are odd ...

—————————-

[Possible bug with RegionPlot] http://mathematica.stackexchange.com/questions/137273/possible-bug-with-regionplot

RegionPlot[ImplicitRegion[(2 x - 1)/(x - 1) &lt; 3/2, {x, y}],
PlotRange -&gt; {{-9, 9}, {-9, 9}}]

Just checking whether anyone else can replicate this. Can anybody confirm such behavior and, ...

—————————-

Suppose I have a list that looks like the following (Town names and total distance to that town)

resupply = {
{"Coleman", 0},
{"Highwood House", 106},
{"Canmore", 229},
{"Exshaw", 245},
...

—————————-

[How to superimpose plots and graphics in the same coordinate system?] http://mathematica.stackexchange.com/questions/137408/how-to-superimpose-plots-and-graphics-in-the-same-coordinate-system

NB: I am aware that ”plots” are graphics too, so the title would be more precisely worded if ”graphics” were replaced by ”non-plot graphics”.

EDIT: I have edited my original example to make the ...

—————————-

[Unit tests for Graphics or FE boxes] http://mathematica.stackexchange.com/questions/137541/unit-tests-for-graphics-or-fe-boxes

Consider the following expression with bad syntax:

Graphics[foo]

How can I detect the error and retrieve the error message programmatically, so I can check for it in unit tests?

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

[Labeling individual curves in Mathematica] http://mathematica.stackexchange.com/questions/4444/labeling-individual-curves-in-mathematica

I need to create a plot for export and inclusion in a report. Is there a better way to label curves than PlotLegends? From what I've read and my personal experience, PlotLegends is pretty bad.

Is ...

—————————-

[Why this real integral yields imaginary results?] http://mathematica.stackexchange.com/questions/127301/why-this-real-integral-yields-imaginary-results

Integrate[(y - y^2 + x - x^2 + 2*x*y)/(1 - x - y),{x,0,1},{y, 0, 1}]

The above integral yields -1-4Iπ/3 in Mathematica. Since the integrand is real (although divergent at some points), how does ...

================================== Can you answer these? ==================================

[How to convert ‘LogTicks[0, 2][[1, 2]]‘ to a regular number] http://mathematica.stackexchange.com/questions/137208/how-to-convert-logticks0-21-2-to-a-regular-number

I want to convert the tick labels generated by LogTicks of the CustomTicks package to regular numbers. The first tick label is in element [[1,2]] of the object generated by LogTicks. FullForm ...

- asked by Felix (1 vote)

—————————-

[Solving the Euler-Lagrange equation with NDSolve‘ProcessEquations] http://mathematica.stackexchange.com/questions/137292/solving-the-euler-lagrange-equation-with-ndsolveprocessequations

I would like to compute the shortest distance between a number on pairs of points on a 2-dimensional Riemanniann statistical manifold (Negative Binomial distributions manifold, equipped with the Rao's ...

- asked by C. Manté (1 vote)

—————————-

[Constraining the independent variable in a control system] http://mathematica.stackexchange.com/questions/137581/constraining-the-independent-variable-in-a-control-system

For an analog closed loop feedback control, I can do the following to model the response of a second-order physical system with an order 1 zeros polynomial to a step disturbance. I have a proportional ...

### 7 Tuesday, February 7, 2017

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

[Code that generates a mandala] http://mathematica.stackexchange.com/questions/136974/code-that-generates-a-mandala

My little brother asked me to print original mandalas for coloring. I would like some idea on how to create them, but without color, so he can color them.

examples

—————————-

Is there a way to have Mathematica at the notebook level
(SetOptions[EvaluationNotebook[], CellContext -&gt; Notebook])
only uses a set of declared variables in the notebook context. Any variables  ...

—————————-

[Shorthand for map at level 2] http://mathematica.stackexchange.com/questions/136751/shorthand-for-map-at-level-2

I love the shorthand /@. It is amazing for readability (and laziness when typing).
However, right now I find that I need Map at level 2, i.e.
Map[f, List[List[a,b],List[c,d]], {2}], a lot and I'd wish  ...

—————————-

[Proteins, ProteinData, WolframAlpha] http://mathematica.stackexchange.com/questions/136741/proteins-proteindata-wolframalpha

Apologies in advance, this is the first I've messed with ProteinData and access through WolframAlpha, so clearly I may not know how Mathematica and Alpha decide on what is the 'right way' to ask ...

—————————-

[Simplifying a reverse Fold for a Query] http://mathematica.stackexchange.com/questions/136856/simplifying-a-reverse-fold-for-a-query

Is there a simpler way to parametrize this tail-recursive expression to be applied as a Query (for processing a nested Association)? The pattern is shown by example with first 3 levels:

—————————-

[Where is Abbott? How to make logograms from the film ”Arrival”?] http://mathematica.stackexchange.com/questions/137156/where-is-abbott-how-to-make-logograms-from-the-film-arrival

The film Arrival showed Wolfram Language code in action analysing alien logograms. A recent blog describes some details and mentions a live-coding video by Christopher Wolfam. See also Stephen ...

—————————-

[How to implement neural style transfer?] http://mathematica.stackexchange.com/questions/136704/how-to-implement-neural-style-transfer

In the paper A Neural Algorithm of Artistic Style, Leon A. Gatys et all. describe a process of extracting the content and style vectors from an image separately. They use this technique to generate ...

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

In the plot below I would like to add two vertical lines at . How can I do that?

f[x_] := (x^2 z)/((x^2 - y^2)^2 + 4 q^2 x^2) /. {y -&gt; π/15, z -&gt; 1, q -&gt;  ...

—————————-

[Calculate the 2D Fourier transform of an Image] http://mathematica.stackexchange.com/questions/29203/calculate-the-2d-fourier-transform-of-an-image

I am new to Mathematica, and using version 8.0.

I would like to calculate the 2D Fourier Transform of an Image with Mathematica and plot the magnitude and phase spectrum, as well as reconstruct the ...

================================== Can you answer these? ==================================

[Nonsparse sparse array crashes kernel on windows] http://mathematica.stackexchange.com/questions/136835/nonsparse-sparse-array-crashes-kernel-on-windows

On win 10, 64 bit, version 11.0.1, my kernel just started crashing for no reason as for as I can see. Does/should the following crash your kernel?

sparse = SparseArray[ArrayRules[RandomInteger[{1,  ...

—————————-

[How to visualize the vorticity of a 3D velocity field?] http://mathematica.stackexchange.com/questions/136917/how-to-visualize-the-vorticity-of-a-3d-velocity-field

I have a snapshot of a system with 50 particles.

The snapshot is a list of 3 coordinates and 3 velocities per each particle. Namely, , which AKA phase space ...

—————————-

[Finding line segments on the image by using ImageLines] http://mathematica.stackexchange.com/questions/136795/finding-line-segments-on-the-image-by-using-imagelines

There is an image from wolfram documentation

I want to find and highlight lines on the following image

I tried:

img = Import["http://imgur.com/NbNwYWC.png"]

lines = ImageLines[EdgeDetect[img],  ...

### 8 Tuesday, January 31, 2017

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

[How to get a specified number of points that are nearly equally spaced in a closed rectangle] http://mathematica.stackexchange.com/questions/136447/how-to-get-a-specified-number-of-points-that-are-nearly-equally-spaced-in-a-clos

TriangulateMesh is almost the right tool for this problem. For example,

numb = 113;
region = BoundaryMeshRegion[{{0, 0}, {3, 0}, {3, 1}, {0, 1}}, Line[{1, 2, 3, 4, 1}]];
mesh =  ...

—————————-

[Tutorial on creating publication quality documents in Mathematica?] http://mathematica.stackexchange.com/questions/136426/tutorial-on-creating-publication-quality-documents-in-mathematica

Are there books or tutorials that walk one through creating a professional publication quality notebook?

For example, I would like to create a two column article using an IEEE format. Is this ...

—————————-

[Type conversions] http://mathematica.stackexchange.com/questions/136476/type-conversions

I have the following list, each element of which is of type string:

”abc”, ”def”,”2”,”ghi”,”7”

Is there an efficient way to arrive at:

”abcdef”, 2,”ghi”,7

—————————-

[Alternatives and the Flat attribute] http://mathematica.stackexchange.com/questions/136157/alternatives-and-the-flat-attribute

When a head has the attribute Flat then the pattern matcher is able to pick out a sublist of its arguments, even though the structure doesn't match:

SetAttributes[f, Flat];
f[a, b, c, d] /. f[a, b]  ...

—————————-

[Assign names to Dataset columns] http://mathematica.stackexchange.com/questions/136422/assign-names-to-dataset-columns

I am constructing a dataset like so:

which gives me a dataset that looks like this:

This is all fine, but as you can ...

—————————-

[Dataset interferes with SeedRandom] http://mathematica.stackexchange.com/questions/136339/dataset-interferes-with-seedrandom

This seems like a pretty awful bug:

SeedRandom[1];
RandomInteger[10, 10]

Out: {1,4,0,7,0,0,8,6,0,4}

While:

SeedRandom[1];
Dataset[&lt;|a -&gt; 1, b -&gt; 2|&gt;];
RandomInteger[10, 10]

Out:  ...

—————————-

[Problem with integrating DiracDelta] http://mathematica.stackexchange.com/questions/136214/problem-with-integrating-diracdelta

I thought I had found a bug in Mathematica and reported it already in version 9, since it wasn't fixed in version 10 or 11 I reported it two more times but I never get any reply whatsoever so I'm ...

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

[Assign the results from a Solve to variable(s)] http://mathematica.stackexchange.com/questions/6669/assign-the-results-from-a-solve-to-variables

I understand Mathematica can't assign the results of a Solve to the unknowns because there may be more than 1 solution. How can I assign the 4 values of following result to variables?

—————————-

[How to create a fascinating QR code like this?] http://mathematica.stackexchange.com/questions/120041/how-to-create-a-fascinating-qr-code-like-this

Check the facinating QRCode in my profile page here

You can find that this QRCode is some sort of intriguing as the QRCode is a IMAGE ITSELF!!!

So my question is, how to create such a QRCode ...

================================== Can you answer these? ==================================

[How to Approximate at Non-differentiable Point (forced Series Expansion around Branch Cut)] http://mathematica.stackexchange.com/questions/136395/how-to-approximate-at-non-differentiable-point-forced-series-expansion-around-b

I need a numerical approximation around some functions at from the left side, where is unfortunately the right end of the domain (in the reals) so the functions are not ...

—————————-

[3D reconstruction of a 2D SEM image] http://mathematica.stackexchange.com/questions/136284/3d-reconstruction-of-a-2d-sem-image

I am curious if Mathematica could do reconstruction of a 2D SEM image into a 3D. It is the same what can be done by MountainsMap SEM software http://www.digitalsurf.fr/en/mntsem.html

Visually it ...

—————————-

[Help needed in Understand the following program in solving a stiff nonlinear differential equation] http://mathematica.stackexchange.com/questions/136607/help-needed-in-understand-the-following-program-in-solving-a-stiff-nonlinear-dif

I am trying to solve a particular Cauchy problem given by

I found from a particular paper that the solutions looks like

For the auxiliary conditions

For only specific values of

I ...

- asked by kernel_panic (1 vote)

### 9 Tuesday, January 24, 2017

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

[My Girlfriend is going to prison...Save her with Math] http://mathematica.stackexchange.com/questions/135937/my-girlfriend-is-going-to-prison-save-her-with-math

Salacious title, but true story.

dmethyl1 = {
{0, 0},
{.25, 1},
{.5, 7},
{1, 26},
{1.5, 40},
{2, 45},
{2.5, 45},
{3, 44},
{3.5, 44},
{4,  ...

—————————-

[How to use the iterator in Mathematica] http://mathematica.stackexchange.com/questions/135916/how-to-use-the-iterator-in-mathematica

I find the Mathematica has the iterator data structure. We can build some iterators like this:

Constant iterator

GeneralUtilitiesConstantIterator[5]

Key value iterator

...

—————————-

[SquaresR memory leak?] http://mathematica.stackexchange.com/questions/135781/squaresr-memory-leak

I have tried the following code in Mathematica 11.0.1.0 on my MacBook:

### 12 Tuesday, January 3, 2017

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

[Why should I avoid the For loop in Mathematica?] http://mathematica.stackexchange.com/questions/134609/why-should-i-avoid-the-for-loop-in-mathematica

Some people advise against the use of For loops in Mathematica. Why? Should I heed this advice? What is wrong with For? What should I use instead?

—————————-

[Is there a style sheet that can be used to generate Stack Exchange input?] http://mathematica.stackexchange.com/questions/134518/is-there-a-style-sheet-that-can-be-used-to-generate-stack-exchange-input

It would be convenient if there were a style sheet that automatically indented input cells, and automatically commented output cells, so that one could generate a stack exchange response in WL, and ...

—————————-

[Function to create a path made of horizontal and vertical lines between a number of points] http://mathematica.stackexchange.com/questions/134424/function-to-create-a-path-made-of-horizontal-and-vertical-lines-between-a-number

I would like to create a function where I can define which case I want to use to create a path.

p1 = {40, 48}; p2 = {50, 116}; p3 = {63, 160};
listPurple = Symbol["p" &lt;&gt; ToString[#]] &amp; /@  ...

—————————-

[How to wrap a crumpled paper over a surface?] http://mathematica.stackexchange.com/questions/134514/how-to-wrap-a-crumpled-paper-over-a-surface

My initial question was about the making of a crumpled paper. After reading this article suggested by J.M. and little more browsing (kind of random walk you do on a Saturday) I thought about expanding ...

—————————-

[Would like input and output printed on same line, w/o needing extra syntax] http://mathematica.stackexchange.com/questions/134406/would-like-input-and-output-printed-on-same-line-w-o-needing-extra-syntax

SUMMARY

I'd like to get MMA to automatically print both input and output on the same line, in TraditionalForm, without having to add any extra syntax. Further, I'd like the output to be fully ...

—————————-

[Issue with Cell Frames in version 11] http://mathematica.stackexchange.com/questions/134665/issue-with-cell-frames-in-version-11

Since upgrading to version 11, all of my notebooks now have cell frames are either missing the top or bottom part. Is anyone else experiencing this? Is there a way to fix this? Is this considered ...

—————————-

How to speed up this code? It's unbelievably slow!!! My solution with pen and paper is faster.

Clear[R, h];
Integrate[
Integrate[
Integrate[1, {z, h, Sqrt[R^2 - x^2 - y^2]},
Assumptions -&gt;  ...

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

[Exporting graphics to PDF - huge file] http://mathematica.stackexchange.com/questions/1542/exporting-graphics-to-pdf-huge-file

I want to draw some basic surfaces, export them to PDF and include them in a LaTeX file. I create a simple 3D graphics object, for instance with

ParametricPlot3D[{r Cos[θ], r Sin[θ], r^2}, {r, 0,  ...

—————————-

[Entering numbers in Scientific Notation?] http://mathematica.stackexchange.com/questions/36792/entering-numbers-in-scientific-notation

I need to play with a lot of powers such as 10^-3. 1E-3 does not work for it.
Is there any short form for it?

================================== Can you answer these? ==================================

[How to specify halting states when using function TuringMachine?] http://mathematica.stackexchange.com/questions/134628/how-to-specify-halting-states-when-using-function-turingmachine

The function TuringMachine generates a list that represents the evolution of a Turing Machine given a rule that specifies its behaviour (i.e. set of instructions).

For example, the following rule ...

—————————-

[Can I use Mathematica for the symbolic verification of cases of a general problem?] http://mathematica.stackexchange.com/questions/134515/can-i-use-mathematica-for-the-symbolic-verification-of-cases-of-a-general-proble

I have never used Mathematica before, but I am contemplating using it to solve this problem for a simple case of and and . I can easily get , the Fourier transform of ...

—————————-

[Antialiasing in Plot3D doesn't work well] http://mathematica.stackexchange.com/questions/134612/antialiasing-in-plot3d-doesnt-work-well

My code is very simple:

Style[Plot3D[Cos[x + 0*y], {x, -10, 10}, {y, -2, 42}, Mesh -&gt; None],
Antialiasing -&gt; True]

There seems some ripple on the top of the figure and I doubt whether it ...

- asked by user29114 (1 vote)

### 13 Tuesday, December 27, 2016

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

[Partitioning a number into consecutive integers] http://mathematica.stackexchange.com/questions/134252/partitioning-a-number-into-consecutive-integers

Consider n=45; then

Question: how to find all representations of a given positive integer n as a sum of ...

—————————-

[Why is my GIF shaky?] http://mathematica.stackexchange.com/questions/134272/why-is-my-gif-shaky

As you can see, the circles are shaking vertically as they approaching each other. Why is that?

The code:

g = Table[
Graphics[{Thickness[0.01],
Table[{ Circle[{0 + x, 0}, r],  ...

—————————-

[Can Mathematica edit large binary files in-place?] http://mathematica.stackexchange.com/questions/133973/can-mathematica-edit-large-binary-files-in-place

I have a very large binary data file (several hundred GB) which I would like to edit using Mathematica. The only edits required are a few isolated byte replacements—no insertions or deletions. Is it ...

—————————-

[Solving chess bishop problem] http://mathematica.stackexchange.com/questions/134218/solving-chess-bishop-problem

I have generalized the problem in this way where I have a list

list=Tuples[Range[8],2]

I want to find the largest sublist in which the addition of the two entries for any two elements of the ...

—————————-

[How to get such rule with a elegant method] http://mathematica.stackexchange.com/questions/134227/how-to-get-such-rule-with-a-elegant-method

I have two lists:

list={{1,2,3,5},{5,3,9,11,12},{5,9,10,16}};
list2={{7,89},{96,5},{-6,-98}};

This is the expected result.

{{1-&gt;{7,89},2-&gt;{7,89},3-&gt;{7,89},5-&gt;{7,89}},
...

—————————-

[Pseudo-currying in one line] http://mathematica.stackexchange.com/questions/134315/pseudo-currying-in-one-line

Often when I'm writing OOP code using an object-manager association I find myself doing something akin to currying the arguments to some form of delegate object or head. (Building a one-argument ...

—————————-

[How to create a multi-graphics plot (i.e. the decomposition of phase plane portrait) with well-organized structure?] http://mathematica.stackexchange.com/questions/134228/how-to-create-a-multi-graphics-plot-i-e-the-decomposition-of-phase-plane-portr

Background

I am trying to create a three-graphics plot using the command GraphicsGrid[] to show the decomposition of the phase plane portrait; unfortunately, the plot created is very ugly since the ...

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

[Finding Limits in several variables] http://mathematica.stackexchange.com/questions/21544/finding-limits-in-several-variables

Is there a way to find a limit of a multivariable function, like

with Mathematica?

When is continuous, we can use

...

—————————-

[Can Mathematica do symbolic linear algebra?] http://mathematica.stackexchange.com/questions/3242/can-mathematica-do-symbolic-linear-algebra

For instance, is there some way I can say ”let A and B be arbitrary real and matrices, Simplify[Transpose[Transpose[A].Transpose[B]]]” and Mathematica would simplify it to B.A? ...

================================== Can you answer these? ==================================

[Graph that shows how symbols are used in an expression] http://mathematica.stackexchange.com/questions/134180/graph-that-shows-how-symbols-are-used-in-an-expression

I would like to make a graph to show how symbols build up an expression. For example, the matrix multiplication

$$\left( \begin{array}{ccc} a &amp; b &amp; c \\ d &amp; e &amp; f \\ \end{array} ... - asked by ConvexMartian (4 votes) —————————- [Question about DynamicModule] http://mathematica.stackexchange.com/questions/134063/question-about-dynamicmodule I have a such custom function: MyCopy := DynamicModule[{from, to}, Print@Grid[{{FileNameSetter[Dynamic[from], "Directory"], Dynamic[from]}, {FileNameSetter[Dynamic[to], "Directory"], ... - asked by yode (3 votes) —————————- [General solution of inscribed square problem] http://mathematica.stackexchange.com/questions/134237/general-solution-of-inscribed-square-problem There is my earlier question about Inscribed square problem Now I tried to find the general solution for any curve . For instance : ... - asked by vito (5 votes) ### 14 Tuesday, December 20, 2016 ================================== Top new questions this week: ================================== [How can I work with RawArray?] http://mathematica.stackexchange.com/questions/133666/how-can-i-work-with-rawarray RawArray seems to be able to efficiently hold integer and floating point data of various sizes. What is RawArray good for? How can we use it? - asked by Szabolcs (19 votes), answered by Szabolcs (15 votes) —————————- [Random points around the given curve] http://mathematica.stackexchange.com/questions/133682/random-points-around-the-given-curve How to plot a random points around the following Helix curve? ParametricPlot3D[{6 Cos[t], 6 Sin[t], t}, {t, -2 π, 4 π}, PlotTheme -&gt; "Detailed", PlotStyle -&gt; {Blue, Thickness[Large]}, ... - asked by vito (14 votes), answered by J. M. (15 votes) —————————- [Intuition behind FoldPair and SequenceFold?] http://mathematica.stackexchange.com/questions/133625/intuition-behind-foldpair-and-sequencefold In trawling through the documentation I've found the functions FoldPairList and SequenceFoldList. Examples are given of how to use FoldPairList: Partition a list into sublists of different lengths ... - asked by pdmclean (12 votes), answered by andre (4 votes) —————————- [Product of two lists] http://mathematica.stackexchange.com/questions/133723/product-of-two-lists Please, for the two lists: L1 := {{a, b}, {c, d}, {e, f}} L2 := {{g, h, i}, {j, k, q}} I need the result {{{a g, a h, a i}, {c g, c h, c i}, {e g, e h, e i}}, {{b j, b k, b q}, {d j, d k, d ... - asked by Ali (11 votes), answered by xzczd (13 votes) —————————- [Is there something similar to seaborn stripplot in mathematica] http://mathematica.stackexchange.com/questions/133634/is-there-something-similar-to-seaborn-stripplot-in-mathematica Is there something similar to seaborn stripplot in mathematica? The graph I am trying to make is like this: - asked by Yordan (11 votes), answered by Brett Champion (12 votes) —————————- [Collapsible Tree] http://mathematica.stackexchange.com/questions/133492/collapsible-tree Has somebody tried to program for data visualization an interactive Collapsible Tree like shown here: http://bl.ocks.org/mbostock/4339083. This implements the Reingold-Tilford algorithm. ... - asked by mrz (8 votes) —————————- [FindDistributionParameters fails with custom distribution which cannot be evaluated symbolically] http://mathematica.stackexchange.com/questions/133456/finddistributionparameters-fails-with-custom-distribution-which-cannot-be-evalua Context I am interested in measuring the dark energy equation of state of the universe while fitting the PDF of density in cells. This involves fitting a one parameter PDF to some data. Following ... - asked by chris (7 votes) ================================== Greatest hits from previous weeks: ================================== [How can I draw the Olympic rings with Mathematica?] http://mathematica.stackexchange.com/questions/8885/how-can-i-draw-the-olympic-rings-with-mathematica How can I draw the 5 interlocking Olympic rings with Mathematica? (SVG version) Edit Hard choice, but some pretty cool answers here. I didn't have 3D answers in mind when I posted the question, ... - asked by Mike Honeychurch (42 votes), answered by cormullion (19 votes) —————————- [Where can I find examples of good Mathematica programming practice?] http://mathematica.stackexchange.com/questions/18/where-can-i-find-examples-of-good-mathematica-programming-practice I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ... - asked by J. M. (448 votes), answered by faysou (397 votes) ================================== Can you answer these? ================================== [Symbolic Weak Form] http://mathematica.stackexchange.com/questions/133575/symbolic-weak-form Usually I write the weak form by hand for my FEM code, but it's a little annoying and mechanic sometimes. So, I wonder, is there any way to generate the symbolic weak form in Mathematica? For ... - asked by senseiwa (5 votes) —————————- [Why is Minimize spinning?] http://mathematica.stackexchange.com/questions/133789/why-is-minimize-spinning The command Minimize[a^2 + b^2 + c^2 + a*b + b*c + a*c - (a + b - c)*Sqrt[2 a*b + b*c + a*c] - (b + c - a)* Sqrt[2 b*c + b*a + a*c] - (a + c - b)*Sqrt[2 a*c + a*b + b*c], a &gt;= 0 &amp;&amp; b ... - asked by user64494 (4 votes) —————————- [How to export an MXNet?] http://mathematica.stackexchange.com/questions/133857/how-to-export-an-mxnet I was hoping there was some way to generate the .params and .json file needed to define an MXNet model, from a network trained using NetTrain[] in Mathematica: I see these functions in the ... - asked by user5601 (5 votes) ### 15 Tuesday, December 13, 2016 ================================== Top new questions this week: ================================== [Query: adding additional operator changes meaning of preceding operators] http://mathematica.stackexchange.com/questions/133124/query-adding-additional-operator-changes-meaning-of-preceding-operators Consider the following query: Range[5] // Query[Select[EvenQ] /* Append[1], f] (* {f[2], f[4], 1} *) It selects the even numbers, applies f to them and finally appends 1 to the list. As expected, ... - asked by WReach (15 votes), answered by WReach (15 votes) —————————- [Why does Mathematica think this series doesn't converge?] http://mathematica.stackexchange.com/questions/132982/why-does-mathematica-think-this-series-doesnt-converge Bug introduced in 10.0 and persisting through 11.0 (reported as CASE:3790525) Here's a simple series: Sum[t^k DiscreteDelta[k]/k!,{k,0,Infinity}] Mathematica says that it doesn't converge. But ... - asked by Ruslan (13 votes), answered by Jules Lamers (9 votes) —————————- [Joining two lists with relational operators] http://mathematica.stackexchange.com/questions/132928/joining-two-lists-with-relational-operators I have two lists liste = {x, -y, y, -z} and listv = {1, -2, 3, -4}, which represent the inequities obtained evaluating liste - listv &lt;= 0. How do I reassemble or join those two separate lists into ... - asked by nanjun (13 votes), answered by Kuba (15 votes) —————————- [What assumptions do I need to make Mathematica integrate a function?] http://mathematica.stackexchange.com/questions/133052/what-assumptions-do-i-need-to-make-mathematica-integrate-a-function When I feed Mathematica the following integral: Integrate[Sqrt[(A - x) (B - x)/x], {x, 0, B}] it spits it back out without evaluating it. However, it can evaluate the integral Integrate[Sqrt[(2 - ... - asked by user45146 (11 votes), answered by Artes (12 votes) —————————- [Do Apple Watch + Mathematica integrations still work?] http://mathematica.stackexchange.com/questions/133358/do-apple-watch-mathematica-integrations-still-work I tried to follow this blog post: Instant Apps for Apple Watch, but none of the examples given worked, instead, they would simply hang on the ”loading” screen. Can anyone verify if this ... - asked by M.R. (9 votes) —————————- [Locate Start and End Positions of Repeated Sequences in a list] http://mathematica.stackexchange.com/questions/133164/locate-start-and-end-positions-of-repeated-sequences-in-a-list ListA = 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 12, 12, 12, 14, 14, 14, 12, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, ... - asked by SPIL (8 votes), answered by Suba Thomas (5 votes) —————————- [How can I add noise to a neural network input?] http://mathematica.stackexchange.com/questions/133090/how-can-i-add-noise-to-a-neural-network-input A common ”trick” in neural network training is to train an autoencoder using a ”degraded” sample as input and the original sample as target output. The layer type DropoutLayer[] is made for this ... - asked by nikie (8 votes), answered by nikie (5 votes) ================================== Greatest hits from previous weeks: ================================== [Can Mathematica do symbolic linear algebra?] http://mathematica.stackexchange.com/questions/3242/can-mathematica-do-symbolic-linear-algebra For instance, is there some way I can say ”let A and B be arbitrary real and matrices, Simplify[Transpose[Transpose[A].Transpose[B]]]” and Mathematica would simplify it to B.A? ... - asked by nikie (38 votes), answered by helen (19 votes) —————————- [Calculate the 2D Fourier transform of an Image] http://mathematica.stackexchange.com/questions/29203/calculate-the-2d-fourier-transform-of-an-image I am new to Mathematica, and using version 8.0. I would like to calculate the 2D Fourier Transform of an Image with Mathematica and plot the magnitude and phase spectrum, as well as reconstruct the ... - asked by user8727 (5 votes), answered by Nasser (27 votes) ================================== Can you answer these? ================================== [Mathematica script, called from Windows task scheduler, does not export graphics] http://mathematica.stackexchange.com/questions/133075/mathematica-script-called-from-windows-task-scheduler-does-not-export-graphics When I run the following script from command line, Needs["JLink"]; ConnectToFrontEnd[]; resultChart = UseFrontEnd[JuliaSetPlot[0.365 - 0.37 I]]; UseFrontEnd[Export["test.png", resultChart]]; ... - asked by Karsten W. (2 votes) —————————- [Is it possible to do matrix algebra symbolically?] http://mathematica.stackexchange.com/questions/132955/is-it-possible-to-do-matrix-algebra-symbolically I'm reading a book that has the following theorem: I am trying to make Mathematica perform these calculations for me. Is it possible to do it without having to declare the matrices? For ... - asked by Oppa Hilbert Style (2 votes) —————————- [Making graphic objects disappear interactively] http://mathematica.stackexchange.com/questions/133256/making-graphic-objects-disappear-interactively I am trying to create a program where dots on a plane disappear when an object passes over them. I am using EventHandler to code the arrow keys for control of the object. I want each dot to ... - asked by Savannah S (1 vote) ### 16 Tuesday, December 6, 2016 ================================== Top new questions this week: ================================== [How to find arXiv articles] http://mathematica.stackexchange.com/questions/132685/how-to-find-arxiv-articles I found at Twitter that is possible to search for arXiv articles with Mathematica: E.g. the following code: arXiv = ServiceConnect["ArXiv"]; articles = arXiv["Search", {"Query" -&gt; ... - asked by mrz (16 votes), answered by user21 (11 votes) —————————- A crucial step in self-driving car is to detect lane lines. I'm wondering whether this can be achieved robustly using Mathematica's rich image processing tools. For example how can I take camera ... - asked by xslittlegrass (14 votes), answered by nikie (14 votes) —————————- [Neural Network for polynomial fit] http://mathematica.stackexchange.com/questions/132546/neural-network-for-polynomial-fit I'm trying to build up a neural network with Mathematica 11.0, that should fit data which behaves like a polynom of third order. I thought that an NN with one or two hidden layers can fit any ... - asked by A.Zachl (12 votes), answered by nikie (9 votes) —————————- [How to make notebooks suitable for the Documentation Center?] http://mathematica.stackexchange.com/questions/132392/how-to-make-notebooks-suitable-for-the-documentation-center Normally, documentation meant to be integrated into the Documentation Center is built from special source notebooks. According to the Workbench documentation, it should also be possible to use ... - asked by Szabolcs (12 votes), answered by jkuczm (5 votes) —————————- [Largest palindrome from given string] http://mathematica.stackexchange.com/questions/132834/largest-palindrome-from-given-string Someone recently posted a request on LinkedIn for an algorithm to find the largest palindrome from a given string. I came up with this, which I believe does the trick, but I am wondering if there ... - asked by Jonathan Kinlay (10 votes), answered by Kuba (10 votes) —————————- [Why Function is not identical to & in autocompilation?] http://mathematica.stackexchange.com/questions/132656/why-function-is-not-identical-to-in-autocompilation Here is the example, copied from here square = Function[x, x^2]; square1 = #^2 &amp;; the timing and unpacking status shows data = RandomReal[0, 10, 10000]; ... - asked by matheorem (10 votes), answered by m_goldberg (4 votes) —————————- [Analytic solution to Newtonian gravity differential equation] http://mathematica.stackexchange.com/questions/132875/analytic-solution-to-newtonian-gravity-differential-equation I was told that I could obtain an analytic solution to a particle falling under the influence of Newtonian gravity by using DSolveValue. What I am given is a point mass at ... - asked by Joe (9 votes), answered by Kagaratsch (9 votes) ================================== Greatest hits from previous weeks: ================================== [Unit Discovery: Is this some sort of a sick joke?] http://mathematica.stackexchange.com/questions/124745/unit-discovery-is-this-some-sort-of-a-sick-joke Alright, let's have some fun here. I am essentially following the documentation by Wolfram, just looking at different quantities. N[UnitConvert[Quantity["earth's gravity"]]] 9.80665m/(s)^2 Hmm, ... - asked by Pirx (30 votes), answered by xavier (30 votes) —————————- [How can Mathematica be used to create images like these?] http://mathematica.stackexchange.com/questions/118992/how-can-mathematica-be-used-to-create-images-like-these Here are two examples of artistic image interpolation using just black lines: TRIANGULATION: ANGULAR CELEBRITIES DRAWN WITH A PEN Interpolation for Triangulation-represented Digital Image The ... - asked by R Hall (28 votes), answered by MarcoB (29 votes) ================================== Can you answer these? ================================== [How to find a value to make function positive and real?] http://mathematica.stackexchange.com/questions/132883/how-to-find-a-value-to-make-function-positive-and-real Let x=(((-3 + r) r^2 + a^2 (1 + r)) Csc[θ])/(a (-1 + r)) y=Sqrt[(a^2 (a^2 (1 + r)^2 + 2 r^2 (-3 + r^2)) + a^4 (-1 + r)^2 Cos[θ]^2 - ((-3 + r) r^2 + a^2 (1 + r))^2 Csc[θ]^2)/(a^2 (-1 + r)^2)] ... - asked by MrDi (1 vote) —————————- [Creating an automatic code feedback for class] http://mathematica.stackexchange.com/questions/132880/creating-an-automatic-code-feedback-for-class I'm trying to create a server application that accepts uploaded Mathematica files (that follow a certain API), then run a few tests on modules defined within those files. This is for a course where ... - asked by michael99man (1 vote) —————————- [Nontrivial background removal] http://mathematica.stackexchange.com/questions/132844/nontrivial-background-removal I have an image of a product on a poorly made green screen and need to segment out just the product: The problem is that it contains a mirror, so simple color-based methods are not enough. I tried ... - asked by M.R. (4 votes) ### 17 Tuesday, November 29, 2016 ================================== Top new questions this week: ================================== [PacletInfo.m documentation project] http://mathematica.stackexchange.com/questions/132064/pacletinfo-m-documentation-project Packages can be made into paclets, which provides easy distribution and versioning. The paclet metadata is in the PacletInfo.m file. The PacletInfo settings also determine how the paclet can extend ... - asked by Szabolcs (25 votes), answered by Szabolcs (22 votes) —————————- [Replace custom functions, leave built in functions untouched?] http://mathematica.stackexchange.com/questions/131938/replace-custom-functions-leave-built-in-functions-untouched I have three expressions a[x, y], b[x, y], c[x, y] that act as placeholders for functions of two variables x,y. Consider the following substitution: a[x, y]/(b[x, y] c[x, y]) /. f_[x1_, y1_] :&gt; ... - asked by Kagaratsch (16 votes), answered by Mr.Wizard (18 votes) —————————- [Why CompilationTarget -¿ C is slower than directly writing with C?] http://mathematica.stackexchange.com/questions/132130/why-compilationtarget-c-is-slower-than-directly-writing-with-c Probably a hard question, but I think it's better to cry out loud. I've hesitated for a while about whether I should post this in StackOverflow with a c tag or not, but finally decide to keep it ... - asked by xzczd (15 votes), answered by Albert Retey (11 votes) —————————- [Detecting kernel initialization] http://mathematica.stackexchange.com/questions/132212/detecting-kernel-initialization Certain operations do not work during kernel initialization. Code from Kernel/init.m, the Autoload directory, or packages set to autoload may evaluate at initialization time. Is there a way to ... - asked by Szabolcs (12 votes), answered by Szabolcs (10 votes) —————————- [How can I change the default file type for ”Save Selection As”] http://mathematica.stackexchange.com/questions/132224/how-can-i-change-the-default-file-type-for-save-selection-as When using the menu item File - Save Selection As, the default file type is PDF. Is there any way to change the default to something else, for example PNG? - asked by Simon Woods (12 votes), answered by Mike Honeychurch (13 votes) —————————- [How to obtain the ViewPoint] http://mathematica.stackexchange.com/questions/132228/how-to-obtain-the-viewpoint Normally, I used ViewPoint in the code in Plot3D. Most of the time, I will use mouse to rotate the 3D object to get a better view point. The problem is, when I find the best view point for me, is ... - asked by Qi Zhong (12 votes), answered by Jack LaVigne (14 votes) —————————- [Wonky Solutions to Schrödinger Equation with Box Barrier] http://mathematica.stackexchange.com/questions/131854/wonky-solutions-to-schr%C3%B6dinger-equation-with-box-barrier I'm trying to solve the Schrödinger equation using NDSolve in a case where there is a potential box barrier. The initial condition is a cosine wave, and for boundary conditions I require that the ... - asked by Buddhapus (8 votes), answered by xzczd (4 votes) ================================== Greatest hits from previous weeks: ================================== [Can Mathematica do symbolic linear algebra?] http://mathematica.stackexchange.com/questions/3242/can-mathematica-do-symbolic-linear-algebra For instance, is there some way I can say ”let A and B be arbitrary real and matrices, Simplify[Transpose[Transpose[A].Transpose[B]]]” and Mathematica would simplify it to B.A? ... - asked by nikie (35 votes), answered by helen (18 votes) —————————- [How to tell Mathematica that certain variables are real/imaginary, integer-valued, etc] http://mathematica.stackexchange.com/questions/66273/how-to-tell-mathematica-that-certain-variables-are-real-imaginary-integer-value I'm trying to expedite some quantum mechanical calculations by running them through Mathematica. Expectation values and stuff like that. When I say, for example, u[x_] := Sqrt[2/L] * Sin[Pi * n * x / ... - asked by Matthew Brunetti (9 votes), answered by SquareOne (7 votes) ================================== Can you answer these? ================================== [Is it possible to change the text cursor's shape and color?] http://mathematica.stackexchange.com/questions/132322/is-it-possible-to-change-the-text-cursors-shape-and-color I find it visually pleasant to reverse the background and foreground colors when working on a notebook; as shown below, in fact, it's almost a requirement after working long hours on the same ... - asked by Jerome Ibanes (1 vote) —————————- [FindClusters doesn't accept custom DistanceFunction] http://mathematica.stackexchange.com/questions/132287/findclusters-doesnt-accept-custom-distancefunction I have a problem with using custom DistanceFunction in FindClusters. To make the issue as simple as possible, consider clustering odd &amp; even numbers in the following way: ... - asked by ahrvoje (6 votes) —————————- [FrameLabel is Broken for ArrayPlot and MatrixPlot] http://mathematica.stackexchange.com/questions/132008/framelabel-is-broken-for-arrayplot-and-matrixplot In version 11.0.1 the documentation for FrameLabel states its format is left, right, bottom, top However, it appears that this is not the case for MatrixPlot. ... - asked by Edmund (5 votes) ### 18 Tuesday, November 22, 2016 ================================== Top new questions this week: ================================== [Create the source image for this cool animated illusion] http://mathematica.stackexchange.com/questions/131644/create-the-source-image-for-this-cool-animated-illusion Have a look at this very awesome video: You have a vertically discretized image, which is composed of 5 or 6 images, which are shifted by an increment, as ... - asked by DoHe (22 votes), answered by corey979 (25 votes) —————————- [Restarting Mathematica automatically] http://mathematica.stackexchange.com/questions/131573/restarting-mathematica-automatically I run a large computation in a loop. At each cycle of the loop I produce large arrays that I save on a disk. At each cycle I would like to Quit Mathematica and then restart automatically, loading ... - asked by Vadim (15 votes), answered by Szabolcs (14 votes) —————————- [How to handle package dependencies?] http://mathematica.stackexchange.com/questions/131567/how-to-handle-package-dependencies When an application written in C++ depends on some libraries, the libraries are usually shipped together with the application. Two applications that depend on the same library will not share the same ... - asked by Szabolcs (11 votes), answered by Kuba (3 votes) —————————- [How to sample many points below a curve?] http://mathematica.stackexchange.com/questions/131755/how-to-sample-many-points-below-a-curve I have plotted the curve, and I wanted to take 1000 points in the shaded area uniformly. How can I make it? Plot[1/π Cos[θ]^2, {θ, 0, 2 π}, Filling -&gt; Bottom] - asked by ZHANG Juenjie (10 votes), answered by bbgodfrey (11 votes) —————————- [how to style multi-value interpolation function plot?] http://mathematica.stackexchange.com/questions/131516/how-to-style-multi-value-interpolation-function-plot Is there a cleaner way to apply different styles to the different channels of a multi value interpolation function? here is a 2-output interpolation function: f = Interpolation[Table[ {x, N@{Sin[x], ... - asked by george2079 (10 votes), answered by Michael E2 (7 votes) —————————- [Backtesting a Probability of Default (PD) model] http://mathematica.stackexchange.com/questions/131347/backtesting-a-probability-of-default-pd-model Background PD models Financial institutions use Probability of Default (PD) models for various purposes such as client acceptance, provisioning and regulatory capital calculation as required by the ... - asked by Sjoerd C. de Vries (10 votes), answered by Sjoerd C. de Vries (14 votes) —————————- [Display bug in Dataset's UnitConvert handling] http://mathematica.stackexchange.com/questions/131332/display-bug-in-datasets-unitconvert-handling Bug introduced in 11.0.1 (or possibly 11.0.0) Is this yet another annoying regression in v11 Dataset type handling? The display form seems to be a formatting bug: The numerator and denominator of ... - asked by alancalvitti (10 votes), answered by WReach (4 votes) ================================== Greatest hits from previous weeks: ================================== [Exporting graphics to PDF - huge file] http://mathematica.stackexchange.com/questions/1542/exporting-graphics-to-pdf-huge-file I want to draw some basic surfaces, export them to PDF and include them in a LaTeX file. I create a simple 3D graphics object, for instance with ParametricPlot3D[{r Cos[\[Theta]], r Sin[\[Theta]], ... - asked by Matthew Leingang (85 votes), answered by Heike (74 votes) —————————- [How to create a new ”person curve”?] http://mathematica.stackexchange.com/questions/17704/how-to-create-a-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 ... - asked by Simon (61 votes), answered by Vitaliy Kaurov (30 votes) ================================== Can you answer these? ================================== [Unix-like reference to parent and root Association?] http://mathematica.stackexchange.com/questions/131337/unix-like-reference-to-parent-and-root-association Is there a syntax or function to reference parent and root when querying nested Associations similar to Unix' ".." and "/", eg "cd ../../mydir". ? Here's a typical application of the root ... - asked by alancalvitti (3 votes) —————————- [Strange behaviour of FullSimplify when checking an equality of SparseArray's] http://mathematica.stackexchange.com/questions/131400/strange-behaviour-of-fullsimplify-when-checking-an-equality-of-sparsearrays I stumbled upon the following strange behaviour. Disclaimer: I present the simplest instance that I could find in which some behaviour occurs that I first noticed in a different, more complicated ... - asked by Jules Lamers (1 vote) —————————- [ListPlot PlotRange Ignored with all Missing or empty data] http://mathematica.stackexchange.com/questions/131321/listplot-plotrange-ignored-with-all-missing-or-empty-data I have a function that uses ListPlot to draw a custom plot. When a data value is not applicable I pass in Missing to prevent ListPlot and its Prolog option from displaying the point the function will ... - asked by Edmund (3 votes) ### 19 Tuesday, November 15, 2016 ================================== Top new questions this week: ================================== [Why (and when) does pattern matching with f[__] perform MUCH more quickly than _f?] http://mathematica.stackexchange.com/questions/130984/why-and-when-does-pattern-matching-with-f-perform-much-more-quickly-than Consider this expression in Mathematica 10.3 (and above) on MacOS X: expr = a b c d e f g h i j k l m n o p q r s t myG[u] myF[a, b] Now compare the time it takes to apply the following ... - asked by QuantumDot (22 votes), answered by WReach (17 votes) —————————- [Getting wrong limit with Bessel] http://mathematica.stackexchange.com/questions/130741/getting-wrong-limit-with-bessel I computed a following limit (related to the asymptotic expansion of the sequence A000009 - number of partitions of n into distinct parts) Expand[Limit[(((π BesselI[1, (Sqrt[1/24 + n] ... - asked by Vaclav Kotesovec (11 votes), answered by Akku14 (9 votes) —————————- [Join lists by observing x-value] http://mathematica.stackexchange.com/questions/130903/join-lists-by-observing-x-value Hi everybody I have as a small test with two datasets (normally I have 100 datasets with 4100 brackets): Dataset1={{20,1},{30, 1.3}, {40, 0.4}, {50, 0.9}} Dataset2={{30, 1.2}, {40, 1}, {50, 0.4}, ... - asked by Jacccy (10 votes), answered by ubpdqn (13 votes) —————————- [How to distribute Mathematica packages as paclets?] http://mathematica.stackexchange.com/questions/131101/how-to-distribute-mathematica-packages-as-paclets Mathematica does have a nice package manager. Packages are called paclets, and they can be managed using the functions from the PacletManager‘ context. How can I package up my own packages as ... - asked by Szabolcs (9 votes), answered by Szabolcs (7 votes) —————————- [Does function call via @ ignore HoldFirst attribute?] http://mathematica.stackexchange.com/questions/130889/does-function-call-via-ignore-holdfirst-attribute I was trying to test whether using func[x,y] is the same as func[#,y]&amp;@x: SetAttributes[test, HoldFirst] test[1 + 2 - 3, 5 - 5] test[#, 5 - 5] &amp;@(1 + 2 - 3) test[1 + 2 - 3, 0] ... - asked by Ruslan (8 votes), answered by m_goldberg (9 votes) —————————- [Graph visualization: Leave gap between vertex and endpoint of edge] http://mathematica.stackexchange.com/questions/130821/graph-visualization-leave-gap-between-vertex-and-endpoint-of-edge This is a nice graph: g = CycleGraph[4]; Graph[g, VertexCoordinates -&gt; {{0, 0}, {0, 1}, {1, 1}, {1, 0}}, VertexLabels -&gt; Placed["Name", Center], VertexSize -&gt; Medium, EdgeShapeFunction ... - asked by cyrille.piatecki (8 votes), answered by kglr (12 votes) —————————- [Help finding the centre of a faint, incomplete circle?] http://mathematica.stackexchange.com/questions/130787/help-finding-the-centre-of-a-faint-incomplete-circle so I found a program in the answers to this question that I thought was brilliant, so here it is applied to my situation: I have the image and here's the code: ... - asked by Mason (8 votes) ================================== Greatest hits from previous weeks: ================================== [How can Mathematica be used to create images like these?] http://mathematica.stackexchange.com/questions/118992/how-can-mathematica-be-used-to-create-images-like-these Here are two examples of artistic image interpolation using just black lines: TRIANGULATION: ANGULAR CELEBRITIES DRAWN WITH A PEN Interpolation for Triangulation-represented Digital Image The ... - asked by R Hall (28 votes), answered by MarcoB (29 votes) —————————- [How do you make a Neural Net?] http://mathematica.stackexchange.com/questions/123458/how-do-you-make-a-neural-net In the new Mathematica release (v11), NeuralNetworks is one of the new main features. However, the documentation isn't that clear on what function should be used in a Net. The documentation on ... - asked by JHM (22 votes), answered by Searke (24 votes) ================================== Can you answer these? ================================== [Understanding the structure of an InterpolatingFunction] http://mathematica.stackexchange.com/questions/131063/understanding-the-structure-of-an-interpolatingfunction FunctionInterpolation[x^2, {x, 0, 9}] // InputForm returns: InterpolatingFunction[ 0., 9., 5, 3, 0, 13, 4, 0, 0, 0, 0, Automatic, , , False, 0., 0.75, 1.5, 2.25, 3., 3.75, ... - asked by anderstood (1 vote) —————————- [Is it possible to create .stp 3D model from Graphics3D?] http://mathematica.stackexchange.com/questions/130883/is-it-possible-to-create-stp-3d-model-from-graphics3d I want to create some 3D solid model by Mathematica, and then export it into stp (step) format for further finite element or finite volume analysis in Fluent/ANSYS or Abaqus. But so far to me, it ... - asked by user6043040 (3 votes) —————————- [Time constrained loop unit] http://mathematica.stackexchange.com/questions/131159/time-constrained-loop-unit I have a particularly difficult loop, in that it consists of two variables looping and sowing the result if a criteria is met. Overall it works for me, but some certain values for my variables take ... - asked by Castle (2 votes) ### 20 Tuesday, November 8, 2016 ================================== Top new questions this week: ================================== [For a better animation of the solution from NDSolve] http://mathematica.stackexchange.com/questions/130502/for-a-better-animation-of-the-solution-from-ndsolve I obtained a numerical solution from the following code with NDSolve L = 20; tmax = 27; \[Sigma] = 2; myfun = First[h /. NDSolve[{D[h[x, y, t], t] + Div[h[x, y, t]^3*Grad[Laplacian[h[x, y, t], {x, ... - asked by jsxs (12 votes), answered by Nasser (14 votes) —————————- [A puzzling result of ”FullSimplify”] http://mathematica.stackexchange.com/questions/130606/a-puzzling-result-of-fullsimplify When I input: FullSimplify[(1 - a^2)/b^2, a^2 + b^2 == 1] the result is the ideal answer 1； However，if I input: FullSimplify[(1 - b^2)/a^2, a^2 + b^2 == 1] the result is (1 - b^2)/a^2 ... - asked by dabuyang (11 votes), answered by Bob Hanlon (7 votes) —————————- [ImageFeatureTrack or ImageDisplacements to measure average object velocities in images] http://mathematica.stackexchange.com/questions/130391/imagefeaturetrack-or-imagedisplacements-to-measure-average-object-velocities-in I have as example a set of 30 gray scale images (8bit, 568*478 pixels, they are avalable here: http://tinyurl.com/zckyv9w where bright objects on dark background move from image to image mainly ... - asked by mrz (9 votes), answered by Simon Woods (10 votes) —————————- [Documentation Tools: Don't put web URL in user package docs] http://mathematica.stackexchange.com/questions/130515/documentation-tools-dont-put-web-url-in-user-package-docs I am exploring the Workbench documentation tools for the first time and one of the difficulties I encountered was that every generated (compiled) documentation page includes weblinks. These point to ... - asked by Szabolcs (9 votes) —————————- [How to make plots 'blacker'?] http://mathematica.stackexchange.com/questions/130471/how-to-make-plots-blacker I need to make a contour plot for publication, but even if I set ContourStyle-&gt;Black, the 'black' plots and the axes are very faint. When I export the figure in svg and open it in some ... - asked by Physicist (9 votes), answered by Michael E2 (10 votes) —————————- [How to specify algebraic relations between objects?] http://mathematica.stackexchange.com/questions/130258/how-to-specify-algebraic-relations-between-objects so I'm wanting to screw around a bit with Geometric Algebra in Mathematica. To start, I want to create some basis objects: and then specify the relations between them which are - asked by Mason (9 votes), answered by march (9 votes) —————————- [Crack it If you Can? BUT in the BEST way] http://mathematica.stackexchange.com/questions/130566/crack-it-if-you-can-but-in-the-best-way From the Wolfram Community: Hello everyone, A little while ago I was asked to solve this ”safe cracker” puzzle, a sweet example of a coffee table puzzle. The basic gist of this puzzle is that it ... - asked by Youphyso (8 votes), answered by george2079 (4 votes) ================================== Greatest hits from previous weeks: ================================== [Writing a word with straight lines] http://mathematica.stackexchange.com/questions/113403/writing-a-word-with-straight-lines Here is an interesting way to write a word: (it is from a poster for the International Museum Day 2006; I believe it even won an award at an international design competition) by Boris Ljubicic. ... - asked by VividD (72 votes), answered by Anton Antonov (34 votes) —————————- [Where can I find examples of good Mathematica programming practice?] http://mathematica.stackexchange.com/questions/18/where-can-i-find-examples-of-good-mathematica-programming-practice I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ... - asked by J. M. (441 votes), answered by faysou (396 votes) ================================== Can you answer these? ================================== [Passing boolean parameters to a .NET Method using NETLink] http://mathematica.stackexchange.com/questions/130658/passing-boolean-parameters-to-a-net-method-using-netlink According to the NETLink documentation, NETLink automatically handles type conversions from Mathematica to a .NET dll. One of the issues I have is that the .NET method I want to use expects a Boolean ... - asked by user39464 (1 vote) —————————- [ParametricPlot3D Self Intersection] http://mathematica.stackexchange.com/questions/130460/parametricplot3d-self-intersection I would like to know where my ParametricPlot3D intersects itself and to extract all intersections (points, lines, surfaces...) to animate them by changing P: ParametricPlot3D[{fX[u,v,P], fY[u,v,P], ... - asked by chkone (3 votes) —————————- [Faster solution to combinatorial problem of two-part contractions] http://mathematica.stackexchange.com/questions/130598/faster-solution-to-combinatorial-problem-of-two-part-contractions Given a list of elements I need all possible pairings of elements with a leading factor that describes the number of permutations. A (ugly but) working version would be: list = {a, b, c, d}; res = ... - asked by pbx (2 votes) ### 21 Tuesday, November 1, 2016 ================================== Top new questions this week: ================================== [Huge bug involving MultinormalDistribution?] http://mathematica.stackexchange.com/questions/129916/huge-bug-involving-multinormaldistribution Bug introduced in 8.0 or earlier and persisting through 11.0.1 I found a strange behavior regarding the CDF of the bivariate Normal distribution ... - asked by fwgb (21 votes), answered by Eric Towers (19 votes) —————————- [GeoDistance - higher spatial resolution / precision?] http://mathematica.stackexchange.com/questions/130044/geodistance-higher-spatial-resolution-precision I'm having a small problem with GeoDistance. I've chosen a target city – San Francisco – and I've computed distances from SF to five other cities. Then I draw circles around each city, with radius ... - asked by ConvexMartian (9 votes), answered by jose (4 votes) —————————- [How to extract the first dimension in TimeSeries?] http://mathematica.stackexchange.com/questions/129836/how-to-extract-the-first-dimension-in-timeseries I want to extract the first dimension in TimeSeries，for example: So I use this code: data = Normal@AudioLocalMeasurements[ExampleData[{"Audio", "PianoScale"}],"MFCC"]; Thread[{data[[All, 1]], ... - asked by partida (9 votes), answered by kglr (6 votes) —————————- [How to recover Pauli matrices properties in Mathematica?] http://mathematica.stackexchange.com/questions/129799/how-to-recover-pauli-matrices-properties-in-mathematica I want to do a cross or dot product involving a vector of Pauli matrices σ=(σ1,σ2,σ3); for example, σxσ=2iσ or σ.σ=3I. Is there a simple way to do these operations? - asked by user3654016 (8 votes), answered by corey979 (10 votes) —————————- [Flatten sublists within a bigger list] http://mathematica.stackexchange.com/questions/130011/flatten-sublists-within-a-bigger-list Really sorry if this question is a duplicate. I couldn't find exactly what I was looking for. Here is a list I have: {{{0. + 0.1875 I, 0. + 0.105469 I, 0. + 0.03125 I, 0. + 0.00390625 I, 0. + ... - asked by jrekier (7 votes), answered by Edmund (6 votes) —————————- [7-dimensional cross product] http://mathematica.stackexchange.com/questions/129863/7-dimensional-cross-product How to define a 7-dimensional cross product?$$\begin{aligned}\mathbf {x} \times \mathbf {y} =(x_{2}y_{4}-x_{4}y_{2}+x_{3}y_{7}-x_{7}y_{3}+x_{5}y_{6}-x_{6}y_{5})\,&amp;\mathbf {e}  ...

—————————-

[How to draw a clock-diagram?] http://mathematica.stackexchange.com/questions/129960/how-to-draw-a-clock-diagram

I found a clock-diagram in a paper, so I would like to draw it in Mathematica. The main trouble for me is the corresponding line segments on the circle.

I would let the data1 lie the outside on the ...

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

[How can Mathematica be used to create images like these?] http://mathematica.stackexchange.com/questions/118992/how-can-mathematica-be-used-to-create-images-like-these

Here are two examples of artistic image interpolation using just black lines:

TRIANGULATION: ANGULAR CELEBRITIES DRAWN WITH A PEN Interpolation for Triangulation-represented Digital Image

The ...

—————————-

[How to tell Mathematica that certain variables are real/imaginary, integer-valued, etc] http://mathematica.stackexchange.com/questions/66273/how-to-tell-mathematica-that-certain-variables-are-real-imaginary-integer-value

I'm trying to expedite some quantum mechanical calculations by running them through Mathematica. Expectation values and stuff like that. When I say, for example,

u[x_] := Sqrt[2/L] * Sin[Pi * n * x /  ...

================================== Can you answer these? ==================================

[How to Inset a legend in GeoGraphics with Scaled LegendMarkerSize?] http://mathematica.stackexchange.com/questions/130060/how-to-inset-a-legend-in-geographics-with-scaled-legendmarkersize

I have a GeoGraphics where I am using Scaled in PointSize to include size information. I want to Inset a PointLegend that describes the sizes of the points.

Outside of GeoGraphics I can do this by ...

—————————-

[NumberLinePlot with Exponential] http://mathematica.stackexchange.com/questions/129938/numberlineplot-with-exponential

I have:

Clear[f, x]
f[x_] = Exp[1/x]

Now, the question is "where is the derivative negative?" I
managed to get the Reduce command to work by adding Reals.

Reduce[f'[x] &lt; 0, x, Reals]

Which ...

—————————-

[Detect numbers on the image] http://mathematica.stackexchange.com/questions/129821/detect-numbers-on-the-image

How to detect numbers on the following image

I tried:

img=Import["http://imgur.com/TDbn7sB.png"]

set = ImagePartition[img, Scaled[{1/20, 1/5}]] // Flatten

then I tried Classify[] but it ...

### 22 Tuesday, October 25, 2016

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

[How to improve this plot?] http://mathematica.stackexchange.com/questions/129426/how-to-improve-this-plot

In general, the quality of Mathematica graphics is beyond praise. However, the output of Plot3D command is somewhat unexpected in the following code. Let's solve the Dirichlet problem for the ...

—————————-

[Neural Networks: Does Mathematica (v11) experimental code support state-of-art Models?] http://mathematica.stackexchange.com/questions/129469/neural-networks-does-mathematica-v11-experimental-code-support-state-of-art-m

Mathematica made a big step implementing Neural Networks. I checked some examples for deep learning (ChainNet), also the related link. I see that model structures such as LaNet can be developed. ...

—————————-

[Converting Game of Life images to lists] http://mathematica.stackexchange.com/questions/129135/converting-game-of-life-images-to-lists

I want to convert images of GoL configurations into binary matrices to run in Mathematica's CellularAutomaton. I know that there's a collection of GoL patterns in http://conwaylife.com and other ...

—————————-

[JDBC-to-ODBC bridge gone. How to connect to SQL Server now in case of Windows Authentication?] http://mathematica.stackexchange.com/questions/129160/jdbc-to-odbc-bridge-gone-how-to-connect-to-sql-server-now-in-case-of-windows-au

Connecting to our corporate SQL servers using JDBC never worked for me, perhaps related to the Windows Authentication method that is necessary in our network. However, I found out that configuring the ...

—————————-

[How to speed up calculations on big symbolic matrices?] http://mathematica.stackexchange.com/questions/129465/how-to-speed-up-calculations-on-big-symbolic-matrices

this is my first time posting something on a community of the StackExchange platform, so please feel free to correct me if I'm doing something wrong. :) Additionally you should probably know that I'm ...

—————————-

[How do I 'Join' two Structured Datasets?] http://mathematica.stackexchange.com/questions/129116/how-do-i-join-two-structured-datasets

Consider the following Datasets

dsCompetitions with fields ”id”,”name”,”eventTypeId”

dsEventTypes with fields ”id”, ”name”

I want to join the datasets as follows using SQL pseudocode:

SELECT ...

—————————-

[Why isn't Orderless an Attribute of And?] http://mathematica.stackexchange.com/questions/129415/why-isnt-orderless-an-attribute-of-and

In standard logic And is a commutative operator. Still, in Mathematica, And doesn't have the Orderless attribute:

Attributes[And]
(* {Flat,HoldAll,OneIdentity,Protected} *)

This may have not been ...

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

[Programming the fiver game] http://mathematica.stackexchange.com/questions/120959/programming-the-fiver-game

Obviously, even if I ask a lot of question I am, obviously, still a dummy!!!!

I want to program the fiver game. It's a very simple game played solitary on a the rule is elementary : if ...

—————————-

[How to make an inkblot?] http://mathematica.stackexchange.com/questions/3345/how-to-make-an-inkblot

How to effectively create a polygon that looks like a realistic inkblot? So far, I could come up with this (borrowing from Ed Pegg Jr.'s Rorschach demonstration):

RandomBlot[num_, opts___] :=  ...

================================== Can you answer these? ==================================

[Counting the occurences of entries in a dataset columnwise] http://mathematica.stackexchange.com/questions/129459/counting-the-occurences-of-entries-in-a-dataset-columnwise

Consider a dataset with some rows and considerably less columns (eg something like 10x3). Assume that the contents of the dataset cells are integers from some conveniently chosen range (eg 1 through ...

- asked by user42582 (1 vote)

—————————-

[List, Association, and Dataset, according to what principles to choose which one to use?] http://mathematica.stackexchange.com/questions/129081/list-association-and-dataset-according-to-what-principles-to-choose-which-one

List, Association and Dataset are three 'objects' that can be used to store data in MMA. So when or under what conditions for one to decide to use each of them?

—————————-

[How to ArrayFlatten some matrix which have repeated element] http://mathematica.stackexchange.com/questions/129153/how-to-arrayflatten-some-matrix-which-have-repeated-element

I have many such matrices(whose dimension are all 3*3.) like:

list1={{0,3,0},{4,1,2},{0,5,0}};
list2={{0,6,0},{1,2,8},{0,7,0}};
list3={{0,1,0},{9,5,7},{0,11,0}};
list4={{0,2,0},{5,7,10},{0,12,0}};

...

### 23 Tuesday, October 18, 2016

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

[Why removing a function and defining it on the same line does not work?] http://mathematica.stackexchange.com/questions/128818/why-removing-a-function-and-defining-it-on-the-same-line-does-not-work

Why do the two pieces of code below yield rather different results? The only difference is that in the first one the function definition is in the same line as the Remove command while in the second ...

—————————-

[House of Santa Claus] http://mathematica.stackexchange.com/questions/128741/house-of-santa-claus

The house of Santa Claus is an old German drawing game for small children. You have to draw a house in one line. You must not lift your pencil while drawing.

so T is a ...

### 30 Tuesday, August 30, 2016

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

[How to make a Spherical Cow?] http://mathematica.stackexchange.com/questions/125043/how-to-make-a-spherical-cow

Being a theoretical physicist, I always have a great respect for Spherical Cow. So I thought about making one myself. I am not sure how can I create (something considered to be the simplest!) this ...

—————————-

[Unit Discovery: Is this some sort of a sick joke?] http://mathematica.stackexchange.com/questions/124745/unit-discovery-is-this-some-sort-of-a-sick-joke

Alright, let's have some fun here. I am essentially following the documentation by Wolfram, just looking at different quantities.

N[UnitConvert[Quantity["earth's gravity"]]]

9.80665m/(s)^2

Hmm, ...

—————————-

[Remove noise from data] http://mathematica.stackexchange.com/questions/124928/remove-noise-from-data

Hi, as you can see above I have some experimental data which has a large offset and shows clear noise fluctations around the tendency of the curve. I wanted to ask if someone could suggest me a ...

—————————-

[Q&A Mathematica v.11 Neural Networks: A comprehensive look at Layers, Net Functions, and pioneering into this [[experimental]] code] http://mathematica.stackexchange.com/questions/124977/qa-mathematica-v-11-neural-networks-a-comprehensive-look-at-layers-net-functi

Motivation

As Mathematica v.11 was released earlier this month with a host of new [[experimental]] functions and a limited number of examples on curated data that do not cover all layers, options, ...

—————————-

[Custom OpenerView with lazy evaluation] http://mathematica.stackexchange.com/questions/124892/custom-openerview-with-lazy-evaluation

OpenerView can be nested to create a hierarchical structure such as this:

One great aspect is that it remembers which lists are open and which are closed even after the parent has been closed and ...

—————————-

[RNN in Mathematica?] http://mathematica.stackexchange.com/questions/124988/rnn-in-mathematica

Recurrent neural network is an important part of machine learning and its improved version: LSTM network is widely applied, but Mathematica seemingly is in lack of these two features and in my ...

—————————-

[Pentagonal spiral in Mathematica] http://mathematica.stackexchange.com/questions/125007/pentagonal-spiral-in-mathematica

I would like to plot an image of what I call a pentagonal spiral with Mathematica. A sample image of what I'd like to obtain is this (sorry for low-quality):

My initial idea was to get some kind of ...

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

[Labeling individual curves in Mathematica] http://mathematica.stackexchange.com/questions/4444/labeling-individual-curves-in-mathematica

I need to create a plot for export and inclusion in a report. Is there a better way to label curves than PlotLegends? From what I've read and my personal experience, PlotLegends is pretty bad.

Is ...

—————————-

[How to make this beautiful animation] http://mathematica.stackexchange.com/questions/112700/how-to-make-this-beautiful-animation

How to make an animation of following gif in Mathematica?

Edit: The animation shown above was created by Charlie Deck in processing.

And how to make 3D analog?

I tried first few steps

line = ...

================================== Can you answer these? ==================================

[WolframScript never exits (v11 only)] http://mathematica.stackexchange.com/questions/124667/wolframscript-never-exits-v11-only

after updating to version 11, I came across a problem with the execution of package files via bash.

The WolframScript program runs the entire code, but frequently it does not exit properly and as a ...

—————————-

[Representing inequalties with proper boundaries] http://mathematica.stackexchange.com/questions/124747/representing-inequalties-with-proper-boundaries

I have a very simple problem: given an inequality, I'd like to represent it in a regional plot marking the boundary differently depending whether it belongs to the region or not. For example I'd like ...

—————————-

[StringTemplate performance issue] http://mathematica.stackexchange.com/questions/125087/stringtemplate-performance-issue

StringTemplate introduced in version 10 is very convenient in constructing formatted data. However, it seems to have a huge performance issue.

Consider this example:

data = RandomInteger[1, 100, ...

### 31 Tuesday, August 23, 2016

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

[GeoPosition coordinates from Shape file (.SHP) with unknown Datum] http://mathematica.stackexchange.com/questions/124121/geoposition-coordinates-from-shape-file-shp-with-unknown-datum

The City of Amsterdam supports an Open Data policy. Much information can be retrieved at the level of boroughs (stadsdelen). Unfortunately, GeoGraphics does not provide outlines of these smaller ...

—————————-

[Detecting collisions in FEM] http://mathematica.stackexchange.com/questions/124324/detecting-collisions-in-fem

Say I want to study the deformation of a pitchfork when you have it fixed on the bottom and push one side.

&lt;&lt; NDSolveFEM
Ω =
RegionDifference[Cuboid[{0, -5}, {1, 0}],
Cuboid[{0.45,  ...

—————————-

[Discovering crosswords] http://mathematica.stackexchange.com/questions/124552/discovering-crosswords

I am trying to create a code that can identify the following terms: MATHEMATICA, STACK, EXCHANGE and USERS.

list1={"M","S","T","A","S","I","S","X","X","T","R","X"};
list2={"A ","T ","H ","X ","R ","X  ...

—————————-

[29 Differential equations hang/not solved in version 11 compared to 10.4, looking for cause] http://mathematica.stackexchange.com/questions/124573/29-differential-equations-hang-not-solved-in-version-11-compared-to-10-4-lookin

I run Kamke differential equations in version 11 and compared the result to version 10.4. Found 29 differential equations that are no longer solved in version 11. Actually v11 hangs on these, eating ...

—————————-

[Using predefined expressions as free variables in a pure function] http://mathematica.stackexchange.com/questions/124530/using-predefined-expressions-as-free-variables-in-a-pure-function

I want to have a function value of an expression where some variables are solutions to some set of equations, with some values of parameters. I had an idea to use pure functions for that.

However, ...

—————————-

[How to delete unnecessary resistances in a resistance network] http://mathematica.stackexchange.com/questions/124475/how-to-delete-unnecessary-resistances-in-a-resistance-network

I'm still dealing with resistance network processing and got one problem left: how to delete unnecessary resistances?

Background

Let's assume we are junior high students and know nothing about ...

—————————-

[Object detection in a low contrast image] http://mathematica.stackexchange.com/questions/124060/object-detection-in-a-low-contrast-image

I have a small dark object in the upper left corner of an image.

How can I separate it from the noisy rest and determine its IntensityCentroid?

The problem is that the objects intensity is not ...

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

[Make a beautiful Moiré effect] http://mathematica.stackexchange.com/questions/112998/make-a-beautiful-moir%c3%a9-effect

How do I make the following Moiré pattern?

I tried:

A = Plot[Table[n, {n, 1, 30}], {x, 0, 31},
GridLines -&gt; {Table[n, {n, 1, 30}], None},
GridLinesStyle -&gt; AbsoluteThickness[1.2],  ...

—————————-

[Beautiful dance of the Earth and Venus around the sun] http://mathematica.stackexchange.com/questions/115358/beautiful-dance-of-the-earth-and-venus-around-the-sun

I have seen very nice dynamic graphics created by users of Ma. I would like to get help whether the following graphics can be created using Ma. I was not able to create the dynamic picture here. ...

================================== Can you answer these? ==================================

[CapForm bugged in V11?] http://mathematica.stackexchange.com/questions/124591/capform-bugged-in-v11

It appears on my system (OSX 10.10.5) that CapForm isn't behaving itself in V11. Initially I thought it was a problem with the combination of CapForm and VertexColors but it seems even weirder than ...

—————————-

[Linear tangent steering law and orbital insertion altitude] http://mathematica.stackexchange.com/questions/124489/linear-tangent-steering-law-and-orbital-insertion-altitude

I've been trying to figure out how to build a rocket launch simulation that allows the user to specify the desired altitude at which a payload will be inserted into a stable circular orbit, but have ...

—————————-

[What is a ”generic case”?] http://mathematica.stackexchange.com/questions/124347/what-is-a-generic-case

Introduction

With this question I am coming back to a long-standing issue I have with Mma's concept of a ”generically correct” result. The basic idea seems to be, vaguely, that if a result is true in ...

### 32 Tuesday, August 16, 2016

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

[Can Mathematica put these puzzle pieces together?] http://mathematica.stackexchange.com/questions/123993/can-mathematica-put-these-puzzle-pieces-together

I have five DXF files with various geometric figures.

Are squares with a different geometric shape in each DXF file...

Four DXF files have a square with a different geometric shape on one side ...

—————————-

[How to monitor the process of Neural Network Learning] http://mathematica.stackexchange.com/questions/123684/how-to-monitor-the-process-of-neural-network-learning

Main Problem

I'm exploring the neural network in v11 and I would like to monitor the training progress in my own way instead of Mathematica's default way. So my question is, how to do this ...

—————————-

[Changes to Coefficient function in v10.2] http://mathematica.stackexchange.com/questions/123565/changes-to-coefficient-function-in-v10-2

In the version Mathemaica 10.4, I am very surprised that the core function Coefficient has changed, e.g.,

Coefficient[3 x x + 8 y y - 24 x y, 2 x y]

0

In previous versions (e.g. v9.0.1, ...

—————————-

[Unexpected behaviour from Table[]] http://mathematica.stackexchange.com/questions/124046/unexpected-behaviour-from-table

The following code in Mathematica 11:

iList = {i, -10, 10, 2};
Table[i, iList]

produces this result:

{i, i, i, i}

Where in version 10 (and presumably earlier versions) it produced an error:

...

—————————-

[Can Mathematica act like a web server?] http://mathematica.stackexchange.com/questions/123805/can-mathematica-act-like-a-web-server

I have a Mathematica program that modifies images that I would like to make available for other people to use through the web. The input is only one parameter. So, for example, I could run it as a ...

—————————-

[How to generate all possible orderless partitions of a list according to another list?] http://mathematica.stackexchange.com/questions/123835/how-to-generate-all-possible-orderless-partitions-of-a-list-according-to-another

This question is hard to describe in plain text. So I will post an example and a working code (brute force) to illustrate.

For example I have a list: {1, 2, 3, 4, 5} and a partition list {2, 2, 1}. I  ...

—————————-

[RandomPoint crashes kernel] http://mathematica.stackexchange.com/questions/123735/randompoint-crashes-kernel

Bug introduced in Version 11.0

Reported as CASE:3686963, 12 Aug 2016

I attempted to determine whether the problem with RandomPoint identified in my answer to question 89384 had been fixed in

...

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

[How to Plot an Infinite Series] http://mathematica.stackexchange.com/questions/14083/how-to-plot-an-infinite-series

I want to sketch the graphs of

for on the same axes.

For , I input

Plot[{1/2 +  ...

—————————-

[How to make this beautiful animation] http://mathematica.stackexchange.com/questions/112700/how-to-make-this-beautiful-animation

How to make an animation of following gif in Mathematica?

Edit: The animation shown above was created by Charlie Deck in processing.

And how to make 3D analog?

I tried first few steps

line = ...

================================== Can you answer these? ==================================

I wanted to print out the holidays in Germany in 2016:

DayRange[DateObject[{2016, 1, 1}],
DateObject[{2016, 12, 31}], "Holiday",
HolidayCalendar -&gt; {"Germany", "Bavaria"}]

The result list ...

—————————-

In version 11,if we want to crawl public website like wiki,we can do it like this:

But I don't know how to crawl some website needed ...

—————————-

[NFourierTransform of an interpolating function] http://mathematica.stackexchange.com/questions/123800/nfouriertransform-of-an-interpolating-function

I have an interpolating function called rs22 - a solution from NDSolve - which is defined from 0 to about 1 ms. rs22 is a function that reaches a non-zero equilibrium value. (only shown here up to ...

### 33 Tuesday, August 9, 2016

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

[PostScript-like drawing in Mathematica?] http://mathematica.stackexchange.com/questions/123289/postscript-like-drawing-in-mathematica

To illustrate by example, construct an equilateral triangle in PostScript:

0 0 moveto           %moveto origin
6 0 lineto           %construct first line segment
6 0 translate        %translate  ...

—————————-

[Efficiently exchange elements between two lists] http://mathematica.stackexchange.com/questions/123221/efficiently-exchange-elements-between-two-lists

I have two lists with equal length, and I want to exchange the elements on every even positions. For example,

{{1, 2, 3, 4, 5}, {6, 7, 8, 9, 10}}

will return

{{1, 7, 3, 9, 5}, {6, 2, 8, 4, 10}}

...

—————————-

[Finite element simulation of Airy waves] http://mathematica.stackexchange.com/questions/122063/finite-element-simulation-of-airy-waves

I am attempting to solve for waves on a water surface starting with a two dimensional solution. The equations are that the water must satisfy Laplace's equation everywhere with a time dependent ...

—————————-

[How do you make a Neural Net?] http://mathematica.stackexchange.com/questions/123458/how-do-you-make-a-neural-net

In the new Mathematica release (v11), NeuralNetworks is one of the new main features. However, the documentation isn't that clear on what function should be used in a Net.

The documentation on ...

—————————-

[How to plot data by counties?] http://mathematica.stackexchange.com/questions/123324/how-to-plot-data-by-counties

I'd like to plot county data as in this D3 example:

Is there a way to do this with GeoGraphics, or at least to get path polygons per county and then plot them with different colors?

The first ...

—————————-

[Why are delayed definitions in scoping functions NOT documented?] http://mathematica.stackexchange.com/questions/122061/why-are-delayed-definitions-in-scoping-functions-not-documented

As outlined here, := may be used in scoping constructs like With to give delayed definitions, but this is undocumented.

This has been in the language since at least Mathematica 4.0. It is very ...

—————————-

I plotted the function using the Plot command

Plot[x^2, {x,-5,5}]

I need to shade the area under the curve using a pattern (dots pattern), not using a solid color or a hue. Is it possible? ...

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

[General strategies to write big code in Mathematica?] http://mathematica.stackexchange.com/questions/109888/general-strategies-to-write-big-code-in-mathematica

I think after six months of exposure to Mathematica and the Wolfram Language I am fairly OK with writing short codes and snippets. However, what are some general strategies to use in order to write ...

—————————-

[Where can I find examples of good Mathematica programming practice?] http://mathematica.stackexchange.com/questions/18/where-can-i-find-examples-of-good-mathematica-programming-practice

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...

================================== Can you answer these? ==================================

[Can I use Mathematica as a constraint solver?] http://mathematica.stackexchange.com/questions/123487/can-i-use-mathematica-as-a-constraint-solver

I have been using SMT solvers for program analysis. Basically the idea is to translate x86 assembly code to SMT formulas and use the solver for automatic input test generation. There is a Microsoft ...

- asked by Edgar (1 vote)

—————————-

[Why is this function slower after a simple change?] http://mathematica.stackexchange.com/questions/122109/why-is-this-function-slower-after-a-simple-change

I have a function that calculates the rank of a restricted growth string defined like so,

rankKRGS[{}] = 0;
rankKRGS[string_] :=
With[{n = Length@string, k = Max@string + 1, alone =  ...

—————————-

[Is there an efficient way to monitor the progress of a task remotely?] http://mathematica.stackexchange.com/questions/123181/is-there-an-efficient-way-to-monitor-the-progress-of-a-task-remotely

Recently, I've been running Mathematica packages on a remote cluster using SSH (using, e.g. the command

nohup nice math -noprompt -run "&lt;&lt;myPackage.m" &gt; myOutput &amp;

so that the output ...

### 34 Tuesday, August 2, 2016

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

[How can I detect locations of Go (aka Baduk, Weiqi) stones on a board?] http://mathematica.stackexchange.com/questions/121835/how-can-i-detect-locations-of-go-aka-baduk-weiqi-stones-on-a-board

The Goal

There are a couple apps that score a Go board from a photo. I was wondering if something like that would be possible with Mathematica. The key step is to detect the positions of the stones ...

—————————-

[What are all the ”magic” Symbols in the Mathematica language?] http://mathematica.stackexchange.com/questions/121981/what-are-all-the-magic-symbols-in-the-mathematica-language

Leonid Shifrin once wrote (excerpted):

(Unevaluated) is one of a very few ”magic symbols”, along with Sequence and Evaluate - these are deeply wired into the system and can not be easily ...

—————————-

[What has changed in pattern matching functions with the Orderless attribute?] http://mathematica.stackexchange.com/questions/121564/what-has-changed-in-pattern-matching-functions-with-the-orderless-attribute

In making an attempt to answer this question, we ran into a version-dependent pattern-matching issue. An extended discussion in the comments transpired, and some inconsistencies arose. Consider the ...

—————————-

[Converting a Sierpinski tetrahedron to a Graph] http://mathematica.stackexchange.com/questions/121553/converting-a-sierpinski-tetrahedron-to-a-graph

I need a representation of a 3D Sierpinski gasket as a graph to perform some simulations on. The 2D version is included in GraphData[], but the 3D one is nowhere to be found, so I was wondering if ...

—————————-

[Working with DynamicModule: SetDelayed + OwnValues] http://mathematica.stackexchange.com/questions/121584/working-with-dynamicmodule-setdelayed-ownvalues

Shortly, definitions in form of e.g. x:= RandomReal[] have to be avoided
inside DynamicModule[{x}, ...]. Why?, this Prints immediately:

DynamicModule[{x}, x := Print[1]; {}]

It hit us hard in the ...

—————————-

[How to speed up pattern matching] http://mathematica.stackexchange.com/questions/121911/how-to-speed-up-pattern-matching

Main Problem

Mr.Wizard posed this question when discussing another problem.

I reproduce the main part of Mr.Wizard's problem here:

MatchQ[{1, 2, 3, 4, 5}, {x__?((Echo[##]; False) &amp;), y__}]

On ...

—————————-

[How to efficiently implement k-FN (k-Furthest Neighbors)?] http://mathematica.stackexchange.com/questions/121541/how-to-efficiently-implement-k-fn-k-furthest-neighbors

I'd like to pick k points from a set of points in n-dimensions that are approximately ”maximally apart” (sum of pairwise distances is almost maxed). What is an efficient way to do this in MMA? Using ...

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

[Writing a word with straight lines] http://mathematica.stackexchange.com/questions/113403/writing-a-word-with-straight-lines

Here is an interesting way to write a word: (it is from a poster for the International Museum Day 2006; I believe it even won an award at an international design competition)

by Boris Ljubicic. ...

—————————-

[Make a beautiful Moiré effect] http://mathematica.stackexchange.com/questions/112998/make-a-beautiful-moir%c3%a9-effect

How do I make the following Moiré pattern?

I tried:

A = Plot[Table[n, {n, 1, 30}], {x, 0, 31},
GridLines -&gt; {Table[n, {n, 1, 30}], None},
GridLinesStyle -&gt; AbsoluteThickness[1.2],  ...

================================== Can you answer these? ==================================

[Looking for a package for finite mappings] http://mathematica.stackexchange.com/questions/121776/looking-for-a-package-for-finite-mappings

I am looking for a package for dealing with ”mappings” where and are finite subsets of the set of all possible (inert) expressions.

I need operations like:

Computing ...

—————————-

[Using Palettes in Mathematica Online] http://mathematica.stackexchange.com/questions/121935/using-palettes-in-mathematica-online

my student is using the online version of Mathematica for my class; it appears to not have a palette feature for typing formatted input? This was kind of shocking to me; why wouldn't there be a ...

- asked by Jake Mirra (1 vote)

—————————-

[Derivation of an interpolation function with multiple arguments] http://mathematica.stackexchange.com/questions/121599/derivation-of-an-interpolation-function-with-multiple-arguments

I have the following interpolation function:

f[x_,a_,b_]:=70 s[a,b][[1,1,2]][x]

where s[a,b] is the solution of a differential equation.

s[a_, b_] := NDSolve[{
H2[x] == Rx[x]^2 + G[x, a, b],
...

### 35 Tuesday, July 26, 2016

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

[Generate a certain colorful triangle] http://mathematica.stackexchange.com/questions/121353/generate-a-certain-colorful-triangle

I want to get a colorful triangle like this:

I hope to get a triangle with any number of layers. This is my current method. Actually, I'm not very content with these graph theory functions, since ...

—————————-

When you write this code:

tab = {{1, 1}}; tab = Join[tab, {{2,2}}];

you expect to get the following table:

{{1, 1}, {2, 2}}

but, if you write the following code instead:

tab = {{1, 1}}; tab =  ...

—————————-

[Handwriting recognition with Mathematica] http://mathematica.stackexchange.com/questions/121051/handwriting-recognition-with-mathematica

I am trying to teach Mathematica to read my handwriting. Since I don't want to ruin my reputation by showing my own handwriting, I am going to use a font called blackjack.

Lets say this is a ...

—————————-

A number of special definitions are loaded from .tr files on Front End initialization and are accessible via FrontEndResource. These are used among other things for various menus and toolsbars, e.g.:

—————————- [Bug with Compile and Log2?] http://mathematica.stackexchange.com/questions/121336/bug-with-compile-and-log2

It seems that Log2 in Compile gives numerical errors (CompiledFunction::cfn) if the input is not a power of 2.

For instance:

test1 = Compile[{{in, _Integer}}, Log2[in]];
test1[3]

gives an error ...

—————————-

[What is the effect of giving ColorFunctionScaling a numerical argument?] http://mathematica.stackexchange.com/questions/121231/what-is-the-effect-of-giving-colorfunctionscaling-a-numerical-argument

(by making a mistake) I realised that ColorFunctionScaling can take a list of numerical arguments rather than just booleans. The following is true for ContourPlot and DensityPlot but not Plot3D and ...

—————————-

[Reproducing the xkcd ”Self-Description” comic] http://mathematica.stackexchange.com/questions/121160/reproducing-the-xkcd-self-description-comic

Trying to brush up on my programming, I wanted to see if I can reproduce at least the first two panels of the following comic in Mathematica:

I have some code for trying to reproduce the first ...

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

[Exporting graphics to PDF - huge file] http://mathematica.stackexchange.com/questions/1542/exporting-graphics-to-pdf-huge-file

I want to draw some basic surfaces, export them to PDF and include them in a LaTeX file. I create a simple 3D graphics object, for instance with

ParametricPlot3D[{r Cos[\[Theta]], r Sin[\[Theta]],  ...

—————————-

[Calculate the 2D Fourier transform of an Image] http://mathematica.stackexchange.com/questions/29203/calculate-the-2d-fourier-transform-of-an-image

I am new to Mathematica, and using version 8.0.

I would like to calculate the 2D Fourier Transform of an Image with Mathematica and plot the magnitude and phase spectrum, as well as reconstruct the ...

================================== Can you answer these? ==================================

[single slit diffraction numerical simulation] http://mathematica.stackexchange.com/questions/121474/single-slit-diffraction-numerical-simulation

I'm trying to simulate the Fraunhoffer diffraction at slits(single,double,triple) with Mathematica.

In the picture, the red one is analytical result and the green one is numerical result.

The ...

—————————-

[How does the Contours-¿f_1, g1, f_2, g_2,... setting work?] http://mathematica.stackexchange.com/questions/121205/how-does-the-contours%e2%86%92f-1-g1-f-2-g-2-setting-work

I want to plot some wavefronts in Mathematica, and I'm having some trouble reining in one of the options for my ContourPlot3D.

More specifically, the documentation for ContourPlot3D says that the ...

—————————-

[Is every menu command equivalent to a command that can be executed within a notebook?] http://mathematica.stackexchange.com/questions/121453/is-every-menu-command-equivalent-to-a-command-that-can-be-executed-within-a-note

If so, is there a directory which gives the in-notebook command associated with each menu command ?

In particular, I would like to know how to replicate the
menu command Evaluation -> Quit Kernel ->  ...

### 36 Tuesday, July 19, 2016

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

[How can I better mimic the graphics at earth.nullschool.net?] http://mathematica.stackexchange.com/questions/120842/how-can-i-better-mimic-the-graphics-at-earth-nullschool-net

I'd like to be able to better mimic the graphics at earth.nullschool.net using Mathematica and I'm looking for suggestions for either improving my code or getting directed to some other approach.

...

—————————-

[how to permute list of number1,2,3,...,n,while preserve the order of first m terms as well as the last n-m terms?] http://mathematica.stackexchange.com/questions/120690/how-to-permute-list-of-number1-2-3-n-while-preserve-the-order-of-first-m-t

For example, starting from 1,2,3,4, I want to generate all permutations like 1,3,2,4,1,3,4,2,3,4,1,2 which preserve the order of e.g first two terms 1,2 and the order of e.g. last two terms ...

—————————-

[Create a polynomial of a given degree] http://mathematica.stackexchange.com/questions/120841/create-a-polynomial-of-a-given-degree

In Mathematica, how can I create a polynomial function in given variables of a given degree with unknown coefficents?

That is, I am looking for a function Poly[vars, degree] that generates, for ...

—————————-

[Fractal basins of attraction in a Magnetic Pendulum] http://mathematica.stackexchange.com/questions/120946/fractal-basins-of-attraction-in-a-magnetic-pendulum

I am trying to write a Mathematica program that realizes a graphical approximation of the basins of attraction in a Magnetic pendulum subject to friction and gravity, in which the three magnets are ...

—————————-

[Draw half empty rectangle] http://mathematica.stackexchange.com/questions/120781/draw-half-empty-rectangle

How can I draw an half or a third filled rectangle? I want to make one rectangle frame with a unity width and then filled it according to a value between 0 and 1.

—————————-

[How to access ”Choose Color Scheme” Programmatically] http://mathematica.stackexchange.com/questions/120999/how-to-access-choose-color-scheme-programmatically

I am designing an App and I want to use the ”Choose Color Scheme” tools inside Button.

I am looking to have this tool in popup window when the Button is clicked but I can't find the command to get ...

—————————-

[Programming the fiver game] http://mathematica.stackexchange.com/questions/120959/programming-the-fiver-game

Obviously, even if I ask a lot of question I am, obviously, still a dummy!!!!

I want to program the fiver game. It's a very simple game played solitary on a the rule is elementary : if ...

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

[Creating 3D dice] http://mathematica.stackexchange.com/questions/110295/creating-3d-dice

How to create an image of a 3D die from the 2D images?

There is an example in the Documentation Center

I tried

but it doesn't work.

—————————-

[xkcd-style graphs] 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 you answer these? ==================================

[How to increase the image resolution of a map?] http://mathematica.stackexchange.com/questions/120572/how-to-increase-the-image-resolution-of-a-map

I'd like to obtain higher-resolution geographic maps retrieved from Wolfram geo server, since the standard resolution seems poor.

I tried to increase the ”TileSize” parameter, like this:

...

—————————-

[Hidden Markov Model: emissions probabilities dependent on observable parameter] http://mathematica.stackexchange.com/questions/120700/hidden-markov-model-emissions-probabilities-dependent-on-observable-parameter

I need to fit an HMM where the emission probabilities (ep) are discrete and dependent on a known variable quantity. E.g.:

Imagine a daily time series of binary emissions (”1” or ”2”). I suppose an ...

- asked by CupiDio (1 vote)

—————————-

[Why are there these jagged ”shards” in my RegionPlot3D?] http://mathematica.stackexchange.com/questions/120712/why-are-there-these-jagged-shards-in-my-regionplot3d

I'm creating a region out of two component regions. Before anyone suggests it (because a lot of similar questions are about it), I don't think the problem is increasing PlotPoints. I've increased it ...

- asked by YungHummmma (1 vote)

### 37 Tuesday, July 12, 2016

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

[How to extract the list of all matrices from a Block Diagonal Matrix?] http://mathematica.stackexchange.com/questions/120433/how-to-extract-the-list-of-all-matrices-from-a-block-diagonal-matrix

I am working on a function to do the opposite operation of How to form a block-diagonal Matrix from a list of matrices?

Here is my current algorithm: For i starting at 1, scan the elements of index ...

—————————-

[Collect all inputs from Documentation Center] http://mathematica.stackexchange.com/questions/120334/collect-all-inputs-from-documentation-center

Is it possible to collect all inputs programmatically from every function in the Documentation Center in a list and wrap them in a HoldComplete?

My case: With some fundamental functions modified, I ...

—————————-

[How to avoid procedural loops in this example?] http://mathematica.stackexchange.com/questions/120533/how-to-avoid-procedural-loops-in-this-example

I want to iterate over a list, and return the index as long as I found the first element satisfying my condition. Written in a for loop:

f[x_]:=2x

For[i=1, i&lt;=10, i++,
If[f[i]==10, Return[i]]
]
...

—————————-

Recently, I have rewritten pure Wolfram Language implementation CAGDBSplineSurface[] with C. Below is main LibraryLink code:

#include "WolframLibrary.h"

...

—————————-

[How can I combine a list of Line[]'s into one continuous Line?] http://mathematica.stackexchange.com/questions/120285/how-can-i-combine-a-list-of-lines-into-one-continuous-line

I have a huge list of Lines. Take this one as an example:

linelist1 = {Line[{{0.15042300130733277,
0.09918669845167598}, {0.15124668865085406,
0.09522452324491057}}],
...

—————————-

[NIntegrate appears to give incorrect results] http://mathematica.stackexchange.com/questions/120118/nintegrate-appears-to-give-incorrect-results

I am trying to specify a bivariate probability density function in Mathematica. As a check, I would like to confirm that it integrates to one. Here is the function:

f[x1_, x2_, u1_, u2_, v11_, v22_,  ...

—————————-

[Which fonts are supported in Wolfram Cloud?] http://mathematica.stackexchange.com/questions/120102/which-fonts-are-supported-in-wolfram-cloud

I recently suggested creating dynamic community ads with Wolfram Cloud. @C.E. made a proof of concept ad to show that it works well.

Fonts are an important part of graphics design. It is useful to ...

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

[What is the best Mathematica tutorial for young people?] http://mathematica.stackexchange.com/questions/733/what-is-the-best-mathematica-tutorial-for-young-people

As Conrad Wolfram said at the TED conference, in the future kids should focus more on new technology. Computers compute better than humans, so we should focus more on thinking and getting the ...

—————————-

[Mathematica Minecraft] http://mathematica.stackexchange.com/questions/19669/mathematica-minecraft

Some time ago I asked myself: with all these great graphics and interactive capabilities of Mathematica, what kinds of 3D games can be implemented in it? And the answer which came to mind is ...

================================== Can you answer these? ==================================

[integrate giving wrong result] http://mathematica.stackexchange.com/questions/120495/integrate-giving-wrong-result

A question with the same title has been asked many times, but I can't find the solution of my problem in their answers. The integral I am trying to calculate is

Integrate[Sin[q ]^2 / Sinh[q]^2, {q,  ...

—————————-

According to the documentation center for FinancialDerivative in version 10.4, when there are multi assets, we still may use FinancialDerivative with the corresponding correlation matrix to find the ...

—————————-

[What does the GraphLayout -¿ ”SpectralEmbedding” option do (mean) when displaying a graph?] http://mathematica.stackexchange.com/questions/120139/what-does-the-graphlayout-spectralembedding-option-do-mean-when-displayin

I have some relational data represented as a graph. As such some of the relational properties can be recognized. When I use the GraphLayout -¿ ”SpectralEmbedding” option a very nice and sharply ...

### 38 Tuesday, July 5, 2016

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

Which Object-Oriented Paradigm (OOP) approach to use in Mathematica for:

general implementation, or a particular project?

There are a lot of related questions and answers in MSE on doing OOP that ...

—————————-

[How can I use Mathematica to sort the US Congressional Districts by Perimeter÷Area] http://mathematica.stackexchange.com/questions/119944/how-can-i-use-mathematica-to-sort-the-us-congressional-districts-by-perimeter%c3%b7ar

The United States is divided into 435 congressional districts. Some of their shapes can be really strange due to gerrymandering. I think that I can find very gerrymandered congressional districts if ...

—————————-

[Gillespie Stochastic Simulation Algorithm] http://mathematica.stackexchange.com/questions/119786/gillespie-stochastic-simulation-algorithm

The Gillespie SSA is a Monte Carlo stochastic simulation algorithm to find the trajectory a dynamic system described by a reaction (or interaction) network, e.g. chemical reactions or ecological ...

—————————-

[How to create a fascinating QR code like this?] http://mathematica.stackexchange.com/questions/120041/how-to-create-a-fascinating-qr-code-like-this

Check the facinating QRCode in my profile page here

You can find that this QRCode is some sort of intriguing as the QRCode is a IMAGE ITSELF!!!

So my question is, how to create such a QRCode ...

—————————-

[Data extraction from a picture of a graph] http://mathematica.stackexchange.com/questions/119666/data-extraction-from-a-picture-of-a-graph

How can I extract data from this picture of a graph?

i = Import["http://i.stack.imgur.com/Ac8m0.png"];

The caption of the picture reads: ” Two-dimensional histogram values measured . Tick labels ...

—————————-

[Evaluating summations involving Fibonacci numbers in terms of Fibonacci numbers] http://mathematica.stackexchange.com/questions/119822/evaluating-summations-involving-fibonacci-numbers-in-terms-of-fibonacci-numbers

There are many summations involving Fibonacci numbers which Mathematica 10.4 is able to evaluate directly in terms of Fibonacci numbers. For example, Mathematica evaluates the summation given below as ...

—————————-

[TreeForm outputs different results for the same inputs but why?] http://mathematica.stackexchange.com/questions/119745/treeform-outputs-different-results-for-the-same-inputs-but-why

First of all, please look at the below inputs and outputs:

In[1]:= $a = Array[# Range[#] &amp;, {5}] Out[1]= {{1}, {2, 4}, {3, 6, 9}, {4, 8, 12, 16}, {5, 10, 15, 20, 25}} In[2]:=$af = Flatten[$a, ... - asked by Taiki Bessho (8 votes), answered by JasonB (11 votes) ================================== Greatest hits from previous weeks: ================================== [How to plot an ellipse?] http://mathematica.stackexchange.com/questions/20100/how-to-plot-an-ellipse I'm new to Mathematica, and I'm finding it difficult to plot an ellipse. I tried using Plot[(x/5)^2 + (y/3)^2 == 1, {x, -5, 5}, {y, -3, 3}] but I'm getting some errors. Is there something wrong ... - asked by Sriram (6 votes), answered by Jens (15 votes) —————————- [Is it possible to draw this figure using Mathematica?] http://mathematica.stackexchange.com/questions/110848/is-it-possible-to-draw-this-figure-using-mathematica The figure is See the how-to video or a speeded-up GIF. I believe it should be possible to draw this figure programmatically using some Random function, but I'm rather new to Mathematica, so I ... - asked by AccidentalFourierTransform (50 votes), answered by M.R. (75 votes) ================================== Can you answer these? ================================== [Hide Notebook scrollbars] http://mathematica.stackexchange.com/questions/119665/hide-notebook-scrollbars Is it possible to hide the scrollbars from the notebook windows while still being able to use the mousewheel to scroll? Since I never click on the bars themselves they're just a waste of space. It's ... - asked by Ray (3 votes) —————————- [Hold Values of DensityPlot to use for an other DensityPlot] http://mathematica.stackexchange.com/questions/120022/hold-values-of-densityplot-to-use-for-an-other-densityplot I have two surface functions, f[x,y] and g[x,y]. Assuming that the DensityPlot of f and g takes a while, is there a way to hold the values of DensityPlot, to efficiently DensityPlot f[x,y]-g[x,y] ? ... - asked by Pierre L. (1 vote) —————————- [How to place window on second screen?] http://mathematica.stackexchange.com/questions/119835/how-to-place-window-on-second-screen I am trying to open a window on a second screen (a thunderbolt display attached to a macbook pro) that is the full size of the second screen. Here is the command I use: ThunderboltDimensions = 2560, ... - asked by abwatson (1 vote) ### 39 Tuesday, June 28, 2016 ================================== Top new questions this week: ================================== [Is the renaming mechanism of ‘With‘ flawed?] http://mathematica.stackexchange.com/questions/119403/is-the-renaming-mechanism-of-with-flawed I'm confused about the renaming mechanism of With: With[{x = a}, Hold[With[{a = b}, a + 2 x]]] (*==&gt;Hold[With[{a$ = b}, a$+ 2 a]]*) With[{x = a$}, Hold[With[{a = b}, a + 2 x]]]
...

—————————-

Below is some code I am working on; being a beginner. How can I increase the readability of the part behind Manipulate?

I can't read my own code anymore, because it is simply too long and unordered. ...

—————————-

[Mysterious behaviour of Pick] http://mathematica.stackexchange.com/questions/119223/mysterious-behaviour-of-pick

As everyone knows, Pick can do amazing things, The most facinating phenomenon is that it can pick though all sorts of lists:

The basic &amp; pattern matching:

Pick[{4, 5, 6}, {1, 2, 1}, 1]
(*{4,6}*)
...

—————————-

Recently, I use the C to rewrite a Mathematica function NonzeroBasis[], please see here for fully descriptions.

Here, NonzeroBasis[i,p,u,U] calculates the values of ...

—————————-

[Is it possible to attach a debugger to a dynamically linked library on the supported OS?] http://mathematica.stackexchange.com/questions/119083/is-it-possible-to-attach-a-debugger-to-a-dynamically-linked-library-on-the-suppo

Recently, I discovered that LibraryLink technique is a very useful tool to improve the performance of function. Firstly, I need to use LibraryLink template to write C/C++ program. Then compiling the ...

—————————-

[Nothing not behaving as expected?] http://mathematica.stackexchange.com/questions/119239/nothing-not-behaving-as-expected

I was thinking that Nothing was doing the same job as the vanishing sequence ##&amp;[].

Yet this exemple shows it doesn't.

Association[If[True,Nothing]] (*returns Association[Nothing]*)
...

—————————-

I am trying to simulate a random walk on a Sierpinski gasket. The best strategy i could come up with is to use Nearest point function to determine the next possible step of my walker. But this creates ...

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

[Creating legends for plots with multiple lines?] http://mathematica.stackexchange.com/questions/4025/creating-legends-for-plots-with-multiple-lines

So I have a graph with multiple lists, for e.g.

data = {{1,2}, {3,4}, {3,5}, {2,3} . . .}

If I then do ListLinePlot[Table[{#1,Log[b,#2]}&amp;@@@data, {b,1,10,2}]] I have no way to generate a legend  ...

—————————-

[How can this image (optical illusion) be created with Mathematica?] http://mathematica.stackexchange.com/questions/24148/how-can-this-image-optical-illusion-be-created-with-mathematica

I came across this image the other day:

and liked the sensation of it pulsing. I was wondering if anyone would know how to create something similar with Mathematica (without the Pink Floyd Dark ...

================================== Can you answer these? ==================================

[Is pattern matching just systematic guessing and checking?] http://mathematica.stackexchange.com/questions/119394/is-pattern-matching-just-systematic-guessing-and-checking

How does the pattern matcher work?

how does it match this example?

f[3, h[4]] /. f[x_, z_[y_]] :&gt; {x, y, z}

My guess is that the pattern matcher collects all the names in the expression f[3, ...

—————————-

[How can I move he documentation to another location after install on Windows?] http://mathematica.stackexchange.com/questions/119503/how-can-i-move-he-documentation-to-another-location-after-install-on-windows

How can I move he documentation to another location after install on Windows?

I would like to move the documentation to another partition on my Windows filesystem. Michael Hale in chat recommended ...

—————————-

[How to perform convolutions on this complicated pdf?] http://mathematica.stackexchange.com/questions/119034/how-to-perform-convolutions-on-this-complicated-pdf

For a known pdf f[x], I need to calculate integrals over the probability density of the sum of Log[f[x]] over independent samples:

Since the sample ...

### 40 Tuesday, June 21, 2016

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

[ graphic of soccer ball] http://mathematica.stackexchange.com/questions/118604/3d-graphic-of-soccer-ball

How to make a soccer ball graphic?

The following image is from Wikipedia, Spherical polyhedron:

Truncated icosahedron (left) and standard soccer ball (right)

...

—————————-

[The character sequence ”
. d” triggers line break in strings] http://mathematica.stackexchange.com/questions/118801/the-character-sequence-d-triggers-line-break-in-strings

Bug introduced in 7.0 or earlier and persists through 10.4.1

Bug isn't present in version 5.2

Update: Sjoerd pointed out that this happens with any string and it is not related to StringForm. Just ...

—————————-

[Inconsistent handling of Dynamic option values; intended, omission, or bug?] http://mathematica.stackexchange.com/questions/118646/inconsistent-handling-of-dynamic-option-values-intended-omission-or-bug

In answering Dynamic ClipPlanes calculated from current ViewPoint Kuba and I got into a brief exchange regarding how Option values wrapped in Dynamic should be handled. For background John Fultz ...

—————————-

[How can I plot this spirally surface?] http://mathematica.stackexchange.com/questions/118887/how-can-i-plot-this-spirally-surface

I would like to plot a surface that looks something like this sand spiral.

But I really have no idea how. Ideally I would like to be able to express this as a function in cartesian coordinates. I'm ...

—————————-

[Any manual on cell grouping management?] http://mathematica.stackexchange.com/questions/118649/any-manual-on-cell-grouping-management

Recently I come back to the problem of cell grouping and performed extensive search on this site and on MathGroup archive for information on how to use the possible values of the CellGroupingRules ...

—————————-

[How can Mathematica be used to create Images like these?] http://mathematica.stackexchange.com/questions/118992/how-can-mathematica-be-used-to-create-images-like-these

Here are two examples of artistic image interpolation using just black lines. The first link shows the desired result created by an artist and the second done with C#.

TRIANGULATION: ANGULAR ...

—————————-

[How to implement custom NIntegrate integration strategies?] http://mathematica.stackexchange.com/questions/118920/how-to-implement-custom-nintegrate-integration-strategies

How can new integration strategies algorithms be used with NIntegrate?

This is a different type of extension than the extensions with new integration rules, as described in the answer for the ...

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

[Fit image of mountain to gaussian] http://mathematica.stackexchange.com/questions/109946/fit-image-of-mountain-to-gaussian

I want to detect the edges of an image of a mountain and then fit that to a gaussian.

I am unsure about how to only get the mountain edge, rather than every single edge in the image.

How do I ...

—————————-

[How to find the position of elements in a list satisfying criteria] http://mathematica.stackexchange.com/questions/180/how-to-find-the-position-of-elements-in-a-list-satisfying-criteria

Say I have a list x={2,4,6,8,10} and I want to find out the positions of the elements that are greater than 7.

Select[x, #&gt;7&amp;] gives the elements themselves, and Position[x,8] gives the  ...

================================== Can you answer these? ==================================

[Softmax Regression Classification Algorithm] http://mathematica.stackexchange.com/questions/118958/softmax-regression-classification-algorithm

I'm following the Stanford Machine Learning course while simultaneously developing my Mathematica abilities. I'm having issues with my Softmax Classifier implementation (for ref, have a look at these ...

—————————-

[Protected Variable Error with Workbench 3.0] http://mathematica.stackexchange.com/questions/118919/protected-variable-error-with-workbench-3-0

I have Wolfram Workbench 3.0, build 78, with Mathematica 10.4 as the front end. I am using Windows 10. I am trying to run a simple test source code test.m:

fun[x_] := x^2;

I have an empty notebook ...

—————————-

[Putting the elements of a list inside another list] http://mathematica.stackexchange.com/questions/118837/putting-the-elements-of-a-list-inside-another-list

I have the list list1 = 1, 3, 4, 5, 6 and want to put the elements of this list inside a list of 0's, list2 = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, where each element of list1 will be in the ...

- asked by user41129 (1 vote)

### 41 Tuesday, June 14, 2016

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

[Are you interested in a Wolfram Workbench Update?] http://mathematica.stackexchange.com/questions/118154/are-you-interested-in-a-wolfram-workbench-update

I also posted this on the Wolfram Community site (link below)

Last week I attended the Wolfram Tour (which was great). I asked whenever we could expect a new version of Workbench, as the current ...

—————————-

This is a problem confusing me for years.

AccuracyGoal and PrecisionGoal are two options that I never truly understand and, to be honest, always avoid touching. Let's first look at the descriptions ...

—————————-

[Can Mathematica recompose an image?] http://mathematica.stackexchange.com/questions/117892/can-mathematica-recompose-an-image

The OP in this post on superuser.com asks how to recompose an image; quoting:

I have a set of images, which are parts of a bigger image.

I would like the images to assembled as automated as ...

—————————-

[How to implement custom integration rules for use by NIntegrate] http://mathematica.stackexchange.com/questions/118324/how-to-implement-custom-integration-rules-for-use-by-nintegrate

How can NIntegrate be extended with custom implementation of integration rules?

This answer of the question ”Monte Carlo integration with random numbers generated from a Gaussian distribution” shows ...

—————————-

[Unexpected behavior of Sequence – using Sequence to delete parts of an expression] http://mathematica.stackexchange.com/questions/118108/unexpected-behavior-of-sequence-using-sequence-to-delete-parts-of-an-expressi

I thought that assigning Sequence[] to the part of an expression was an effective way to remove it. For example, the following code yields 2,3,4,5:

xx = Range[5]; xx[[1]] = Sequence[]; xx

Thus, I ...

—————————-

A friend of mine showed me this example:

Plot[BesselJ[9/2, x], {x, 0, 1},
PlotLabel -&gt; Style["The integrand seems to be simple", 14]]

Integrate[BesselJ[9/2, x], {x, 0, 1}] // N
(*  ...

—————————-

[How do I insert OwnValues inside a held expression without evaluating it?] http://mathematica.stackexchange.com/questions/118030/how-do-i-insert-ownvalues-inside-a-held-expression-without-evaluating-it

Here is a very long and complicated expression, which we abbreviate as a. I store it using SetDelayed because I want to perform algebraic manipulations on it:

ClearAll[a];
a := 1 + 1

Here is a ...

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

[Where can I find examples of good Mathematica programming practice?] http://mathematica.stackexchange.com/questions/18/where-can-i-find-examples-of-good-mathematica-programming-practice

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...

—————————-

[++ is dangerous for C programmers] http://mathematica.stackexchange.com/questions/107619/is-dangerous-for-c-programmers

I noticed this fact, that may be misleading for programmers used to C language.

In Mathematica, if you have a function f[] and an array v, and you write

v[[ f[] ]]++

the function f is called ...

================================== Can you answer these? ==================================

[Solve and design ”water flow”] http://mathematica.stackexchange.com/questions/118183/solve-and-design-water-flow

In some strategy game I play, I'll have to change the terrain to make the water flow in some specific way to fulfill my goal. The water flow changes with terrain so if I can change the terrain wisely ...

—————————-

[Is there a way to figure out the ”upper limit” of my PC's computational ability in Mathematica?] http://mathematica.stackexchange.com/questions/117852/is-there-a-way-to-figure-out-the-upper-limit-of-my-pcs-computational-ability

I am doing some simulations with Finite Element Analysis (FEA) and part of it is forming a mesh in 3D and then using NDSolveValue to solve a differential equation on that mesh.

For some meshes, my ...

—————————-

[Numerical testing of Hardy's inequality] http://mathematica.stackexchange.com/questions/118061/numerical-testing-of-hardys-inequality

I want to check the following Hardy's most fundamental inequality by using Mathematica:

...

### 42 Tuesday, June 7, 2016

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

[Bug with MapAt, Span, and Association?] http://mathematica.stackexchange.com/questions/116561/bug-with-mapat-span-and-association

Bug introduced in 10.0 and persisting through 10.4.1 or later

Related to Mapping (Query) a function at multiple locations in nested data via All, Span, it seems to me that the behavior of MapAt ...

—————————-

[Joining points into 3D surface] http://mathematica.stackexchange.com/questions/117736/joining-points-into-3d-surface

This seems like a simple problem, but I can't find any questions like it here so I'm making a new one. Apologies if I missed one.

I have a list of points contained in a file which can be visualized ...

—————————-

[How to check the validity of an option value] http://mathematica.stackexchange.com/questions/116623/how-to-check-the-validity-of-an-option-value

I have a user-defined function, func, which takes the following form:

func[arg1, arg2, options]

Here is the actual code

Options[func] =
{opt1 -&gt; Automatic, opt2 -&gt; False, opt3 -&gt; {1,  ...

—————————-

[Why does the GeoGraphics Frame show different Latitude than GeoPosition?] http://mathematica.stackexchange.com/questions/116507/why-does-the-geographics-frame-show-different-latitude-than-geoposition

The map looks right, but the Latitude in the Frame looks wrong.

Am I making a mistake or is this a bug?

—————————-

[Rotate Geographic map] http://mathematica.stackexchange.com/questions/117744/rotate-geographic-map

I want the map to be rotated by -45 Degree. I want to coast to be horizontal (perfect -45 degree). I already have:

loc = GeoPosition[{52.57243, 5.51780}];
loc1 = GeoPosition[{52.57718, 5.52193}];
...

—————————-

Description

For the built-in programming language(or called Wolfram Language) of Wolfram Mathematica, I think it is much easier and simpler to learn than other computer language(such as C/C++ or ...

—————————-

[Nested association values validation. POJsO handling] http://mathematica.stackexchange.com/questions/116571/nested-association-values-validation-pojso-handling

Sometimes it is convenient to work in your package/app with ”objects” like:

childObject = &lt;|
"id" -&gt; 284,
"text" -&gt; "texttext",
"property" -&gt; &lt;|
"type" -&gt; "String",
...

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

[Where can I find examples of good Mathematica programming practice?] http://mathematica.stackexchange.com/questions/18/where-can-i-find-examples-of-good-mathematica-programming-practice

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...

—————————-

[How to create word clouds?] http://mathematica.stackexchange.com/questions/2334/how-to-create-word-clouds

Word clouds are rather useless fancy and visually appealing plots, where words are plotted with different sizes according to their frequency in a corpus. Many applications exist out there (Wordle, ...

================================== Can you answer these? ==================================

[What is the difference between getting a boundary mesh from ToBoundaryMesh vs doing it with ToElementMesh?] http://mathematica.stackexchange.com/questions/116559/what-is-the-difference-between-getting-a-boundary-mesh-from-toboundarymesh-vs-do

I am trying to figure out how to define and use meshes for FEM and NDSolve. I've figured out that if I want more resolution near my boundaries, I can use ToBoundaryMesh to first create the boundary ...

—————————-

[Solving Differential Equation for derivative] http://mathematica.stackexchange.com/questions/117689/solving-differential-equation-for-derivative

I am new to mathematica and am trying to solve a differential equation. Actually, I am not entirely sure if the system can be called differential equation.

I am interested in finding out the second ...

- asked by JKJ (1 vote)

—————————-

[ShortestTour Problem with Constraints] http://mathematica.stackexchange.com/questions/116505/shortesttour-problem-with-constraints

I can solve a travelling salesman problem with FindShortestTour[], but couldn't find any function to solve a shorest tour problem with additional constraints like cost, fuel capacity etc. How cam I ...

### 43 Tuesday, May 31, 2016

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

[Determine whether points lie within a cow] http://mathematica.stackexchange.com/questions/116160/determine-whether-points-lie-within-a-cow

I would like to determine whether randomly-generated points

lX = RandomVariate[UniformDistribution[{-0.4, 0.4}], {1000}];
lY = RandomVariate[UniformDistribution[{-0.2, 0.2}], {1000}];
lZ =  ...

—————————-

[FindMinimum doesn't increase step size when necessary] http://mathematica.stackexchange.com/questions/116295/findminimum-doesnt-increase-step-size-when-necessary

I've spent much time finding a minimal example demonstrating this problem with FindMinimum. Normally one faces this problem when fitting very large and complicated functions which cannot be posted ...

—————————-

[Internal DynamicModule steals scope of external DynamicModule] http://mathematica.stackexchange.com/questions/116167/internal-dynamicmodule-steals-scope-of-external-dynamicmodule

I have two dynamic objects, one nested in the other. Both have their own functions defined, as follows. I have simplified them to the point where they don't make much sense, but can still illustrate ...

—————————-

[Opposite of Alternatives in a Rule] http://mathematica.stackexchange.com/questions/116302/opposite-of-alternatives-in-a-rule

Mathematica provides Alternatives, to match one of several patterns.  In a rule,
this is used as p1|p2|p3:&gt;replacement.  I would like to have the
opposite logic: p1&amp;p2&amp;p3:&gt;replacement  ...

—————————-

[Symbolic and numeric limit disagreeing on branch cut of ArcTan] http://mathematica.stackexchange.com/questions/116183/symbolic-and-numeric-limit-disagreeing-on-branch-cut-of-arctan

Bug introduced after v8.0.4 and before v9.0.1, and persisting through v10.4.1.

Investigating comments to my previous question lead me to the following problem:

N[Limit[ ArcTan[Sqrt[-4 E^(I a)]],  ...

—————————-

[Why does the global variable exist here, where it was declared only in Module?] http://mathematica.stackexchange.com/questions/116140/why-does-the-global-variable-exist-here-where-it-was-declared-only-in-module

Why does Mathematica choose the mechanism that makes the global variable a here while parsing?

In

f := Module[{a}, a;]

In

?a

Out

Globala

I don't understand why Mathematica goes in the way ...

—————————-

[Integrate and NIntegrate disagreeing over branch cut of Sqrt?] http://mathematica.stackexchange.com/questions/116041/integrate-and-nintegrate-disagreeing-over-branch-cut-of-sqrt

Bug introduced after v8.0.4 and before v9.0.1, and persisting through v10.4.1.

In Mathematica 10.2 I'm trying to integrate this piecewise continuous function, but Integrate and NIntegrate seem to ...

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

[Generating a Sierpinski carpet] http://mathematica.stackexchange.com/questions/22052/generating-a-sierpinski-carpet

I am trying to draw a Sierpinski_carpet. I have code that works, but I think there is a more elegant way to do than my way. Maybe I couls use Tuples or Permutations or some similar function to ...

—————————-

[Drawing a square root spiral] http://mathematica.stackexchange.com/questions/66969/drawing-a-square-root-spiral

Here is a start. I'm looking for a nice way to draw it.

Graphics[{EdgeForm[Black], White,
Polygon @ {{0, 0}, {-1, 0},
Sqrt[2] {Cos[#], Sin[#]} &amp;[Pi - (ArcCot[1])]},
Polygon @ {{0,  ...

================================== Can you answer these? ==================================

[Problem with Parallelization when using Packages] http://mathematica.stackexchange.com/questions/115862/problem-with-parallelization-when-using-packages

I tried to find a solution to my problem in several answers posted in MSE but due to lack of my knowledge on parallelization territory, I couldn't figure out solution to my problem.

I have a big code ...

—————————-

[Fourier transform of Exp[x]/x] http://mathematica.stackexchange.com/questions/116157/fourier-transform-of-expx-x

Could you please explain why Mathematica gives the following expression when taking Fourier transform of ?

Why the answer does not ...

—————————-

[Inconsistent behavior from RegionMeasure on the RegionIntersection between a Polygon and a Line] http://mathematica.stackexchange.com/questions/116083/inconsistent-behavior-from-regionmeasure-on-the-regionintersection-between-a-pol

Consider a Polygon with lines drawn between two of its vertices,

pgon = Get[
"https://gist.githubusercontent.com/jasondbiggs/\
59cb7d4aa802bde68c9f6a5203ef698f/raw/\
...

- asked by Jason is no longer a postdoc (1 vote)

### 44 Tuesday, May 24, 2016

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

[Pulsed NMR animation] http://mathematica.stackexchange.com/questions/115675/pulsed-nmr-animation

I'm new here and have never interacted with the community so excuse me if this has been asked before or if I format incorrectly or anything like that.

Anyway, I'm trying to make an animation for a ...

—————————-

[Plot 3D model of DNA in Mathematica] http://mathematica.stackexchange.com/questions/115491/plot-3d-model-of-dna-in-mathematica

My friend asked me if we can plot a 3D model of DNA (deoxyribonucleic acid) in Mathematica. However, I am not really familiar with this and I don't know if Mathematica can do this. Could you answer ...

—————————-

[Exclude overlapping lists while keeping disjoint- and sub-lists?] http://mathematica.stackexchange.com/questions/115545/exclude-overlapping-lists-while-keeping-disjoint-and-sub-lists

Consider a function f[l1_List,l2_List] which is given lists of integers. Whenever two of the lists contain completely disjoint sets of integers OR one of the lists is completely contained in the ...

—————————-

[Beautiful dance of the Earth and Venus around the sun] http://mathematica.stackexchange.com/questions/115358/beautiful-dance-of-the-earth-and-venus-around-the-sun

I have seen very nice dynamic graphics created by users of Ma. I would like to get help whether the following graphics can be created using Ma. I was not able to create the dynamic picture here. ...

—————————-

For Wolfram System sessions, Epilog is conventionally defined to read in a file named end.m. ... - asked by Kuba (12 votes), answered by Mr.Wizard (7 votes) —————————- [What is the closest star to Earth other than the sun?] http://mathematica.stackexchange.com/questions/110559/what-is-the-closest-star-to-earth-other-than-the-sun How to find the Sun's nearest neighbor star using Mathematica? I tried but it didn't work - asked by vito (10 votes), answered by Zviovich (26 votes) —————————- [Find the Panda - Dudolf panda puzzle] http://mathematica.stackexchange.com/questions/110497/find-the-panda-dudolf-panda-puzzle I recently find this puzzle where you have to find the panda from a group of snowmen. Having a horrible eyesight I have to take help of mathematica to find it. I start with assumption that all ... - asked by Sumit (10 votes) ================================== Greatest hits from previous weeks: ================================== [How to make use of Associations?] http://mathematica.stackexchange.com/questions/52393/how-to-make-use-of-associations I have been curious about it for long. Now that Mathematica 10 arrives, I think it's time to ask the question: How the new Association data structure would be used to improve Mathematica programming? ... - asked by Yi Wang (105 votes), answered by Leonid Shifrin (125 votes) —————————- [Mathematica 10.0.x freezes in Initializing kernels] http://mathematica.stackexchange.com/questions/92931/mathematica-10-0-x-freezes-in-initializing-kernels Bug caused by paclet update and fixed by paclet update. I updated to Windows 10 and have been running Mathematica fine on it for over a month. For some reason, it has just stopped working. I don't ... - asked by mitcheljh (67 votes), answered by ilian (84 votes) ================================== Can you answer these? ================================== [SiegelTheta gives misleading message when the dimensions don't match] http://mathematica.stackexchange.com/questions/110500/siegeltheta-gives-misleading-message-when-the-dimensions-dont-match Bug introduced in 6.0 and persisting through 10.4 SiegelTheta is new in 6.0 In order to test the SiegelTheta function, I wanted to evaluate it for when - asked by Semiclassical (3 votes) —————————- [How do I invert a function with two arguments?] http://mathematica.stackexchange.com/questions/110146/how-do-i-invert-a-function-with-two-arguments I begin with a function defined by c[u_, mH_] I won't go into details because it comes from countless lines of partial differential equations, boundary conditions and perturbations. But suffice to ... - asked by Ash Arsenault (2 votes) —————————- [Cell format for usage statements] http://mathematica.stackexchange.com/questions/110199/cell-format-for-usage-statements The myFunc::usage statement is intended to be a simple summary of the symbol and its arguments. However, many users like myself opt out of using Workbench and prefer to maximize use of the Notebook ... - asked by Robert (2 votes) ### 54 Tuesday, March 15, 2016 ================================== Top new questions this week: ================================== [General strategies to write big code in Mathematica?] http://mathematica.stackexchange.com/questions/109888/general-strategies-to-write-big-code-in-mathematica I think after six months of exposure to Mathematica and the Wolfram Language I am fairly OK with writing short codes and snippets. However, what are some general strategies to use in order to write ... - asked by Ali Hashmi (47 votes), answered by Leonid Shifrin (45 votes) —————————- [How to make the digits of Pi go around in a spiral like this?] http://mathematica.stackexchange.com/questions/109982/how-to-make-the-digits-of-%cf%80-go-around-in-a-spiral-like-this Here is a start. MapIndexed[Text[Reverse[First[RealDigits[Pi,10,252]]][[Tr@#2]],#]&amp;, Table[{t Cos[t],t Sin[t]},{t,0,16Pi,0.2}]]//Graphics - asked by mathe (32 votes), answered by Martin Buttner (40 votes) —————————- [Guidelines for planning custom GUI in Mathematica] http://mathematica.stackexchange.com/questions/109525/guidelines-for-planning-custom-gui-in-mathematica Intro Usually I don't have to care (it hurts my brain though) about misaligned details, additional/missing pixels. But currently I'm participating in a project where the design matters and I have to ... - asked by Kuba (27 votes) —————————- [Wrong labelling of contours with ListContourPlot] http://mathematica.stackexchange.com/questions/109778/wrong-labelling-of-contours-with-listcontourplot Bug introduced in 9.0 or earlier and persisting through 10.4 Consider this example: dat = Table[Re[Sqrt[1 - x^2 - y^2]], {x, -1.1, 1.1, 0.01}, {y, -1.1, 1.1, 0.01}]; Now pay special attention to ... - asked by Szabolcs (16 votes), answered by Szabolcs (10 votes) —————————- [Fit image of mountain to gaussian] http://mathematica.stackexchange.com/questions/109946/fit-image-of-mountain-to-gaussian I want to detect the edges of an image of a mountain and then fit that to a gaussian. I am unsure about how to only get the mountain edge, rather than every single edge in the image. How do I ... - asked by olliepower (13 votes), answered by Dr. belisarius (13 votes) —————————- [What is a printer's point?] http://mathematica.stackexchange.com/questions/109813/what-is-a-printers-point According to the documentation it is a basic unit for size spec. WindowSize and ImageSize says: I think all the statements below are correct yet I would like to know for sure: Is this the same ... - asked by Kuba (12 votes), answered by Silvia (5 votes) —————————- [A weird issue with Interval[MaxNumber]] http://mathematica.stackexchange.com/questions/109597/a-weird-issue-with-intervalmaxnumber

From the Interval documentation:

For approximate machine- or arbitrary-precision numbers x, Interval[x] yields an interval reflecting the uncertainty in x.

...

### 59 Tuesday, February 9, 2016

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

[Partitioning a list when the cumulative sum exceeds 1] http://mathematica.stackexchange.com/questions/105792/partitioning-a-list-when-the-cumulative-sum-exceeds-1

I have a long list of say 1 million Uniform(0,1) random numbers, such as:

dat = {0.71, 0.685, 0.16, 0.82, 0.73, 0.44, 0.89, 0.02, 0.47, 0.65}

I want to partition this list whenever the cumulative ...

—————————-

[How to extract a contour line (or a region) from a ContourPlot?] http://mathematica.stackexchange.com/questions/105750/how-to-extract-a-contour-line-or-a-region-from-a-contourplot

Given a ContourPlot with a set of contours, say, this:

is it possible to get the contours separating domains with the different colors in the form of lists?

For example, how to extract the ...

—————————-

[Using NDSolve to find particle trajectory] http://mathematica.stackexchange.com/questions/105859/using-ndsolve-to-find-particle-trajectory

I'm trying to simulate a particle in an electric and magnetic fields, but numerically instead of analytically. This is basically solving the equation

—————————-

[why MatchQ is fast and Replace slow?] http://mathematica.stackexchange.com/questions/105626/why-matchq-is-fast-and-replace-slow

Consider a large expression, say a polynomial with 25 terms

expr=Product[Unique["a"],{i,1,25}];

to which you apply the following replacement rule:

rep={x_ f[y_] /; FreeQ[x, y] -&gt; 0};

Since f ...

—————————-

[Use of some functions of the Developer Utility Package, such as BesselSimplify] http://mathematica.stackexchange.com/questions/105643/use-of-some-functions-of-the-developer-utility-package-such-as-besselsimplify

The Developer Utilities Package contains several functions that look interesting:

BesselSimplify
GammaSimplify
PolyGammaSimplify
ZetaSimplify
PolyLogSimplify

However for each ...

—————————-

[Plot of is missing from ] http://mathematica.stackexchange.com/questions/105774/plot-of-sinxx-is-missing-from-x-143

When plotting the graph of I noticed that there is no plot from about . I don't suppose there is a purely mathematical explanation for this?

So, why is there no graph in ...

—————————-

[Brackets around each item in matrix] http://mathematica.stackexchange.com/questions/105864/brackets-around-each-item-in-matrix

I have a matrix where every item in the matrix has its own brackets that I do not want. How can I remove the brackets around each item?

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

[How do I clear all user defined symbols?] http://mathematica.stackexchange.com/questions/850/how-do-i-clear-all-user-defined-symbols

Is there some way to do this other than going to Evaluation -&gt; Quit kernel and firing a new one up?

—————————-

[Drawing a square root spiral] http://mathematica.stackexchange.com/questions/66969/drawing-a-square-root-spiral

Here is a start. I'm looking for a nice way to draw it.

Graphics[{EdgeForm[Black], White,
Polygon @ {{0, 0}, {-1, 0},
Sqrt[2] {Cos[#], Sin[#]} &amp;[Pi - (ArcCot[1])]},
Polygon @ {{0,  ...

================================== Can you answer these? ==================================

[Weird behaviour for a vector InterpolatingFunction inside an NDSolve] http://mathematica.stackexchange.com/questions/105594/weird-behaviour-for-a-vector-interpolatingfunction-inside-an-ndsolve

I have run into some weird behaviour on the part of NDSolve which I find pretty bizarre and which I would like to understand better.

Suppose, for the sake of argument, that I want to study the ODE ...

—————————-

[NDeigensystem returns error due to mesh discretization when calculating vibrations of a cantilever] http://mathematica.stackexchange.com/questions/105840/ndeigensystem-returns-error-due-to-mesh-discretization-when-calculating-vibratio

There was an transcription error in the code I provided in a previous post:

NDeigensystem returns complex non-hermitian error for the calculation of vibrations of a cantilever

This resulted in it ...

—————————-

[WhenEvent and Resetting of Variable in PDE when operation succeeds] http://mathematica.stackexchange.com/questions/105781/whenevent-and-resetting-of-variable-in-pde-when-operation-succeeds

I have had success in using WhenEvent to reset or change a variable within NDSolve with ordinary differential equations. My working, functioning MWE is:

Clear[usol, u, t, x, \[Lambda]]
usol = NDSolveValue[
...

### 60 Tuesday, February 2, 2016

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

[Exponential fitting - isn't actually a BUG there?] http://mathematica.stackexchange.com/questions/105002/exponential-fitting-isnt-actually-a-bug-there

There are many questions on this site about wrong exponential fitting in Mathematica but no one considers this well-known problem as a potential bug. Usually people suggest well-known workarounds ...

—————————-

[Detecting components in timeseries] http://mathematica.stackexchange.com/questions/104950/detecting-components-in-timeseries

I'm looking at this sequence of values:

I'd like to detect the points where the center of the time-series shifts (around x=1000 and x=2000). Many of the transforms and smoothing methods I have ...

—————————-

[Generating Tuples with restrictions] http://mathematica.stackexchange.com/questions/105139/generating-tuples-with-restrictions

I am interested in a certain subset of all tuples. Generating all with Tuples and then filtering is wasteful, and will ”blow up” very quickly.

For a concrete example, let's say I want to find all ...

—————————-

[Grid cuts my images] http://mathematica.stackexchange.com/questions/105061/grid-cuts-my-images

Bug introduced in V9.0 or earlier

and persisting through V10.3.1 or later

pic2 = ImageResize[
ImageCrop@Rasterize@Graphics@Disk[],
{Automatic, 40}]

Grid[{{pic2}}]

This is just ...

—————————-

[Non Standard Eigenfunction Plots of the Laplacian Over the Unit Square] http://mathematica.stackexchange.com/questions/105264/non-standard-eigenfunction-plots-of-the-laplacian-over-the-unit-square

I have recently been plotting eigenfunctions of the laplacian over the unit square using the NDEigensystem command. However, I have noticed something in the plots which puzzles me.

Below is an image ...

—————————-

[How to count the number of the tube] http://mathematica.stackexchange.com/questions/105229/how-to-count-the-number-of-the-tube

There is a picture Get the binary image

binimg = ColorSeparate[img][[2]] // Binarize[#, 0.25] &amp; // Thinning

Visulize the result of regconization

lines = ImageLines[binimg, 0.074];
...

—————————-

[Detecting X or O in a small image] http://mathematica.stackexchange.com/questions/105327/detecting-x-or-o-in-a-small-image

I am making a robot that plays Tic Tac Toe

Currently, I have code that will parse the board and separate it into an array of 9 images, each space on the board. How can I detect if the image ...

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

I'm aware that I can use (* ... *) to comment out stuff in a notebook. Many languages have a syntax for single-line comments, such as

// in C, C++, Java, C#, ...
# in shell, Python, ...

For ...

—————————-

I use Mathematica mainly as an aid in symbolic attacks on problems, usually intermediate or harder and often number theoretic. While Reduce, Simplify, et al. are remarkably powerful, they of course ...

================================== Can you answer these? ==================================

[What are the time and space complexities of Classify/Predict?] http://mathematica.stackexchange.com/questions/105366/what-are-the-time-and-space-complexities-of-classify-predict

Does anyone have knowledge of the O(n) time and space complexities for various model types supported by Classify[] and Predict[] during training and evaluation?

Here are a list of supported model ...

—————————-

[Finding eigenvalues in Mathematica: why so slow?] http://mathematica.stackexchange.com/questions/105224/finding-eigenvalues-in-mathematica-why-so-slow

I am trying to find the eigensystem of a large sparse real symmetric matrix, and I only need the lowest 40 or so eigenstates. The relevant code is as follows:

TheModel[V0_, V1_, V2_, index_,  ...

—————————-

[Notebook created in cloud has odd errors in Mathematica 10.3.1] http://mathematica.stackexchange.com/questions/105019/notebook-created-in-cloud-has-odd-errors-in-mathematica-10-3-1

I've downloaded a notebook from develop.wolframcloud.com and opened it in 10.3.1 (running on Win 10). When I evaluate some cells I get syntax errors along the lines of...

Syntax::sntxf: "\"Clear[\"  ...

### 61 Tuesday, January 26, 2016

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

[List of Mathematica related acronyms and their real meaning] http://mathematica.stackexchange.com/questions/104593/list-of-mathematica-related-acronyms-and-their-real-meaning

A few years ago, Wolfram Inc. not only started to rename things around Mathematica, a lot of new technologies and frameworks were introduced as well. Now, we are left with a lot of acronyms and ...

—————————-

[What would you ask Mathematica to do on a big system?] http://mathematica.stackexchange.com/questions/104842/what-would-you-ask-mathematica-to-do-on-a-big-system

Our hardware supplier has given us the opportunity to test Mathematica on a big Windows system. The specs will be 1 to 4 TB of working memory and 12 sockets with 18 cores each. I got 1 full week of ...

—————————-

[What algorithm do the Compress and Uncompress functions use?] http://mathematica.stackexchange.com/questions/104660/what-algorithm-do-the-compress-and-uncompress-functions-use

Compress and Uncompress are used internally by Mathematica to compress things like 3D data in notebook files - data that I'd like to read independently. Does anyone have any idea if the compression ...

—————————-

[Is there any predictor-corrector method in Mathematica for solving nonlinear system of algebraic equations?] http://mathematica.stackexchange.com/questions/104578/is-there-any-predictor-corrector-method-in-mathematica-for-solving-nonlinear-sys

The FindRoot Function in Matheatica can easily be used to solve systems of nonlinear algebraic equations. But, I want to solve a system of nonlinear equations with variations of some parameters.

...

—————————-

[How do I define a periodic region?] http://mathematica.stackexchange.com/questions/104723/how-do-i-define-a-periodic-region

I'm trying to create a region of ”thick” grid-lines, like so

GRID = ImplicitRegion[((0 &lt;= x &lt;= 1 || 2 &lt;= x &lt;= 3 || 4 &lt;= x &lt;= 5 || 6 &lt;= x &lt;= 7 ||
8 &lt;= x &lt;= 9) || (0  ...

—————————-

[Zoom in on a 2D graph] http://mathematica.stackexchange.com/questions/104718/zoom-in-on-a-2d-graph

I have seen many queries on zooming in on plots etc. But I haven't seen any regarding 2D graphs. For eg if I have a graph like

Graph[{1-&gt;2, 2-&gt;3, 3-&gt;1}].

It will create a graph. I have a ...

—————————-

[Fitting a curve to an image object: not a superellipse, not an egg curve.. what else?] http://mathematica.stackexchange.com/questions/104419/fitting-a-curve-to-an-image-object-not-a-superellipse-not-an-egg-curve-what

I'm facing the problem of quantifying the morphology of objects with such a shape (nannoconids...

they are fossils).

One of the final goals is to produce a solid of revolution and compute ...

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

[Drawing a square root spiral] http://mathematica.stackexchange.com/questions/66969/drawing-a-square-root-spiral

Here is a start. I'm looking for a nice way to draw it.

Graphics[{EdgeForm[Black], White,
Polygon @ {{0, 0}, {-1, 0},
Sqrt[2] {Cos[#], Sin[#]} &amp;[Pi - (ArcCot[1])]},
Polygon @ {{0,  ...

—————————-

I use Mathematica mainly as an aid in symbolic attacks on problems, usually intermediate or harder and often number theoretic. While Reduce, Simplify, et al. are remarkably powerful, they of course ...

================================== Can you answer these? ==================================

[Way to make contour labels on SliceContourPlot3D?] http://mathematica.stackexchange.com/questions/104590/way-to-make-contour-labels-on-slicecontourplot3d

SliceContourPlot3D doesn't seem to come with the option of putting contour labels on the plots as far as I can see. I'm using the XStackedPlanes option. I don't see any information about how one might ...

—————————-

[Implementation of a matrix formula] http://mathematica.stackexchange.com/questions/104463/implementation-of-a-matrix-formula

For the Bezier surface, which owns the following matrix definition:

where, denotes Bernstein-basis.

vec1 = {B[0],...,B[m]};
mat = {{P[0,0],...P[0,n]},...,{P[m,0],...P[m,n]}};
vec2=  ...

—————————-

[Can one preserve the appearance of the HorizontalGauge?] http://mathematica.stackexchange.com/questions/104524/can-one-preserve-the-appearance-of-the-horizontalgauge

I use sometimes the HorizontalGauge instead of a slider in Manipulateor instead of the ProgressIndicator. I find it very convenient, since it gives quantitative information on the status of the ...

### 62 Tuesday, January 19, 2016

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

[Partition a list based on specific elements? Grab the sublists beginning with a certain marker elements] http://mathematica.stackexchange.com/questions/104153/partition-a-list-based-on-specific-elements-grab-the-sublists-beginning-with-a

Say I have the list

{{a}, {0, 2, 5}, {5, 4, 1}, {a}, {1, 1, 0}, {1, 4, 2},
{3, 3, 0}, {a}, {3, 2, 0}, {1, 4, 1}}

I would like to make sublists of everything beginning with the a element till ...

—————————-

[Why does Outer sometimes return a packed array, and sometimes not?] http://mathematica.stackexchange.com/questions/104040/why-does-outer-sometimes-return-a-packed-array-and-sometimes-not

For example

In[342]:=
test3 = Flatten[Outer[Plus, Range[1000], Range[1000]],
1]; // AbsoluteTiming

Out[342]= {0.0198735, Null}

returns PackedArray (examined by Developer‘PackedArrayQ[test3] ...

—————————-

[Interpolation function way off] http://mathematica.stackexchange.com/questions/104037/interpolation-function-way-off

I have a simple list of data points to which I would like to fit an interpolation function. However, the results given by Interpolation[] gives an oscillating function which is not warranted by the ...

—————————-

[How to deal with bad arguments when a function's UpValues is a pure-function?] http://mathematica.stackexchange.com/questions/103952/how-to-deal-with-bad-arguments-when-a-functions-upvalues-is-a-pure-function

In practice, I needs to define the UpValues of a user-defined function. For instance, the operation of function like differential formula , expansion and so on.

Here, I will give a example that came ...

—————————-

[Using Solve to solve the equation ] http://mathematica.stackexchange.com/questions/104281/using-solve-to-solve-the-equation-x1-3-1

I am curious why this command returned no answers:

Solve[x^(1/3) == -1, x]

Gives this output:

(* {} *)

I was able to get around the problem with this:

Solve[Surd[x, 3] == -1, x]

Which  ...

—————————-

[How do you convert RGBColor to an HTML-style string?] http://mathematica.stackexchange.com/questions/103999/how-do-you-convert-rgbcolor-to-an-html-style-string

If I run some color processing function, like:

Blend[RGBColor /@ {"#DC4E00", "#000000", "#822250", "#FCC11B"}]

I get back a RGBColor object:

RGBColor[0.5901960784313726, 0.29901960784313725,  ...

—————————-

[ReplaceAll behavior change from 10.2 to 10.3] http://mathematica.stackexchange.com/questions/104354/replaceall-behavior-change-from-10-2-to-10-3

Executing:

replace[res_] := res /. {a_Integer, b_Integer} :&gt; (a + b);
l1 = &lt;|"respID" -&gt; {1,2} , "key2" -&gt; &lt;|"key2" -&gt; {2, 1}|&gt;|&gt;;
l2 = {"respID" -&gt; {1,2} , "key2" -&gt;  ...

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

[Drawing a square root spiral] http://mathematica.stackexchange.com/questions/66969/drawing-a-square-root-spiral

Here is a start. I'm looking for a nice way to draw it.

Graphics[{EdgeForm[Black], White,
Polygon @ {{0, 0}, {-1, 0},
Sqrt[2] {Cos[#], Sin[#]} &amp;[Pi - (ArcCot[1])]},
Polygon @ {{0,  ...

—————————-

[Mathematica 10.0.x freezes in Initializing kernels] http://mathematica.stackexchange.com/questions/92931/mathematica-10-0-x-freezes-in-initializing-kernels

Bug caused by paclet update and fixed by paclet update.

I updated to Windows 10 and have been running Mathematica fine on it for over a month. For some reason, it has just stopped working. I don't ...

================================== Can you answer these? ==================================

[How to find and show a point value on the line?] http://mathematica.stackexchange.com/questions/104384/how-to-find-and-show-a-point-value-on-the-line

Manipulate[
Module[{eqns, f},

eqns = {y'[x] ==
aa3*y[x]^3 + aa2*y[x]^2 + aa1*y[x] + aa0[t] + bb[t]/y[x],
y[0] == 15};

f = NDSolve[eqns, y, {x, 0, 1}][[1, 1, -1]];

Plot[f[x], {x, 0,  ...

- asked by user37037 (1 vote)

—————————-

[Is it possible for librarylink function to be Listable like that in Compile?] http://mathematica.stackexchange.com/questions/104382/is-it-possible-for-librarylink-function-to-be-listable-like-that-in-compile

We know in Compile, there is an Option RuntimeAttributes ; Listable which can let the compiled function easily explore the power of thread parallelization.

So is it possible for a librarylink ...

—————————-

[How could get all escape characters in Mathematica?] http://mathematica.stackexchange.com/questions/104299/how-could-get-all-escape-characters-in-mathematica

I am evaluating expression by using KernelLink.

But the kernel will be suspended endless when meets a invalid escape character. a\abc, \[badEscape] for example.

So I have to filter all the invalid ...

### 63 Tuesday, January 12, 2016

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

[Why is SatisfiabilityCount faster than SatisfiableQ?] http://mathematica.stackexchange.com/questions/103726/why-is-satisfiabilitycount-faster-than-satisfiableq

Consider the following (large) Boolean expression, which arose in a SAT problem. (The expression is not satisfiable.)

bigExpr = Import["http://pastebin.com/raw/gEgGQ26S"];

On my system (Mathematica ...

—————————-

I have just noticed that

x /. &lt;|x -&gt; 123|&gt;

evaluates to

123

In other words, the association seems to behave as a rule. I didn't see any example or reference to this behavior in the ...

—————————-

[Is it possible to Parallelize Select?] http://mathematica.stackexchange.com/questions/103548/is-it-possible-to-parallelize-select

Given a large list of elements, is it possible to improve Select by parallelizing?

An example: from a 10,000,000-element list of integers between 1 and 10, select all primes

rl = RandomInteger[10, ...

—————————-

[how to enforce a symmetric solution with fem?] http://mathematica.stackexchange.com/questions/103606/how-to-enforce-a-symmetric-solution-with-fem

I'm solving the laplace equation in a domain with holes, and I need to compute the integral of the gradient on the boundary of these holes.

For that I define a mesh and solve the laplace equation ...

—————————-

[Best way to emulate MATLAB's bsxfun using Map and similar functions] http://mathematica.stackexchange.com/questions/103527/best-way-to-emulate-matlabs-bsxfun-using-map-and-similar-functions

Given a matrix, we want to subtract the mean of each column, from all entries in that column. So given this matrix:

(mat = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12) // MatrixForm

the mean ...

—————————-

[Order of evaluation - does Mathematica evaluate variables before or after substitution?] http://mathematica.stackexchange.com/questions/103800/order-of-evaluation-does-mathematica-evaluate-variables-before-or-after-substi

Let's say I write

y = x^2;
x = 10;
z = y + y^2 + y^3

Does Mathematica internally evaluate y before or after substituting it into z? I.e., does Mathematica internally evaluate this as

y = x^2 =  ...

—————————-

[How to ”inform” successive ContourPlot calculations?] http://mathematica.stackexchange.com/questions/103673/how-to-inform-successive-contourplot-calculations

I need to draw some contour plots of very non-linear functions. As a simple example, take a Mandelbrot Set divergence contour near . (Just to be clear, I'm not trying to write a ...

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

[How to calculate contour integrals with Mathematica?] http://mathematica.stackexchange.com/questions/34073/how-to-calculate-contour-integrals-with-mathematica

How to calculate the integral of over the unit circle counterclockwise for each branch of the integrand?

—————————-

[How do I remove grid from this photo?] http://mathematica.stackexchange.com/questions/88494/how-do-i-remove-grid-from-this-photo

I found this cat a month ago, and I'm not his owners' friend so the mosquito grid was the inevitable problem. I would like to post-process this photo to get rid of it, but I don't know exactly how ...

================================== Can you answer these? ==================================

[Fitting data with unique variable per measurement] http://mathematica.stackexchange.com/questions/103770/fitting-data-with-unique-variable-per-measurement

Imagine we are in the following situation, we have a nonlinear system of functions with coordinates , and unknown parameters 's and . Let this system be defined as,

...

—————————-

[‘ParallelTable‘ pending the MathKernel after execution] http://mathematica.stackexchange.com/questions/103611/paralleltable-pending-the-mathkernel-after-execution

I have done a ParallelTable computation in script mode. After execution, the output is fine and I've got all the data I needed. but the kernel seems pending, usually it should exit after they finished ...

—————————-

[Call Magma in Mathematica] http://mathematica.stackexchange.com/questions/103602/call-magma-in-mathematica

I've written some code in Mathematica, related to some group theory questions I have. Subsequently, I found that part of the code could be significantly sped up if I could just call a routine in ...

### 64 Tuesday, January 5, 2016

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

[Optional throws error when called from a package. Workaround?] http://mathematica.stackexchange.com/questions/103084/optional-throws-error-when-called-from-a-package-workaround

Bug introduced in 8.0 or earlier and persisting through 10.3 or later.

Case number: 305932.

In the front-end notebook (Mathematica 9.0 and 10.2):

g[x: Optional[_,default]]:=x;

has no problems, ...

—————————-

[How to automatically have ContourLabels in middle of Contour lines if specific levels are not specified?] http://mathematica.stackexchange.com/questions/103289/how-to-automatically-have-contourlabels-in-middle-of-contour-lines-if-specific-l

I looked at all the questions/answers relating to placement of ContourLabels but could not find an answer to this. Some of the answers before are based on user giving before-hand, the Contours levels ...

—————————-

[Generating assignments and transforming code inside Holding forms when generating code] http://mathematica.stackexchange.com/questions/103263/generating-assignments-and-transforming-code-inside-holding-forms-when-generatin

I have been playing with slightly above trivial code manipulations in Mathematica. I thought Mathematica would be great for this kind of work because of rule replacement and expression manipulation, ...

—————————-

[Overlay vs Show for plots?] http://mathematica.stackexchange.com/questions/103073/overlay-vs-show-for-plots

I am trying to understand the differences of Overlay and Show to combine two plots. A typical use case is to superpose a ListPlot of some data with a Plot of a curve to fit the data.

The following ...

—————————-

[What should I learn from DSolve working better with a named constant than a number in this case?] http://mathematica.stackexchange.com/questions/103327/what-should-i-learn-from-dsolve-working-better-with-a-named-constant-than-a-numb

I have an equation

Here and are lengths, and is an angle (in radians, so ...

—————————-

[W—A or Mathematica for CountryData?] http://mathematica.stackexchange.com/questions/103302/wa-or-mathematica-for-countrydata

Sometimes W—A gives you something ...

WolframAlpha["electricity production of the United States in 2007", "Result"]

... not available in the WDF

CountryData["UnitedStates",  ...

—————————-

[How to implement JoinTo efficiently?] http://mathematica.stackexchange.com/questions/103238/how-to-implement-jointo-efficiently

AppendTo is not efficient so I'm not quite sure of the best way to implement its analogue for joining (e.g. in python this would be extend function). So how can this be improved:

ClearAll[JoinTo]; ...

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

[Find eigen energies of time-independent Schrodinger equation] http://mathematica.stackexchange.com/questions/32293/find-eigen-energies-of-time-independent-schrodinger-equation

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

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

—————————-

[How to create word clouds?] http://mathematica.stackexchange.com/questions/2334/how-to-create-word-clouds

Word clouds are rather useless fancy and visually appealing plots, where words are plotted with different sizes according to their frequency in a corpus. Many applications exist out there (Wordle, ...

================================== Can you answer these? ==================================

[How can I import from a usb webcam on the raspberry pi?] http://mathematica.stackexchange.com/questions/103364/how-can-i-import-from-a-usb-webcam-on-the-raspberry-pi

I'm trying to set up a raspberry pi as a webcam server and I need to import images into a mathematica notebook on the raspberry pi. I tried using CurrentImage[] just to test it but I got an error just ...

—————————-

[How to change default font for all existing notebooks at once?] http://mathematica.stackexchange.com/questions/103053/how-to-change-default-font-for-all-existing-notebooks-at-once

By default, Mathematica 9 and 10 use Gill Sans MT fonts for headings of title/subtitle/section/subsection/subsubsection. Unfortunately, Gill Sans MT fonts have no Cyrillic letters, so that all ...

—————————-

[VERY slow to solve a nonlinear equation involving matrix eigenvalues] http://mathematica.stackexchange.com/questions/103282/very-slow-to-solve-a-nonlinear-equation-involving-matrix-eigenvalues

I am trying to solve a problem similar to the following:

f[k_, a_] := (
Matrix = {{0.05, (a*k)^2}, {(a*k)^2, -0.05}};

{eps, psi} = Eigensystem[Matrix];

{eps,psi} = {eps[[#]], psi[[#]]} &amp;@
...

### 65 Tuesday, December 29, 2015

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

When I try to evaluate the following:

using

Sum[Floor[5/5^k], {k, 1, \[Infinity]}]

Mathematica provides an answer of when it ...

—————————-

[How do I insert a calculated value into a text cell?] http://mathematica.stackexchange.com/questions/102849/how-do-i-insert-a-calculated-value-into-a-text-cell

Suppose in a notebook I've calculated the value of some expression and assigned it to a variable. How do I insert the value of that variable in a text cell without just typing in the value? That is, I ...

—————————-

This is probably a very simple question, but I couldn't find a duplicate.

As everybody knows, x, y + v gives x + v, y + v. But if I intend v to represent a vector, for example if I am going to ...

—————————-

[What kind of patterns in a list of rules would benefit from being Dispatched?] http://mathematica.stackexchange.com/questions/102873/what-kind-of-patterns-in-a-list-of-rules-would-benefit-from-being-dispatched

I have a long list of rules for manipulating expressions. They are of the form:

complexRules = {f[x_, y_]^2 :&gt; (*something*),
f[x_, y_] f[x_, z_] :&gt; (*something*),
...

—————————-

[Revolution of Koch Snowflake] http://mathematica.stackexchange.com/questions/102697/revolution-of-koch-snowflake

How to plot shape which made from revolution of the Koch Snowflake?

I try to use , but I think there is no for Koch Snowflake.

Sorry for my ...

—————————-

[Reverse Polish Notation] http://mathematica.stackexchange.com/questions/102976/reverse-polish-notation

Is there a way to evaluate a string containing RPN in Mathematica?

SE thinks this question is too short, so let me expand on it. Do you know of any function, that provides the following ...

—————————-

[Bug? Completely wrong results from NSolve] http://mathematica.stackexchange.com/questions/102724/bug-completely-wrong-results-from-nsolve

The following code creates two polynomials and in variables and , then uses NSolve to find roots. But the polynomials don't evaluate to zero at those roots.

pp[n_] := If[n &gt; 0,  ...

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

I use Mathematica mainly as an aid in symbolic attacks on problems, usually intermediate or harder and often number theoretic. While Reduce, Simplify, et al. are remarkably powerful, they of course ...

—————————-

[Where can I find examples of good Mathematica programming practice?] http://mathematica.stackexchange.com/questions/18/where-can-i-find-examples-of-good-mathematica-programming-practice

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...

================================== Can you answer these? ==================================

[CDF Enterprise : Protection and licensing] http://mathematica.stackexchange.com/questions/102650/cdf-enterprise-protection-and-licensing

I am new to Mathematica but on top of that I am asked to create a CDF file that is IP protected (encrypted) and also licensed.

In this video they are giving the way to protect the code. At the end ...

—————————-

[Speedup ListCorrelation when using generalized correlation function] http://mathematica.stackexchange.com/questions/102708/speedup-listcorrelation-when-using-generalized-correlation-function

ImageCorrelation provides several general function that can be used to replace the default Dot function. For example, in the documentation of ImageCorrelation, there is an example using CosineDistance ...

- asked by xslittlegrass (1 vote)

—————————-

[How can I define geographic regions and new entities?] http://mathematica.stackexchange.com/questions/102948/how-can-i-define-geographic-regions-and-new-entities

There are three functions (GeoListPlot, GeoGraphics and Entity) related to working with geographic regions but it is not clear from the documentation how to create new Entities or custom geographic ...

### 66 Tuesday, December 22, 2015

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

[How to organically build up nested associations?] http://mathematica.stackexchange.com/questions/102466/how-to-organically-build-up-nested-associations

Suppose I want to construct an association of associations, such as a list of people with attributes:

peopleFacts=&lt;| alice-&gt; &lt;|age-&gt;29,shoeSize-&gt;7|&gt;, bob-&gt;  ...

—————————-

[How to restart computation when kernels die?] http://mathematica.stackexchange.com/questions/102268/how-to-restart-computation-when-kernels-die

When an important process needs to be kept alive, there are monitoring tools to restart them if they die (e.g. god tasks in ruby), in my case I have an overnight scraping task that I need to have done ...

—————————-

[If I have a very large Popup Menu list how can I make that searchable?] http://mathematica.stackexchange.com/questions/102470/if-i-have-a-very-large-popup-menu-list-how-can-i-make-that-searchable

Imagine that you have a PopupMenu's list that requires a lot of scrolling through the selections. Is there a way to create a control that will only display a subsection of the complete list?

—————————-

[Bug in RegionMember?] http://mathematica.stackexchange.com/questions/102439/bug-in-regionmember

RegionMember (new in V10) appears to have a bug. For some polygons it finds points that are clearly outside to be ”members” of the region. This depends on the shape of the polygon in a way that is ...

—————————-

[Which elements of a large array are part of a set?] http://mathematica.stackexchange.com/questions/102212/which-elements-of-a-large-array-are-part-of-a-set

I have a large integer packed array arr. My array is multidimensional, but for simplicity let's consider 1D arrays for now. ArrayReshape takes care of the rest.

I also have a set of integers (a ...

—————————-

[more numerically accurate inverse matrix] http://mathematica.stackexchange.com/questions/102261/more-numerically-accurate-inverse-matrix

I encountered the following matrix

mat = {{2,
2.161209223472559 + 1.682941969615793 I}, {2.161209223472559 -
1.682941969615793 I, 2}}

and Inverse[mat] will give

{{-0.57092 -  ...

—————————-

[Stress calculations using finite elements] http://mathematica.stackexchange.com/questions/102522/stress-calculations-using-finite-elements

A standard engineering problem is to calculate stresses in a structure due to applied forces. With the inclusion of the finite element method in version 10 this question attempts to investigate how ...

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

Can users of Mathematica on Windows 7 or Windows 8/8.1 upgrade their computers to Windows 10 – a process that began today? Does Mathematica work? Are all the settings, licenses, access to files and ...

—————————-

[How can I improve Mathematica's resolution on a macbook retina display?] http://mathematica.stackexchange.com/questions/18419/how-can-i-improve-mathematicas-resolution-on-a-macbook-retina-display

Mathematica 9.0 looks a bit fuzzy on the retina screen, how can I increase the resolution?

Here another screenshot showing a direct comparison between the browser and Mathematica

================================== Can you answer these? ==================================

[How to avoid crashing with ConformImages?] http://mathematica.stackexchange.com/questions/102578/how-to-avoid-crashing-with-conformimages

ConformImages[] is causing a kernel crash when applied to a list of 5k images. Is there any way to apply ConformImages on the list in batches or asynchronously to conserve memory?

Here's the ...

—————————-

[Fitting real and imaginary parts of a function] http://mathematica.stackexchange.com/questions/102233/fitting-real-and-imaginary-parts-of-a-function

I have an analytic form of a function

G[w_] = -I*z0*w/(1 + I*z0*w*a)

I know this function can be obtained (up to some overall normalization) from solving a differential equation numerically for ...

—————————-

[Reconstruct a ‘Graph‘ from a picture] http://mathematica.stackexchange.com/questions/102362/reconstruct-a-graph-from-a-picture

Actually,I post a very similar question before this.How to generate a Graph from a picture of a graph

The Dr. belisarius's answer have accomplished it.But I find a limitation in that method:If the ...

### 67 Tuesday, December 15, 2015

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

[How can I use Kenneth Moreland's ”Diverging Color Maps for Scientific Visualization” in plots?] http://mathematica.stackexchange.com/questions/101625/how-can-i-use-kenneth-morelands-diverging-color-maps-for-scientific-visualizat

I often want to plot two dimensional data that is centered around zero (for me, this is usually a 2D optical spectroscopy signal, but there are other cases), and the MATLAB ”Jet” color scheme is ...

—————————-

[Named patterns in Except] http://mathematica.stackexchange.com/questions/101903/named-patterns-in-except

Bug introduced in 8 or earlier and persisting through 10.3 or later

Bug isn't present in version 5.2

I don't think I quite understand how Except works.

I want to define , ...

—————————-

[What is the difference between Inherited and (Inherited + 0)] http://mathematica.stackexchange.com/questions/101715/what-is-the-difference-between-inherited-and-inherited-0

Let's create a stylesheet:

NotebookPut@
Notebook[{
Cell[StyleData[StyleDefinitions -&gt; "Default.nb"]],
Cell[StyleData["myStyle"]],
Cell[StyleData["myStyle2", StyleDefinitions -&gt;  ...

—————————-

[Why is DiscretizeGraphics missing points on my curve?] http://mathematica.stackexchange.com/questions/101594/why-is-discretizegraphics-missing-points-on-my-curve

I have a graphics expression which renders nicely as a closed curve when put in Graphics, I don't understand why I can't get the lines from DiscretizeGraphics or BoundaryDiscretizeGraphics:

p = ...

—————————-

[What's going on here? Some kind of rationalization ”under the covers”?] http://mathematica.stackexchange.com/questions/102050/whats-going-on-here-some-kind-of-rationalization-under-the-covers

Observe:

eq = (.25 a + .5 b + .25 c);
CoefficientRules[eq^2]
CoefficientRules[eq^2 // Expand]

results in

{{2, 0, 0} -> 1/16, {1, 1, 0} -> 1/4, {1, 0, 1} -> 1/8, {0, 2, 0} ->
1/4,  ...

—————————-

[Integration of incomplete rings (ellipses) pattern] http://mathematica.stackexchange.com/questions/102069/integration-of-incomplete-rings-ellipses-pattern

I am facing a problem in trying to do a series of averages in incomplete images. I have a series of X-ray data images, like this one:

As you can see my image is a series of partial rings/ellipses ...

—————————-

Mathematica provide Algebraic Manipulate palette for simplifying expression. But the palette window will always stay on top, which is quite annoying.

Is is possible to customize mathematica's right ...

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

[Where can I find examples of good Mathematica programming practice?] http://mathematica.stackexchange.com/questions/18/where-can-i-find-examples-of-good-mathematica-programming-practice

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...

—————————-

[How to make Jacobian automatically in Mathematica] http://mathematica.stackexchange.com/questions/5790/how-to-make-jacobian-automatically-in-mathematica

If we have two vectors, and , how can I make Jacobian matrix automatically in Mathematica?

$$a=\left( \begin{array}{c} x_1^3+2x_2^2 \\ 3x_1^4+7x_2 \end{array} \right);b=\left($$

================================== Can you answer these? ==================================

[Coppersmith's algorithm like Pari's zncoppersmith?] http://mathematica.stackexchange.com/questions/101978/coppersmiths-algorithm-like-paris-zncoppersmith

Is there some Mathematica package (or built-in that I missed) available, more or less equivalent to Pari's zncoppersmith function?

Paraphrasing that source: given a polynomial with integer ...

- asked by fgrieu (1 vote)

—————————-

[How do I calculate this integral along a complex line (not a contour) in mathematica?] http://mathematica.stackexchange.com/questions/102088/how-do-i-calculate-this-integral-along-a-complex-line-not-a-contour-in-mathema

Given the function:

Where a is a positive constant and:

$$z = \frac{i}{b} + t$$
$$t&gt;a$$

Where b is also a ...

- asked by T. Welsh (1 vote)

—————————-

There are some built-in Mathematica symbols that I use quite frequently but are not included in the autocompletion list in the front end. Examples are Analytic and PolynomialForm. (As @march points ...

### 68 Tuesday, December 8, 2015

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

[Can I emulate Wolfram's automatic package updating in my own packages?] http://mathematica.stackexchange.com/questions/101035/can-i-emulate-wolframs-automatic-package-updating-in-my-own-packages

It seems that some Wolfram-provided packages are smart enough to automatically check with the Wolfram servers, notice when a newer version is available, and download it, so that the user always has ...

—————————-

[Zooming using GeoGraphics] http://mathematica.stackexchange.com/questions/100920/zooming-using-geographics

Suppose I do:

GeoGraphics[Entity[”City”, ”Eureka”, ”California”, ”UnitedStates”]]

What do folks do at this point to zoom in to various parts of the image?

—————————-

[Shortest tour with vertex priority] http://mathematica.stackexchange.com/questions/101175/shortest-tour-with-vertex-priority

I changed the title of my question and tried to simplify formulation of the problem.

I solve a very big vehicle routing problem. I divided this one big problem on many small sub-problems. Each small ...

—————————-

[Backquote in string template?] http://mathematica.stackexchange.com/questions/101342/backquote-in-string-template

I need to have backquotes in a StringTemplate.

For example

StringTemplate["1"][2]

How can I get the correct result ?

Of course a solution would be to use  ...

—————————-

[create an (almost) hexagonal mesh on an ellipsoid] http://mathematica.stackexchange.com/questions/101183/create-an-almost-hexagonal-mesh-on-an-ellipsoid

EDIT I edited the question in order to take into @Kuba's comment.

I want to create this figure with Mathematica (in particular an almost hexagonal mesh on an ellipsoid; thanks to @Kuba I know this ...

—————————-

[How to count number of small dots in a picture] http://mathematica.stackexchange.com/questions/100957/how-to-count-number-of-small-dots-in-a-picture

I have this picture of small particles in a polymer film. I want to count how many particles in the figure, so that I can have a rough estimation of the particle density. But the image quality is ...

—————————-

[Why some GeoProjections show just half of Chukotka region (Russian map)] http://mathematica.stackexchange.com/questions/101334/why-some-geoprojections-show-just-half-of-chukotka-region-russian-map

I've moved to V.10.3 as suggested and proceed with Russian map (the aim is to geoplot regional distributions of some values). Notice most eastern Russian region - Chukotka. Chukotka, unlike other ...

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

[How can I improve Mathematica's resolution on a macbook retina display?] http://mathematica.stackexchange.com/questions/18419/how-can-i-improve-mathematicas-resolution-on-a-macbook-retina-display

Mathematica 9.0 looks a bit fuzzy on the retina screen, how can I increase the resolution?

Here another screenshot showing a direct comparison between the browser and Mathematica

—————————-

[How do I draw a pair of buttocks?] http://mathematica.stackexchange.com/questions/66538/how-do-i-draw-a-pair-of-buttocks

I'm trying to develop a function which 3D plot would have a buttocks like shape.

Several days of searching the web and a dozen my of own attempts to solve the issue have brought nothing but two ...

================================== Can you answer these? ==================================

[Using Mathematica with touchscreens] http://mathematica.stackexchange.com/questions/101089/using-mathematica-with-touchscreens

I really like using my Windows 10 touchscreen to move around in websites, documents, etc. It doesn't work in Mathematica. Can that be fixed by changing a global notebook setting, or is it something ...

—————————-

It's a hard for me to write english so I'll try to go straight to my problem. There is abstract predicate f, that takes two parameters. There are also two other predicates b and u:

b[x_, y_] :=  ...

—————————-

[Initializing FinancialData indices .... never finishes] http://mathematica.stackexchange.com/questions/101339/initializing-financialdata-indices-never-finishes

Retrieving data using FinancialData became more unreliable in the last couple of months, but simply retrying was enough to finally get the data. Now it seems to be nearly completely broken in ...

### 69 Tuesday, December 1, 2015

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

[Wiggly and imprecise animated gif output] http://mathematica.stackexchange.com/questions/100628/wiggly-and-imprecise-animated-gif-output

Trying to make animated gif of zooming into famous Ford circles. With the code

visibleQ[lh_, hr_, c_, k_] := Which[
lh &gt;= 1/(2 k), If[2 c k^2 &lt;= 1 &amp;&amp; lh^2 &lt; c (1 - c k^2), True,  ...

—————————-

[What is the difference between Dynamic[x] and Dynamic[ h[x] ] for DynamicModule variables?] http://mathematica.stackexchange.com/questions/100828/what-is-the-difference-between-dynamicx-and-dynamic-hx-for-dynamicmodule

Why plain Dynamic[x] is less sensitive and less likely to automatically be updated than e.g. Dynamic[x]?

The issue was raised here couple of times but I don't remember any general answer, just work ...

—————————-

[Pick elements from list ”separately”] http://mathematica.stackexchange.com/questions/100696/pick-elements-from-list-separately

I have the following list I want to pick elements from:

mylist = 1, 5, 7, 3, 4, 7, 2, 9, 9, 1, 10, 12, 2, 64, 34, 64

I have another list with 0's and 1's which is my selector:

selector = 1, 1, ...

—————————-

[A quicker than outer] http://mathematica.stackexchange.com/questions/100551/a-quicker-than-outer

I need to get a matrix , where form a partition of an interval, is a given function. I use

In[67]:= a[x_?NumericQ] := N[Exp[-Abs[x]]];
x = Table[-10 + 0.02 (j -  ...

—————————-

[Converting a list of rules to a list of lists] http://mathematica.stackexchange.com/questions/100700/converting-a-list-of-rules-to-a-list-of-lists

What are some easy ways to convert the list of Rules

{"Joe" -&gt; 94, "Jane" -&gt; 85, "Bob" -&gt; 82, "Bill" -&gt; 83,
"Michelle" -&gt; 98}

into a list of lists:

...

—————————-

[Magnifying Glass on a Plot] http://mathematica.stackexchange.com/questions/100691/magnifying-glass-on-a-plot

Although there is a trick in TEX magnifying glass but I want to know is there any function to magnifying glass on a plot with Mathematica?

For example for a function as Sin[x] and at x=Pi/6

Below, ...

—————————-

[How to extract a region shape from an 2 colour image?] http://mathematica.stackexchange.com/questions/100578/how-to-extract-a-region-shape-from-an-2-colour-image

I'll start by saying that I don't know anything about image processing. I have an image and I need to extract its outermost shape for use in a WordCloud. The image only has two colours and the ...

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

[How to express trigonometric equation in terms of of given trigonometric function?] http://mathematica.stackexchange.com/questions/434/how-to-express-trigonometric-equation-in-terms-of-of-given-trigonometric-functio

How can I express a trigonometric equation / identity in terms of a given trigonometric function?

using following trigonometric identities

Sin[x]^2+Cos[x]^2==1
Sin[x]/Cos[x]==Tan[x]
...

—————————-

[How to find all the local minima/maxima in a range] http://mathematica.stackexchange.com/questions/5575/how-to-find-all-the-local-minima-maxima-in-a-range

I want to find :

all local maxima in range
all local minima in range

From those points I can interpolate and combine functions upper and lower boundary. What I am really interested in, is the ...

================================== Can you answer these? ==================================

[Solving this system of nonlinear equations] http://mathematica.stackexchange.com/questions/100466/solving-this-system-of-nonlinear-equations

Edit Interestingly, I realized solving my problem with equations appeared to be more efficient than using mathematical results on the solutions to reduce the problem to equations (the ...

—————————-

[Share variables among notebooks with different Kernels] http://mathematica.stackexchange.com/questions/100760/share-variables-among-notebooks-with-different-kernels

So I have a server running in another notebook with a secondary kernel. I run my main notebook and launch the server notebook, but I have configured the variables in my main one, and can't find a way ...

—————————-

[Planning flights for a special route] http://mathematica.stackexchange.com/questions/100768/planning-flights-for-a-special-route

I want to plan a world trip with Mathematica. So I already have the dataset with all the cities I want to visit and the tour (with the command FindShortestTour). So now I want to know how to come from ...