up

PDF (letter size)

Archive of Mathematica weekly newsletters


January 30, 2024   Compiled on January 30, 2024 at 2:07am

1 Year 2021
2 Year 2020
3 Year 2018
4 Year 2017
5 Year 2016
6 Year 2015
7 Year 2014
8 Year 2013

Chapter 1
Year 2021

1.1 Thursday, May 27, 2021
1.2 Thursday, May 20, 2021
1.3 Thursday, May 13, 2021
1.4 Thursday, April 29, 2021
1.5 Thursday, April 22, 2021
1.6 Thursday, April 15, 2021
1.7 Thursday, April 1, 2021
1.8 Thursday, March 25, 2021
1.9 Thursday, March 18, 2021
1.10 Thursday, March 11, 2021
1.11 Thursday, February 25, 2021
1.12 Thursday, February 18, 2021
1.13 Thursday, February 11, 2021
1.14 Thursday, February 4, 2021
1.15 Thursday, January 28, 2021
1.16 Thursday, January 21, 2021
1.17 Thursday, January 14, 2021
1.18 Thursday, January 7, 2021

1.1 Thursday, May 27, 2021

1.1.1 Top new questions this week
1.1.2 Greatest hits from previous weeks
1.1.3 Can you answer these questions?

1.1.1 Top new questions this week

Is Internal‘StringToDouble broken in 12.3?
in V 12.3, expression in notebook shakes when scrolling mouse to edit them. How to stop this effect?
Programming language prototyping in Mathematica
WriteString to TCP socket appears to be broken in Mathematica 12.3
DirichletCondition doesn’t always work with RegionBoundary
What are the key reasons for the performance improvements in 12.3?
Default window size too small in version 12.3 (in Windows 10)

Is Internal‘StringToDouble broken in 12.3?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246449

I believe Internal`StringToDouble was the only way to fast convert string into numbers. Now in V12.3 it was removed: Internal`StringToDouble["1"]

asked by Murta https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2266 17 votes

answered by Itai Seggev https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4848 20 votes

in V 12.3, expression in notebook shakes when scrolling mouse to edit them. How to stop this effect?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246400

I noticed in V 12.3, when trying to edit an expression in a cell, and moving/scrolling the mouse, the expression itself shakes. It seems to auto-resize or adjust while one is editing it. This does not ...

asked by Nasser https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=70 14 votes

answered by MassDefect https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42264 16 votes

Programming language prototyping in Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246507

Are you aware of any projects using the Wolfram language resp. Mathematica as an environment to explore the design of programming languages - in particular languages with a focus on mathematics (...

asked by Math Gaudium https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74255 12 votes

answered by Anton Antonov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34008 18 votes

WriteString to TCP socket appears to be broken in Mathematica 12.3

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246444

I have a large codebase in which some functions make calls to Python TCP servers. The code used to work perfectly in Mathematica 12.2, but has not worked since I ...

asked by Shredderroy https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9257 11 votes

answered by Dorian B. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=23275 2 votes

DirichletCondition doesn’t always work with RegionBoundary

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246520

I am trying to solve the heat equation on a circle with a square shaped hole in it. It works:

asked by Pillsy https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=531 9 votes

answered by Tim Laska https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=61809 11 votes

What are the key reasons for the performance improvements in 12.3?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246476

The built in benchmark test on my stationary workstation shows an improvement from 2.82 to 5.99, all other hardware and operating systems settings the same. This looks very good. My question is: What ...

asked by FredrikD https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1635 9 votes

answered by Dan https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42162 5 votes

Default window size too small in version 12.3 (in Windows 10)

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246466

After starting Mathematica 12.3, the default window size is like this, it’s too small for me, I dont want to manually drag the window every time. I have tried this,

asked by matrix89 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5379 7 votes

1.1.2 Greatest hits from previous weeks

Multivariable Taylor expansion does not work as expected
How to calculate contour integrals with Mathematica?
What does "Tag Integer is Protected" message mean?
Is there an open source implementation of Mathematica-the-language?
How to express trigonometric equation in terms of of given trigonometric function?
How can I plot a graph of an integral?
Find eigen energies of time-independent Schrödinger equation

Multivariable Taylor expansion does not work as expected

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=15023

The basic multivariable Taylor expansion formula around a point is as follows:

\[ f(\mathbf r + \mathbf a) = f(\mathbf r) + (\mathbf a \cdot \nabla )f(\mathbf r) + \frac {1}{2!}(\mathbf a \cdot \nabla ) \]

asked by matheorem https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4742 65 votes

answered by Jens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=245 73 votes

How to calculate contour integrals with Mathematica?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=34073

How to calculate the integral of \(\frac {1}{\sqrt {4 z^2 + 4 z + 3}}\) over the unit circle counterclockwise for each branch of the integrand?

asked by user64494 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7152 42 votes

answered by Artes https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=184 64 votes

What does "Tag Integer is Protected" message mean?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=6738

(Newbie question)

For every function I define I get this message: When I close and reopen Mathematica, and re-enter the function definition, I don’t get the message anymore. What does it mean?

asked by stevenvh https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1450 11 votes

answered by J. M.’s ennui https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=50 13 votes

Is there an open source implementation of Mathematica-the-language?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=4454

I’ve seen questions before such as "What is the best open-source equivalent for Mathematica?", but that specific question (and that line of inquiry in general) cares more about the computer algebra ...

asked by sblom https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=178 124 votes

answered by Simon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34 86 votes

How to express trigonometric equation in terms of of given trigonometric function?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=434

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

using following trigonometric identities

asked by Prashant Bhate https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=99 30 votes

answered by Simon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34 37 votes

How can I plot a graph of an integral?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=78451

I want to plot the following function:

\[ \int \left (\frac {\Gamma (x+1)}{2}-\frac {\Gamma (x-1)}{2}\right ) \, dx \]

asked by Anixx https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=651 4 votes

answered by k_v https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=24727 9 votes

Find eigen energies of time-independent Schrödinger equation

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=32293

I’m trying to get the eigenvalues of a one dimensional time-independent Schrödinger equation,

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

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

asked by xslittlegrass https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1364 49 votes

answered by Jens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=245 46 votes

1.1.3 Can you answer these questions?

What is "Flatten" doing to my elements?
Inconsistent boundary and initial conditions when solving sine Gordon equation
Step-by-step solution for a Limit

What is "Flatten" doing to my elements?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246395

Here’s some of my code. x1 results in returning the position of a list in a {{{n1}},{{n2}}...}. Im trying to flatten it such that the list reads out as {n1,n2,n3....} some how it’s adding elements.

asked by MT Cup https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=79502 1 vote

Inconsistent boundary and initial conditions when solving sine Gordon equation

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246596

I have been trying to solve the following sine Gordon equation \(\partial _{x,x} u(x,t) - \partial _{t,t} u(x,t) - \sin (u(x,t)) - \alpha \partial _t u(x,t) + \gamma = 0\), for \(x \in [0,15]\) and

asked by t Lê Thành https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=68852 1 vote

Step-by-step solution for a Limit

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246560

Is it possible in Mathematica to get a step-by-step evaluation of some functions? Such that Mathematica is outputting not only the result but all the stages that have led to it? If so, how does one do ...

asked by putti.123 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=80178 1 vote

1.2 Thursday, May 20, 2021

1.2.1 Top new questions this week
1.2.2 Greatest hits from previous weeks
1.2.3 Can you answer these questions?

1.2.1 Top new questions this week

Stable fluids code for electromagnetic mixture application
How can I create an animation showing how a circular sector deformed to a cone?
Dataset from association of lists doesn’t work
Creating the Yin Yang symbol with minimal code
On the ordering of the vertices of a polygon
Is it possible to vary the thickness of curves according to their color code
How can I style a Line like "Glassrectangle"?

Stable fluids code for electromagnetic mixture application

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246091

This code has been translated from the original Jos Stam code and improved with some Mathematica functions. It solves problem of viscous incompressible flow with electromagnetic force in a rectangle ...

asked by Alex Trounev https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=58388 14 votes

answered by xzczd https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1871 11 votes

How can I create an animation showing how a circular sector deformed to a cone?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246171

I want to create the following animation with Mathematica.

What is the simplest way to do so? My first effort:

asked by Kim Jong Un https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42141 12 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 7 votes

Dataset from association of lists doesn’t work

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246088

Mathematica 12 on wolfram cloud isn’t rendering the table for an association of lists. According to the documentation you should be able to make columns in the table by:

However I tried this

asked by Ion Sme https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=62529 10 votes

answered by WReach https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=142 9 votes

Creating the Yin Yang symbol with minimal code

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246309

The following code creates the Yin Yang symbol

asked by nilo de roock https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=156 9 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 15 votes

On the ordering of the vertices of a polygon

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=245994

Writing:

pts = {{1, 0}, {2, 0}, {2, 3}, {3, 3}, {3, 4}, {0, 4}, {0, 3}, {1, 3}, {1, 0}}; 
Graphics[{Red, Point[pts], Blue, Line[pts]}]

we get:

and all of this ...

asked by Rolex https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=80016 9 votes

answered by Tim Laska https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=61809 15 votes

Is it possible to vary the thickness of curves according to their color code

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246125 I have this data data = Table[{x, Sin[5 x], Tanh[3 x]}, {x, -1, 1, 0.01}];

which I plot as follows

asked by valar morghulis https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=26937 8 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 6 votes

How can I style a Line like "Glassrectangle"?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246046

I’d like a thick Line to look like ChartElementFunction -> "GlassRectangle" How can that be accomplished?

asked by Gannicus https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=80033 8 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 11 votes

1.2.2 Greatest hits from previous weeks

What’s the most difficult multidimensional integral that Mathematica has solved?
Extract real part of a complex expression better than Re does
Exporting graphics to PDF - huge file
My Girlfriend is going to prison...Save her with Math
How to plot an ellipse?
Is there something like DensityPlot3D to visualize atomic orbitals?
Calling Correct Function for Plotting DiracDelta

What’s the most difficult multidimensional integral that Mathematica has solved?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222184

I am interested in benchmarking numerical integration methods and am trying to develop a wider set of difficult multivariate examples. For my particular methods, I only want to look at non-negative-...

asked by ben18785 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=19278 6 votes

Extract real part of a complex expression better than Re does

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3306

I have a complex expression with real positive variables only.

Mathematica Input Style:

asked by max https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=796 34 votes

answered by nixeagle https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=814 54 votes

Exporting graphics to PDF - huge file

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=1542

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

asked by Matthew Leingang https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=395 109 votes

My Girlfriend is going to prison...Save her with Math

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=135937

Salacious title, but true story.

asked by Prisoners Dilema https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46025 42 votes

answered by bobthechemist https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7167 23 votes

How to plot an ellipse?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=20100

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

asked by Sriram https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=6075 18 votes

answered by Jens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=245 30 votes

Is there something like DensityPlot3D to visualize atomic orbitals?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=32378

I’m visualizing some hydrogen like atomic orbitals. For looking at plane slices of the probability density, the DensityPlot function works well, and with something ...

asked by Peeter Joot https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=10 45 votes

answered by xslittlegrass https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1364 25 votes

Calling Correct Function for Plotting DiracDelta

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3506

I am wondering what is the correct function in Mathematica to plot the true impulse function, better known as the DiracDelta[] function. When using this inside of a ...

asked by night owl https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=116 17 votes

answered by Heike https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46 19 votes

1.2.3 Can you answer these questions?

Speeding up this function?
Error when integrating with constants?
Is there an analog of ArrayQ for datasets?

Speeding up this function?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246242 Is there a way to speed this function?

asked by An old man in the sea. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=11313 2 votes

Error when integrating with constants?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246300

I’m trying to integrate an ellipse: (x^2)/alpha^2) + ((y^2)/beta^2) = 1. I am not sure if I should have insert constants for alpha and beta or if there’s a way to keep them there.

This is my code

asked by user80088 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=80088 1 vote

answered by Daniel Huber https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46318 0 votes

Is there an analog of ArrayQ for datasets?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=246152

ArrayQ provides a nice way to check for missing data (specifically, it checks if the array is ragged). But if you import your data as a dataset, and apply ArrayQ, it will return False for both ragged ...

asked by theorist https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=45215 1 vote

1.3 Thursday, May 13, 2021

1.3.1 Top new questions this week
1.3.2 Greatest hits from previous weeks
1.3.3 Can you answer these questions?

1.3.1 Top new questions this week

Finding "chains" of numbers in a matrix
How to formulate this problem in Mathematica?
Problem with optimal control and Pontryagin’s maximum principle
Sorting Associations by DayName (day of week) using KeySort and/or KeySortBy
Using the PowerPoint’s laser pointer in symbols of plots
How would one add Hyperreals as a new type to Mathematica?
Extract held value from Association

Finding "chains" of numbers in a matrix

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=245937

To give some context, this problem is related to music theory. I have a matrix I’m generating with this code:

asked by Eriek https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=18649 6 votes

answered by thorimur https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=63584 9 votes

How to formulate this problem in Mathematica?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=245908

Say, I have the following expressions

f = R[p] 
g = S[p]

where R,S are rational functions, and I want to find a polynomial such that

asked by nilo de roock https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=156 6 votes

answered by Roman https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=26598 11 votes

Problem with optimal control and Pontryagin’s maximum principle

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=245797

For dynamic system: \(\dot {x}=\frac {df}{dx}+u\) where \(f=e^{-x^2}\) It is necessary to develop optimal control, minimizing criterion: \(J= \int _{0}^{t_f} ((\frac {df}{dx})^2+u^2) \,dt \) Algorithm:

We ...

asked by dtn https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=67019 6 votes

answered by Alex Trounev https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=58388 7 votes

Sorting Associations by DayName (day of week) using KeySort and/or KeySortBy

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=245721

I have an association where the keys are the days of the week:

asked by theorist https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=45215 6 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 6 votes

Using the PowerPoint’s laser pointer in symbols of plots

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=245800

I am interested in exploiting a symbol that is similar to the PowerPoint’s laser pointer in the role of PlotMarkers. Is there any idea to create that!? This symbol ...

asked by Inzo Babaria https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=33967 5 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 12 votes

How would one add Hyperreals as a new type to Mathematica?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=245782

Hyperreals are an extension to the real numbers; they formalise the concepts of infinities and infinitestimals as numbers, rather than the named limit points outside of the system of reals and form ...

asked by Julian Moore https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12858 5 votes

Extract held value from Association

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=245784

Consider an association which contains a key which must not be prematurely evaluated. assoc = <| key :> value |>

For example, a value of ...

asked by Anti Earth https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=32591 5 votes

answered by Leonid Shifrin https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=81 6 votes

1.3.2 Greatest hits from previous weeks

1 Plot, 2 Scale/Axis
How to perform a multi-peak fitting?
Standard deck of 52 playing cards in curated data?
Is it possible to export the equations from Mathematica to MATLAB?
LaTeXand Mathematica
How can I plot implicit equations?
Calling Correct Function for Plotting DiracDelta

1 Plot, 2 Scale/Axis

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=627

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

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

asked by 500 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=172 152 votes

answered by ArgentoSapiens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=92 152 votes

How to perform a multi-peak fitting?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=26336

I am wondering how to implement the multi-peak detecting and fitting in Mathematica. Following is an example of fitting the data using three peaks (such that the data ~ peak1 + peak2 + peak3). The ...

asked by Everett You https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1389 55 votes

answered by Silvia https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=17 55 votes

Standard deck of 52 playing cards in curated data?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=16108

I am not sure how to find out what all is included as curated data. For example, are the individual images of each of the 52 cards in a standard deck of playing cards included?

If not, is there a way ...

asked by JohnD https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1629 25 votes

answered by rm -rf https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5 23 votes

Is it possible to export the equations from Mathematica to MATLAB?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=14035

Is it possible to export the output expressions from Mathematica computations (e.g., equations) in valid MATLAB syntax?

asked by Seyhmus Güngören https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4256 43 votes

answered by rm -rf https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5 48 votes

LaTeXand Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=736

I quite often would like to draw graphics in my LaTeXdocuments using Mathematica. I have encountered three problems. I would like to know if there are any workarounds to these problems

I would ...

asked by Thomas Rot https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=227 130 votes

answered by Simon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34 46 votes

How can I plot implicit equations?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=34668

If you enter the following into Wolfram | Alpha, you get nice graphs:

graph 4 x^4 + y^2 = 2

How do you do this in Mathmatica? I realize that these are not ...

asked by Rollie https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=10174 40 votes

answered by Timothy Wofford https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9391 41 votes

Calling Correct Function for Plotting DiracDelta

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3506

I am wondering what is the correct function in Mathematica to plot the true impulse function, better known as the DiracDelta[] function. When using this inside of a ...

asked by night owl https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=116 17 votes

answered by Heike https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46 19 votes

1.3.3 Can you answer these questions?

Excess lines in the solution plot of vector ODE
Algorithmically imposing a substitution in a difficult integral
How to expand a rational function as a single fraction

Excess lines in the solution plot of vector ODE

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=245826

I’ve got an ODE system, which I attempt to solve by two ways: solving the system itself, and using vector ODE. Here is code of first way:

asked by Cpp Nosavvier https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=79893 3 votes

Algorithmically imposing a substitution in a difficult integral

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=245884

Consider the following integral: \[ I = \frac {1}{\pi c^2} \int \limits _{r=0}^c 2 \pi r\ e^{-\frac { \left ( \sqrt {a^2 - r^2} -\sqrt {b^2 - r^2} \right )}{\lambda }}\ dr \] under the conditions \(a>b>c>\)...

asked by David G. Stork https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9735 2 votes

How to expand a rational function as a single fraction

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=245673

This has been annoying me for a long time. I want a rational function to be represented in the form \[\frac {a_nx^n+....a_0x^0}{b_mx^m+....b_0x^0}\] But this seems to be quite difficult. Mathematica ...

asked by grdgfgr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=28163 2 votes

answered by Ulrich Neumann https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=53677 0 votes

1.4 Thursday, April 29, 2021

1.4.1 Top new questions this week
1.4.2 Greatest hits from previous weeks
1.4.3 Can you answer these questions?

1.4.1 Top new questions this week

Replacing duplicates instead of deleting them
RecurrenceTable and While
Speed up averaging of numerically solved differential equations
FEM: how to redo a composed boundary mesh for better quality?
Were these Images made with Wolfram Language / Mathematica?
How to find the repeated elements in a vector
How to separate two regions in DensityPlot

Replacing duplicates instead of deleting them

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=245078

My code replaces each repeated element by "X".

asked by azerbajdzan https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=53172 10 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 18 votes

RecurrenceTable and While

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=2450308

Good day. Let’s take an example from Help on RecurrenceTable

asked by macros https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=79485 6 votes

answered by Roman https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=26598 3 votes

Speed up averaging of numerically solved differential equations

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=245121

I deals with a coupled system with non-linear differential equations of first order. I perform numerical solution with NDSolve and then use obtained solutions,

asked by Artem Alexandrov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=49992 5 votes

answered by Alex Trounev https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=58388 1 vote

FEM: how to redo a composed boundary mesh for better quality?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=245050

Suppose you have region with 2 materials: one embedding material matrix containing some particles

asked by Mauricio Fernández https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=24710 4 votes

answered by Tim Laska https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=61809 5 votes

Were these Images made with Wolfram Language / Mathematica?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=245080

I am currently writing a paper in which Fibonacci Spirals are discussed. In the text of the paper the mathematics of these objects is discussed and the relevant equations and relationships are shown ...

asked by urquiza https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=79636 4 votes

answered by flinty https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72682 9 votes

How to find the repeated elements in a vector

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=245068

Is there a way to write a function where the input is a vector and the output is the elements in the vector that are repeated? I was trying to use something along the lines:

asked by Trashlife https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=79628 4 votes

answered by Roman https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=26598 7 votes

How to separate two regions in DensityPlot

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=245051

I want to separate two regions in DensityPlot similar to the attached image.

In my code and the obtained result, I want to separate the region with less value of one from others. How can I do this? ...

asked by mehrosadat ebrahimi https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=40575 4 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 4 votes

1.4.2 Greatest hits from previous weeks

How to graph a sphere with cartesian equations?
Parallel and perpendicular symbol from Mathematica to LaTeX
How do I make a 3DPlot using cylindrical coordinates?
What does Compile[] do to make code run so much faster?
How do I clear all user defined symbols?
Formatting legend text font
How can I plot the direction field for a differential equation?

How to graph a sphere with cartesian equations?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=24169

I’m new to Mathematica and I need to ask how to graph a sphere, cylinder, etc.. using cartesian equations.

For example in sphere’s case \(x^2+y^2+z^2=1\)

I tried to use ...

asked by German https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7145 8 votes

answered by Dr. belisarius https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=193 14 votes

Parallel and perpendicular symbol from Mathematica to LaTeX

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=46538

I want to get the following expression from Mathematica to LaTeX:

\[ \begin {bmatrix} E_{\parallel } \\ E_{\perp } \end {bmatrix} \]

I have tried to use inbuilt ’symbol’ character from the special ...

asked by Steve Hatcher https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=13314 20 votes

answered by Sjoerd C. de Vries https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=57 27 votes

How do I make a 3DPlot using cylindrical coordinates?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=19076

I’m trying to plot a function of the form \(z(r,\theta )\) where \(r \in [0, R]\) for a finite R, \(\theta \in [0,2\pi [\), and z is the third coordinate, a function of the first two. I couldn’t find anything ...

asked by Learning is a mess https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5643 19 votes

answered by whuber https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=91 26 votes

What does Compile[] do to make code run so much faster?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=2371758

I am looking for an ELI5 explanation of whatCompile[] in the Wolfram Language context does and why it works so much faster than uncompiled code in certain cases. I am trying to get more insight to ...

asked by anon248 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=66458 20 votes

answered by chasly - supports Monica https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34024 9 votes

How do I clear all user defined symbols?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=850

Is there some way to do this other than going to Evaluation -> Quit kernel and firing a new one up?

asked by niklasfi https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=82 99 votes

answered by Artes https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=184 98 votes

Formatting legend text font

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3433

I am using this code to plot a graph, and I am trying to make the font of the legend bigger.

asked by Julia https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=525 20 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 25 votes

How can I plot the direction field for a differential equation?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=8841

I’d like to plot the graph of the direction field for a differential equation, to get a feel for it. I’m a novice, right now, when it comes to plotting in Mathematica, so I’m hoping that someone can ...

asked by Matt Groff https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1735 33 votes

answered by Peter Breitfeld https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=307 26 votes

1.4.3 Can you answer these questions?

Artifacts When Plotting Results of Numerical Integration
How to solve a system with infinitely many equations?
Custom multiplication operation between variables

Artifacts When Plotting Results of Numerical Integration

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=2451018

I am trying to reproduce the following graph of phase shifts as function of frequency.

Please see my code bellow. I used Mathematica to solve for t1 and ...

asked by guestuser https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=76488 2 votes

How to solve a system with infinitely many equations?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=245194

I need to solve the following system of (infinitely many) equations. I am looking for \(V(0,0)\)

\(t \in \{0,1,2.....\}\) with one caveat that \(s \leq 1+t\) should hold.

\( s \in \{1,2,3,L-1\}\)

fixed ...

asked by Monire Jalili https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=62240 1 vote

Custom multiplication operation between variables

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=2452988

I am constructing polynomial expressions in the variables \(s[0],s[1],...,s[n]\) and I’m trying to define a new operation to simplify the expression:

asked by David https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72836 1 vote

1.5 Thursday, April 22, 2021

1.5.1 Top new questions this week
1.5.2 Greatest hits from previous weeks
1.5.3 Can you answer these questions?

1.5.1 Top new questions this week

joining three lists to plot data with errors
Interpreting traditional math
Is it possible to define conjugate of a function?
Maximal circle packing inside a given square
Some doubts about symbolic equations in Wolfram Mathematica
Count number of balls in each bin, given a two-element sequence of balls and bins
FEM: elastic cylinder under circumferential pressure

joining three lists to plot data with errors

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=244887

I have three lists:

x = {x1, x2, ...}, 
y = {y1, y2, ...}, 
yErr = {y1Err, y2Err, ...}

that I want to join into the following format:

asked by uuu https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42359 7 votes

answered by Ulrich Neumann https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=53677 9 votes

Interpreting traditional math

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=244672

There are two ways (afaik) to parse traditional math string to an expression:

asked by Kuba https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5478 7 votes

answered by Kuba https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5478 3 votes

Is it possible to define conjugate of a function?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=244907

Could you help me, please? I have two complex functions of real variable f[x] and fc[x] such that one is a conjugate of another one. I’d like to take a conjugate of an expression that includes both of ...

asked by Svetlana https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72941 6 votes

answered by Daniel Huber https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46318 9 votes

Maximal circle packing inside a given square

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=244820

How to pack n equal disks(radius a/2) with maximal area inside a given rectangle ? I’m trying to solve this problem using Mathematicas Region functions. Here my approach: Maximize the area of the ...

asked by Ulrich Neumann https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=53677 6 votes

answered by cvgmt https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72111 6 votes

Some doubts about symbolic equations in Wolfram Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=244961

I need to perform the following operations using Wolfram Mathematica. I have these equations: \[a b = c+d+e\] \[\frac {d}{f}=g h + i\] \[k=\frac {a}{c}\] I need to obtain \(k\) as a function of: \(a,b,c,e,\dots \)

asked by Skyhawk https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=79597 5 votes

answered by Bob Hanlon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9362 9 votes

Count number of balls in each bin, given a two-element sequence of balls and bins

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=244834

If I have a list:

{ball,ball,BINDIVIDER,ball,ball,ball,BINDIVIDER,BINDIVIDER,ball,BINDIVIDER,ball}

The balls and bins can be in any permutation. Then, the ...

asked by apkg https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=35029 5 votes

answered by WReach https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=142 6 votes

FEM: elastic cylinder under circumferential pressure

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=244993

Suppose you have an elastic cylinder of radius \(R\) and height \(H\) and you want to solve the mechanical 3D equilibrium with Mathematica’s FEM. How do you impose a pressure \(p\) only on the cylinder ...

asked by Mauricio Fernández https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=24710 4 votes

answered by user21 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=18437 4 votes

1.5.2 Greatest hits from previous weeks

Plot data from txt file?
How to make a Spherical Cow?
What are the most common pitfalls awaiting new users?
My Girlfriend is going to prison...Save her with Math
Plotting the Star of Bethlehem
Generate a Unit Circle Trigonometry
Extract real part of a complex expression better than Re does

Plot data from txt file?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=5910

I have data in file.txt which can be expressed by 20000x11 matrix. I do not want to import all of these data. How can I plot graph of the column 1 & column 4?

asked by Gokce https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1297 21 votes

answered by user1066 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=106 24 votes

How to make a Spherical Cow?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=125043

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

asked by Sumit https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=8070 69 votes

answered by andre314 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5467 76 votes

What are the most common pitfalls awaiting new users?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=18393

As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...

asked by Dr. belisarius https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=193 485 votes

answered by Michael E2 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4999 288 votes

My Girlfriend is going to prison...Save her with Math

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=135937

Salacious title, but true story.

asked by Prisoners Dilema https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46025 42 votes

answered by bobthechemist https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7167 23 votes

Plotting the Star of Bethlehem

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=236499

Christmas is around the corner! In preparation, consider the polynomial f[x_,y_]:= 1/10 (4 - x^2 - 2 y^2)^2 + 1/2 (x^2 + y^2) 

and define \(r=(f_x,f_y)\) using the ...

asked by fwgb https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=44151 30 votes

answered by Roman https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=26598 22 votes

Generate a Unit Circle Trigonometry

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=2456

Struggling often with Trigonometry I would like to have some code to generate this Unit Circle Trigonometry. Would be of great help when I need to transform some data :

asked by 500 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=172 18 votes

answered by Mark McClure https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36 32 votes

Extract real part of a complex expression better than Re does

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3306

I have a complex expression with real positive variables only.

Mathematica Input Style:

asked by max https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=796 34 votes

answered by nixeagle https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=814 53 votes

1.5.3 Can you answer these questions?

Understanding the behavior of HypergeometricPFQ
recursively find StringCases
How to specify custom Loss function for Predict

Understanding the behavior of HypergeometricPFQ

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=244963

this is my very post here, so I apologize for any possible format issue. I am using HypergeometricPFQ functions (more exactly \(_3F_2\)) as approximants for other more complicated functions. Here are ...

asked by avg https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=79519 1 vote

recursively find StringCases

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=244663

Can I recursively extract StringCases[] that match a specific pattern? Here is a minimalist example (not my actual problem):

asked by Conor Cosnett https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36681 2 votes

How to specify custom Loss function for Predict

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=244702

How can I use Predict[Xs->Ys, Method->"NeuralNetwork"] to predict 90%-quantile (instead of mean value)? Utility Function does not work well for this case, because

it assumes ...

asked by Artem Vorozhtsov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=61755 2 votes

1.6 Thursday, April 15, 2021

1.6.1 Top new questions this week
1.6.2 Greatest hits from previous weeks
1.6.3 Can you answer these questions?

1.6.1 Top new questions this week

Is there a neat code to swap elements of a list?
Stokes equations in 2D with traction boundary conditions
Transform a number to a factorial
Stopping condition for FindMinimum / FindMaximum
Efficiently compute Minkowski sum of a 2D Region and a Disc of radius r?
Random orthogonal matrix
Detecting patterns in a graph network

Is there a neat code to swap elements of a list?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=244314

I want to swap the list to make a new list as follows. The code works but I’m wondering if there is a neat code, or an elegant way to do this.

asked by anhnha https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=18805 9 votes

answered by kirma https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=3056 10 votes

Stokes equations in 2D with traction boundary conditions

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=244482

This is a follow-up to a previous question (see here). We would like to solve the two-dimensional Stokes equations using the FEM package in Mathematica, when we prescribe traction boundary conditions. ...

asked by Alex R https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=78043 7 votes

answered by Oleksii Semenov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=63028 3 votes

Transform a number to a factorial

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=244566

I came across the need to transform a number into a factorial n, with positive integer n. I have searched in the MMA information but I can’t find anything like that. I imagine an input, which verifies ...

asked by zeros https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=26849 7 votes

answered by Bob Hanlon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9362 6 votes

Stopping condition for FindMinimum / FindMaximum

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=244313

This seems like it should be a simple question – but I am looking to use a "home made" stopping condition with FindMaximum, while evaluating a very complex function. Printing out the ...

asked by Richard E https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=79342 7 votes

answered by Daniel Huber https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46318 8 votes

Efficiently compute Minkowski sum of a 2D Region and a Disc of radius r?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=244565

Given a 2D Mathematica Region, e.g. A = Region[RegionDifference[Disk[{0, 0}, 2], Disk[{2, 0}, 1]]], how can I grow the region by an arbitrary radius r? For example, ...

asked by Aaron T. Becker https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=76690 6 votes

answered by cvgmt https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72111 5 votes

Random orthogonal matrix

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=244316

Is there a way to generate real random orthogonal matrices in mathematica? If Q is an orthogonal matrix, it’s properties are

asked by Jasmine https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73364 6 votes

answered by Henrik Schumacher https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=38178 9 votes

Detecting patterns in a graph network

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=244592

If we create a random graph

Chop[LowerTriangularize[RandomReal[{-1, 1}, {10, 10}], -1], 0.6] /.0 -> \[Infinity] // MatrixForm 
WeightedAdjacencyGraph[%]

How can ...

asked by Teabelly https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=56986 5 votes

answered by Szabolcs https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12 6 votes

1.6.2 Greatest hits from previous weeks

What do the X and Y axis stand for in the Fourier transform domain?
Plot, extract data to a file
Get a "step-by-step" evaluation in Mathematica
How to add a vertical line to a plot
Selecting every n-th element from a list
How to graph a sphere with cartesian equations?
Conversion of Sine to Cosine

What do the X and Y axis stand for in the Fourier transform domain?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=85139

In Wolfram Mathematica the function Fourier has the following declaration

Fourier[list]

And after a list is given to the ...

asked by user253956 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=29958 27 votes

answered by Hugh https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12558 61 votes

Plot, extract data to a file

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=19859

I need to save data that Mathematica uses inside the Plot command. The format that I would like to have is:

x1 y1 
x2 y2

asked by molkee https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5097 30 votes

answered by Mr.Wizard https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=121 47 votes

Get a "step-by-step" evaluation in Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=148

Is it possible in Mathematica to get a step-by-step evaluation of some functions; that’s to say, outputting not only the result but all the stages that have led to it? If so, how does one do it?

asked by Cydonia7 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=44 131 votes

answered by J. M.’s ennui https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=50 109 votes

How to add a vertical line to a plot

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3561

In the plot below I would like to add two vertical lines at \(x = \frac {\pi }{15} \pm \frac {1}{20}\). How can I do that?

asked by sjdh https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=515 64 votes

answered by Ajasja https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=745 83 votes

Selecting every n-th element from a list

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=64003 I have a list:

data = {4, 5, 7, 8, 9, 5, 3, 2, 1, 2, 13, 12};

I want to take those elements in the list which are located at equal distances, say, every third ...

asked by Suro https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=20003 37 votes

answered by Szabolcs https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12 34 votes

How to graph a sphere with cartesian equations?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=24169

I’m new to Mathematica and I need to ask how to graph a sphere, cylinder, etc.. using cartesian equations.

For example in sphere’s case \(x^2+y^2+z^2=1\)

I tried to use ...

asked by German https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7145 7 votes

answered by Dr. belisarius https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=193 13 votes

Conversion of Sine to Cosine

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=67521

I’m solving equations with many Cosines and Sines. And I want to convert all the Sines to Cosines using trigonometric formulas such as cos(x)=sin(x+pi/2). How can I do this?

asked by YongCheol Kwon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=23041 4 votes

answered by Sjoerd C. de Vries https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=57 2 votes

1.6.3 Can you answer these questions?

RandomInstance of GeometricScene producing unexpected result
Solving an ordinary differential equation with boundary condition at infinity
How to use ScalingFunctions with Graphics ChartElements

RandomInstance of GeometricScene producing unexpected result

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=244335

Consider the following scene as an example:

asked by user13892 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=13892 1 vote

Solving an ordinary differential equation with boundary condition at infinity

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=244342

I want to solve the following differential equation  f''[z] + (1/z)*f'[z] - f[z] + f[z]^3 == 0

subject to the boundary conditions

asked by HeitorGalacian https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73726 1 vote

answered by Mariusz Iwaniuk https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=26828 0 votes

How to use ScalingFunctions with Graphics ChartElements

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=244387

How to draw spheres with BubbleChart with a reversed vertical axis? The 3rd example shows the problem (empty plot), likely caused by the transformation, but how to correct it?

asked by HuibH https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=70256 3 votes

1.7 Thursday, April 1, 2021

1.7.1 Top new questions this week
1.7.2 Greatest hits from previous weeks
1.7.3 Can you answer these questions?

1.7.1 Top new questions this week

Are Mathematica’s maps copyright-free?
Find all English words that can be comprised of Element Abbreviations found in the Periodic Table
Efficient uniform sampling of certain Boolean matrices
Incorrect integration from article?
Running Mathematica in ’SpouseMode’
Putting together several ListPlot 2D in a 3D graphic
Combine SortBy with ReverseSortBy

Are Mathematica’s maps copyright-free?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=243660

Are the maps available in Mathematica copyright-free? For instance, if I generate the image

asked by sam wolfe https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=64001 13 votes

answered by Carl Lange https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=57593 24 votes

Find all English words that can be comprised of Element Abbreviations found in the Periodic Table

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=243664

This question is majorely influenced by a meme...

Now, I thought... it would be interesting to see what kind of "passwords" could one derive using Periodic Table :D Hence, I began to work ...

asked by e.doroskevic https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=18696 9 votes

answered by creidhne https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=41569 3 votes

Efficient uniform sampling of certain Boolean matrices

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=243547

I want to uniformly sample \((0,1)\)-matrices with certain constraints. In particular, I want sum of each row to be rowsum and the sums of columns to equal ...

asked by kirma https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=3056 8 votes

answered by Szabolcs https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12 7 votes

Incorrect integration from article?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=243711

Recently I came across an interesting article by Daniel Lichtblau, where the integral

Integrate[Abs[x - y]^n, {x, 0, 1}, {y, 0, 1}]

asked by user64494 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7152 7 votes

answered by Ulrich Neumann https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=53677 8 votes

Running Mathematica in ’SpouseMode’

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=243859

In this previous question I looked into a deprecated capability of Mathematica from Version 2. Mathematica command that allows it to read my intentions Thanks to all for your answers. I note that ...

asked by MikeY https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=47314 6 votes

answered by MikeY https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=47314 1 vote

Putting together several ListPlot 2D in a 3D graphic

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=243823

I’m trying to put together several different 2D plots in a 3D graphics to create a figure which would be like the one below (taken from https://aip.scitation.org/doi/10.1063/1.4998724 However my ...

asked by AntoineM https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=79171 6 votes

answered by Bob Hanlon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9362 4 votes

Combine SortBy with ReverseSortBy

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=243776

Suppose I have a dataset, which I want to sort according to two criteria. However, I want the first criteria to be sorted ascending, and the second descending. This would require to somehow combine ...

asked by Gabriel Landi https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=347 6 votes

answered by SquareOne https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=19960 3 votes

1.7.2 Greatest hits from previous weeks

How to add a front-end to the free Wolfram Engine?
How to express trigonometric equation in terms of of given trigonometric function?
What’s the most difficult multidimensional integral that Mathematica has solved?
Standard deck of 52 playing cards in curated data?
Even Fibonacci numbers
How do I clear all user defined symbols?
How to perform a multi-peak fitting?

How to add a front-end to the free Wolfram Engine?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=198839

https://blog.stephenwolfram.com/2019/05/launching-today-free-wolfram-engine-for-developers/

http://www.wolfram.com/engine/

The Free Wolfram Engine for Developers is available for pre-production ...

asked by Alexey Golyshev https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=23402 65 votes

answered by Alexey Golyshev https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=23402 55 votes

How to express trigonometric equation in terms of of given trigonometric function?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=434

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

using following trigonometric identities

asked by Prashant Bhate https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=99 30 votes

answered by Simon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34 37 votes

What’s the most difficult multidimensional integral that Mathematica has solved?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222184

I am interested in benchmarking numerical integration methods and am trying to develop a wider set of difficult multivariate examples. For my particular methods, I only want to look at non-negative-...

asked by ben18785 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=19278 6 votes

Standard deck of 52 playing cards in curated data?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=16108

I am not sure how to find out what all is included as curated data. For example, are the individual images of each of the 52 cards in a standard deck of playing cards included?

If not, is there a way ...

asked by JohnD https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1629 25 votes

answered by rm -rf https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5 23 votes

Even Fibonacci numbers

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=37266

Today, I found the Euler Project. Problem #2 is

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:

asked by xyz https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9627 34 votes

answered by rcollyer https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=52 46 votes

How do I clear all user defined symbols?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=850

Is there some way to do this other than going to Evaluation -> Quit kernel and firing a new one up?

asked by niklasfi https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=82 99 votes

answered by Artes https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=184 98 votes

How to perform a multi-peak fitting?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=26336

I am wondering how to implement the multi-peak detecting and fitting in Mathematica. Following is an example of fitting the data using three peaks (such that the data ~ peak1 + peak2 + peak3). The ...

asked by Everett You https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1389 55 votes

answered by Silvia https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=17 55 votes

1.7.3 Can you answer these questions?

pure function assignment
Graphics get cropped when wrapped in Hyperlink and Inset in MMA 12.2 (doesn’t seem to happen on 12.1 RPi) Bug?
Does Mathematica have build-in function to compute dimension of square polynomial system?

pure function assignment

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=243708

I do not understand this statement from the Introduction to Dynamic tutorial:

asked by Dave https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=79143 1 vote

answered by MarcoB https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27951 0 votes

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=243637

I’ve noticed that wrapping a Graphic[] in Hyperlink[] causes weird things to happen when using ...

asked by Mike H https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=79121 1 vote

Does Mathematica have build-in function to compute dimension of square polynomial system?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=243849

I’m working with square polynomial systems and wish to know if a (small) system has a finite number of solutions. That is, if it’s zero-dimensional. I’m not aware of any built-in function to do this ...

asked by Dominic https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=47466 1 vote

1.8 Thursday, March 25, 2021

1.8.1 Top new questions this week
1.8.2 Greatest hits from previous weeks
1.8.3 Can you answer these questions?

1.8.1 Top new questions this week

Head[x] vs x[[0]]?
How to roll a graph on the y-axis
Numerically solving Helmholtz equation in 2D for a Guitar
How to draw the tree in a "pitchfork" form?
Digitizing a geometrical sensor
How Can I Compute The Automorphism Group of a Matroid?
How to make a circular heat map or diagram in Mathematica?

Head[x] vs x[[0]]?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=242183

Can we say Head[x] and x[[0]] are identical ? In mathematica manual I could find : ’The head is the part with index 0’

But I am not sure whether Head[x] are x[[0]] are really interchangeable in any ...

asked by imida k https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34532 15 votes

answered by Leonid Shifrin https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=81 13 votes

How to roll a graph on the y-axis

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=242180

I want to roll the function f(x)=sqrt(x), x[0,1] along the y-axis. I know how to rotate the graph around a point, but I’m not sure how to rotate along an axis in 2D. Rotating around a point e.g. (0,...

asked by Guy Foxx https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=75736 14 votes

answered by cvgmt https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72111 17 votes

Numerically solving Helmholtz equation in 2D for a Guitar

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=242138

Hi I am new to using Mathematica, so am not too confident. I am essentially trying to model vibrations of a guitar sound board for a project. It would be great to get some visualisations of the ...

asked by sp96 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=77970 11 votes

answered by Tim Laska https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=61809 8 votes

How to draw the tree in a "pitchfork" form?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=242140

How to set the options or other parameters in a TreePlot to draw the branching outside of the vertex? I.e. in a form similar to a dendrogram (but the dendrogram plot itself does not support the ...

asked by Slepecky Mamut https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=48033 10 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 9 votes

Digitizing a geometrical sensor

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=242186

I want to quantify the flow from photos taken from a sensor such as this one:

For a limited number of readings, I can use a plot digitization method. However, I need to do this many times for ...

asked by MathX https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=38575 9 votes

answered by MelaGo https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=63360 10 votes

How Can I Compute The Automorphism Group of a Matroid?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=242030

I want to compute the automorphism group of a matroid. This reduces to the following (more general) problem: Suppose I have a list of sets \(\{\{b_{11},\dots ,b_{1k}\},\dots ,\{b_{k1},\dots ,b_{kk}\}\}\) ...

asked by Madeline Brandt https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=51040 7 votes

answered by Madeline Brandt https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=51040 6 votes

How to make a circular heat map or diagram in Mathematica?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=242425

Is there any way to make a circular heat map in Mathematica? Thanks for your help! Here is a toy example for regular heat map. Can anyone help me make it to a circular one?

asked by Frankie https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=70269 6 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 4 votes

1.8.2 Greatest hits from previous weeks

How can I draw the Olympic rings with Mathematica??
Plot, extract data to a file
What does "Tag Integer is Protected" message mean?
Selecting every n-th element from a list
Labeling individual curves in Mathematica
Help find a bright object on Mars!
Plotting the frequency spectrum of a data series using Fourier

How can I draw the Olympic rings with Mathematica??

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=8885

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, but ...

asked by Mike Honeychurch https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=77 44 votes

answered by cormullion https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=61 23 votes

Plot, extract data to a file

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=19859

I need to save data that Mathematica uses inside the Plot command. The format that I would like to have is:

asked by molkee https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5097 30 votes

answered by Mr.Wizard https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=121 47 votes

What does "Tag Integer is Protected" message mean?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=6738

(Newbie question)

For every function I define I get this message: When I close and reopen Mathematica, and re-enter the function definition, I don’t get the message anymore. What does it mean?

asked by stevenvh https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1450 11 votes

answered by J. M.’s ennui https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=50 13 votes

Selecting every n-th element from a list

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=64003

I have a list:

data = {4, 5, 7, 8, 9, 5, 3, 2, 1, 2, 13, 12};

I want to take those elements in the list which are located at equal distances, say, every third ...

asked by Suro https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=20003 37 votes

answered by Szabolcs https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12 33 votes

Labeling individual curves in Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=4444

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,...

asked by Tianxiang Xiong https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1041 63 votes

answered by Artes https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=184 47 votes

Help find a bright object on Mars!

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=11819

In today’s news, scientists found a bright object on one of Curiosity’s photos (it’s near the bottom of the picture below). It’s a bit tricky to find - I actually spent quite some time staring at the ...

asked by Victor K. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1351 201 votes

answered by Niki Estner https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=242 261 votes

Plotting the frequency spectrum of a data series using Fourier

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=18082

testData = Table[N@Sin[500 x], {x, 0, 100}]; 
ListLinePlot[Abs[Fourier[testData]], PlotRange -> Full]

Gives me Which I do not expect because the Fourier ...

asked by C. E. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=731 14 votes

answered by KennyColnago https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=3246 16 votes

1.8.3 Can you answer these questions?

Is the fancy script ’C’ mathscrC available in Mathematica?
FormFunction output automatic download
Generating a lattice by \(N^{th}\) iteration of unit cell

Is the fancy script ’C’ mathscrC available in Mathematica?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=242074

In mathjax \mathscr{C} gives me the character $\mathscr{C}$ that I want. There is a UTF listing for this character. https://www.compart.com/en/unicode/U+1D49E If I copy form this webpage and paste ...

asked by Steven Thomas Hatton https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=44139 2 votes

FormFunction output automatic download

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=242097

I want to create a FormFunction that takes in a CSV file, applies some operations on the data and outputs another CSV file. I would like for the ouput CSV file to be automatically downloaded. I have a ...

asked by Gabriel Landi https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=347 1 vote

Generating a lattice by \(N^{th}\) iteration of unit cell

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=242436

This question is in continuation of the my previous question that was not clearly presented by me at all. I have a unit cell, and I would like to generate a lattice but in iterative order. For ...

asked by L.K. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=15927 1 vote

1.9 Thursday, March 18, 2021

1.9.1 Top new questions this week
1.9.2 Greatest hits from previous weeks
1.9.3 Can you answer these questions?

1.9.1 Top new questions this week

Why am I getting that \(0.999999999999988 \geq 1.0\) is True?
Can we make an "Outerable" Attribute?
How to fit a curve in a picture with an equation?
Bug with Json payload with diacritics for HTTPRequest
How to plot a "main effect" plot?
generating tuples of ones and zeroes with a fixed number of ones
How to add an attractive potential (migration term) named component to Mass Transport PDE

Why am I getting that \(0.999999999999988 \geq 1.0\) is True?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=241791

I am getting these results:

asked by Craig Carter https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12461 20 votes

answered by Chip Hurst https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4346 23 votes

Can we make an "Outerable" Attribute?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=241712

We can declare a function to have the Listable Attribute so that it automatically threads over lists in a particular way. For functions of multiple arguments it ...

asked by Tanner Legvold https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=68925 14 votes

answered by Michael E2 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4999 8 votes

How to fit a curve in a picture with an equation?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=241686

For a curve taken from a picture, is there any method to fit it with an equation if it appears to be some standard curve? For example, in the following picture, the curve looks like an ellipse or a ...

asked by Nobody https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=66106 10 votes

answered by mikado https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36788 9 votes

Bug with Json payload with diacritics for HTTPRequest

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=241573

Working in the creations of APIs with Mathematica 12.2, I got this problem with diacritics when sending JSON data. Here is a toy code using httpbin.

asked by Murta https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2266 10 votes

answered by Kuba https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5478 8 votes

How to plot a "main effect" plot?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=241876

I’m trying to make a "main effect" type chart but I haven’t found a way to do it in Mathematica. The main effect plots are the graphs plotting the means for each value of a categorical ...

asked by ALEXANDRE ARARIPE https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=77894 7 votes

answered by MassDefect https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42264 11 votes

generating tuples of ones and zeroes with a fixed number of ones

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=241943

I would like to generate all the tuples of ones and zeros of a given length and with a given number of ones without generating all the possible tuples, which is impossible for tuples of large enough ...

asked by EGME https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=53849 6 votes

answered by Roman https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=26598 10 votes

How to add an attractive potential (migration term) named component to Mass Transport PDE

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=241642

Wolfram Mathematica 12.2 now features "Named Partial Differential Equation Terms"

For specific physics fields, relevant PDE terms have been packaged as components and augmented with ...

asked by rhermans https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=10397 6 votes

answered by Tim Laska https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=61809 4 votes

1.9.2 Greatest hits from previous weeks

Plotting the frequency spectrum of a data series using Fourier
Is there something like DensityPlot3D to visualize atomic orbitals?
xkcd-style Plots
Generate a Unit Circle Trigonometry
Calculate the 2D Fourier transform of an Image
How can I plot implicit equations?
Oak Island, extending the "Alignment", possible Great Circle?

Plotting the frequency spectrum of a data series using Fourier

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=18082

testData = Table[N@Sin[500 x], {x, 0, 100}]; 
ListLinePlot[Abs[Fourier[testData]], PlotRange -> Full]

Gives me Which I do not expect because the Fourier ...

asked by C. E. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=731 14 votes

answered by KennyColnago https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=3246 16 votes

Is there something like DensityPlot3D to visualize atomic orbitals?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=32378

I’m visualizing some hydrogen like atomic orbitals. For looking at plane slices of the probability density, the DensityPlot function works well, and with something ...

asked by Peeter Joot https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=10 45 votes

answered by xslittlegrass https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1364 25 votes

xkcd-style Plots

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=11350

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

asked by Amatya https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2039 622 votes

answered by Simon Woods https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=862 483 votes

Generate a Unit Circle Trigonometry

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=2456

Struggling often with Trigonometry I would like to have some code to generate this Unit Circle Trigonometry. Would be of great help when I need to transform some data :

asked by 500 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=172 18 votes

answered by Mark McClure https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36 32 votes

Calculate the 2D Fourier transform of an Image

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=29203

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

asked by user8727 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=8727 17 votes

answered by Nasser https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=70 33 votes

How can I plot implicit equations?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=34668

If you enter the following into Wolfram Alpha, you get nice graphs:

graph 4 x^4 + y^2 = 2 

How do you do this in Mathmatica? I realize that these are not ...

asked by Rollie https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=10174 39 votes

answered by Timothy Wofford https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9391 40 votes

Oak Island, extending the "Alignment", possible Great Circle?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=235815

During these days of COVID, I indulged in the guilty pleasure of watching The Curse of Oak Island - Season 8, Episode 4 Alignment, which viewed last night (1 Dec 2020). During the episode, some "...

asked by Jagra https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=571 13 votes

answered by Carl Lange https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=57593 12 votes

1.9.3 Can you answer these questions?

ColorFunction in ListContourPlot3D raising error when using more than one argument
Autocomplete file argument for custom function
Reduce the time to find six integer numbers so that the angle of two vectors equal to Pi/6

ColorFunction in ListContourPlot3D raising error when using more than one argument

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=241851

The documentation of ColorFunction states that in ListContourPlot3D your chosen function gets the arguments ...

asked by Fidel I. Schaposnik https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=45839 1 vote

Autocomplete file argument for custom function

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=241842

When typing Importin a notebook Mathematica suggests to autocomplete the file path you want to enter or choose a file using the GUI. Is there a way to let a ...

asked by Gert https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27889 1 vote

Reduce the time to find six integer numbers so that the angle of two vectors equal to Pi/6

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=241633

I am trying to find six integer numbers a, b, c, x, y, z so that the angle of two vector {a, b, c ...

asked by minhthien_2016 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5320 1 vote

answered by Daniel Huber https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46318 0 votes

1.10 Thursday, March 11, 2021

1.10.1 Top new questions this week
1.10.2 Greatest hits from previous weeks
1.10.3 Can you answer these questions?

1.10.1 Top new questions this week

Metropolis-Hastings Algorithm - Significantly slower than Python
Manipulate for playing along with "Deal or No Deal?"
BoxWhiskerChart - how to show Quartile and other values
Strictly Increasing Sequences of Length n in a List
Wafer Chucking Model
Art on Mathematica: How can I export 4K resolution png images?
Skewed grid in plot

Metropolis-Hastings Algorithm - Significantly slower than Python

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=241402

I would like to code a Metropolis Hasting algorithm and thought I would get the general scheme of things going with a toy example.

I think I got it running but my Mathematica code runs significantly ...

asked by Smerdjakov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=55615 13 votes

answered by Henrik Schumacher https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=38178 22 votes

Manipulate for playing along with "Deal or No Deal?"

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=241234

I started building this Manipulate and am certain I can do so on my own, but thought it was fun enough that others might want to try. (If this is some abuse of the ...

asked by David G. Stork https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9735 9 votes

BoxWhiskerChart - how to show Quartile and other values

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=241231

I have a question in respect of the BoxWhiskerChart. The default functionality of BoxWhiskerChart is that you mouse over it and ...

asked by Jiri https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=77351 9 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 9 votes

Strictly Increasing Sequences of Length n in a List

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=241087

I need to determine how many strictly increasing sequences of a certain length (e.g. 5) are contained in a list of integers. I would be very happy if someone could help me. A sequence would be ...

asked by hnh https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=77559 9 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 9 votes

Wafer Chucking Model

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=241086

I am trying to calculate the pressure required to flatten a bowed wafer. The simple model I am using for the study has a bottom layer (the bowed wafer) pushed against a harder flat surface as shown in ...

asked by martin https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=77626 8 votes

answered by user21 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=18437 2 votes

Art on Mathematica: How can I export 4K resolution png images?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=241503

This question is solely based upon \([1]\) and therefore, the reading of \([1]\) could be interesting. How can I export the image created, by the code in the following, with high definition, beautiful, 4K ...

asked by M.N.Raia https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=71570 8 votes

answered by thorimur https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=63584 10 votes

Skewed grid in plot

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=241405

Is is possible to add a skewed grid in a plot? Consider the following image;

The grey axes are the normal axes (\(\mathbf {e}_1\) and \(\mathbf {e}_2\)), the black axes are transformations \(\mathbf {e}'_1=2\)

asked by mf67 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=55498 8 votes

answered by Daniel Huber https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46318 8 votes

1.10.2 Greatest hits from previous weeks

Mathematica vs. Python - how does Mathematica compare to Python’s scientific computing suite?
Exporting graphics to PDF - huge file
How do I plot a plane EM wave?
How to create animated snowfall?
Image processing: Floor plan - detecting rooms’ borders (area) and room names’ texts
Calculate the 2D Fourier transform of an Image
What are the most common pitfalls awaiting new users?

Mathematica vs. Python - how does Mathematica compare to Python’s scientific computing suite?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=86058

Python’s family of packages for scientific computing has matured rapidly. I can pretty much replicate all of Mathematica’s functionalities, but with production level and open-source code using the ...

asked by M.R. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=403 49 votes

answered by Jens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=245 36 votes

Exporting graphics to PDF - huge file

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=1542

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

asked by Matthew Leingang https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=395 109 votes

answered by Heike https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46 88 votes

How do I plot a plane EM wave?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=1987

I would like to display an electromagnetic (EM) wave. I have written code that works, but it does not "shade" the area between the graph and the axes. Both the ...

asked by Rainforest Frog https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=202 22 votes

answered by J. M.’s ennui https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=50 16 votes

How to create animated snowfall?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=16881

Well, the title is self-explanatory. What sorts of snowfall can we generate using Mathematica? There are two options I suggest to consider:

1) Continuous GIF animations with smallest possible number ...

asked by faleichik https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=219 40 votes

answered by Simon Woods https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=862 54 votes

Image processing: Floor plan - detecting rooms’ borders (area) and room names’ texts

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=19546

Here is a simple building floor plan. I would like to derive the rooms as (rectangular) components and the names of the rooms. This is very common representation of building floor plans.

The problem

asked by s.s.o https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=840 64 votes

answered by Niki Estner https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=242 59 votes

Calculate the 2D Fourier transform of an Image

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=29203

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

asked by user8727 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=8727 17 votes

answered by Nasser https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=70 33 votes

What are the most common pitfalls awaiting new users?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=18393

As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...

asked by Dr. belisarius https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=193 482 votes

answered by Michael E2 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4999 288 votes

1.10.3 Can you answer these questions?

Front-end rendering issues on Linux
time series - minimum differencing order needed to remove the trend
How does ‘TextureCoordinateFunction[]‘ works within ‘SurfaceAppearance[]‘?

Front-end rendering issues on Linux

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=241216

I’m using Mathematica 12.2 on Ubuntu Mate 20.10 on an AMD FX(tm)-8120 with a GeForce GTX 1070 Ti NVIDA card. The issue is that I get unwanted horizontal lines just below the cell that I’m working on ...

asked by c186282 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4515 1 vote

time series - minimum differencing order needed to remove the trend

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=241097

I was wondering how can I find What is the minimum differencing order needed to remove the trend in a time series? I have a a times series and a TimeSeriesModelFit, which is SARIMA model. I want to ...

asked by Pjana https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=75643 1 vote

How does ‘TextureCoordinateFunction[]‘ works within ‘SurfaceAppearance[]‘?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=241245

Following up from @kglr's answer here, I’d like to understand how TextureCoordinateFunction[] works within SurfaceAppearance[]. ...

asked by martin https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9923 1 vote

1.11 Thursday, February 25, 2021

1.11.1 Top new questions this week
1.11.2 Greatest hits from previous weeks
1.11.3 Can you answer these questions?

1.11.1 Top new questions this week

Mathematica 12.1: Don’t use Accumulate or Differences on Around objects!
How to enter a repeating decimal in Mathematica
How to judge whether two groups of sequences are equal in cycles?
Simplify 1+Sqrt[2]I-Complex[1,Sqrt[2]]
How to correctly calculate the number of seating plans for the 4-couples problem?
How to approximate \(PV\int _0^\infty \frac {\tan x}{x}\text {d}x?\)
Mirror image of graph

Mathematica 12.1: Don’t use Accumulate or Differences on Around objects!

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=240449

SUMMARY: If a List,TimeSeries etc. of Around objects contains any identical elements,

asked by Aaron Eiben https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72186 14 votes

answered by Sjoerd Smit https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=43522 11 votes

How to enter a repeating decimal in Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=240596

I don’t understand how to manipulate numbers with repeating decimal in Wolfram Mathematica language. For example 0.3... does not work as input and I don’t see how ...

asked by Simpleton Jack https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=22399 9 votes answered by J. M.’s ennui https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=50 11 votes

How to judge whether two groups of sequences are equal in cycles?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=240325

There’s a set of arrays that I want to remove repeated elements that are equal after rotation:

asked by A little mouse on the pampas https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42417 9 votes

answered by Carl Woll https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=45431 11 votes

Simplify 1+Sqrt[2]I-Complex[1,Sqrt[2]]

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=240522

The expression 1+Sqrt[2]I-Complex[1,Sqrt[2]] should be zero. In fact, N[1+Sqrt[2]I-Complex[1,Sqrt[2]]] yields ...

asked by pdmclean https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9154 7 votes answered by Michael E2 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4999 10 votes

How to correctly calculate the number of seating plans for the 4-couples problem?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=240357

Four couples a are sitting around a round table, in which husband and wife can not be adjacent. How many different seating plans are there? I want to get as many simple calculations as possible.

asked by A little mouse on the pampas https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42417 7 votes

answered by Beny Izd https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=77079 8 votes

How to approximate \(PV\int _0^\infty \frac {\tan x}{x}\text {d}x?\)

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=240461

What’s the mathematica command to get the numerical value of : \[PV\int _0^\infty \frac {\tan x}{x}\text {d}x?\] where \(PV\) is the principal value.

asked by Ali Shadhar https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=67714 7 votes

answered by Michael E2 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4999 7 votes

Mirror image of graph

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=240571

I need to display a directed acyclic graph (say Hasse diagram of partial order) oriented with minimal elements at the bottom, maximal elements at the top as is conventional for Hasse diagrams. I tried ...

asked by Mike https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=62210 6 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 7 votes

1.11.2 Greatest hits from previous weeks

LaTeX and Mathematica
What’s the most difficult multidimensional integral that Mathematica has solved?
xkcd-style Plots
Finding Limits in several variables
How to use Mathematica functions in Python programs?
Plot data from txt file?
How to find integer solutions?

LaTeX and Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=736

I quite often would like to draw graphics in my LaTeXdocuments using Mathematica. I have encountered three problems. I would like to know if there are any workarounds to these problems

I would ...

asked by Thomas Rot https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=227 127 votes

answered by Simon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34 46 votes

What’s the most difficult multidimensional integral that Mathematica has solved?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222184

I am interested in benchmarking numerical integration methods and am trying to develop a wider set of difficult multivariate examples. For my particular methods, I only want to look at non-negative-...

asked by ben18785 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=19278 6 votes

xkcd-style Plots

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=11350

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

asked by Amatya https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2039 620 votes

answered by Simon Woods https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=862 481 votes

Finding Limits in several variables

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=21544

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

\[\lim _{(x,y)\to (0,0)} f(x,y)\] with Mathematica?

When \(f\) is continuous, we can use \[\lim _{(x,y)\to (0,0)} f(x,y)=\]

asked by Dominic Michaelis https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5899 31 votes

answered by whuber https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=91 42 votes

How to use Mathematica functions in Python programs?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=4643

I’d like to know how can I call Mathematica functions from Python.

I appreciate a example, for example, using the Mathematica function Prime.

I had search about MathLink but how to use it in Python ...

asked by GarouDan https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1058 69 votes

answered by GarouDan https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1058 28 votes

Plot data from txt file?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=5910

I have data in file.txt which can be expressed by 20000x11 matrix. I do not want to import all of these data. How can I plot graph of the column 1 & column 4?

asked by Gokce https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1297 21 votes

answered by user1066 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=106 24 votes

How to find integer solutions?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=42359

Following is the equation: Need to solve for integer values of x,y when a,b lies between -1000 and 1000. Problem is to find the number of integer values of pair (x,y) that satisfy it.

asked by Sahil Sareen https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12396 2 votes

answered by bill s https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1783 4 votes

1.11.3 Can you answer these questions?

Idiomatic pattern for subtracting a function from a list
How can I simplify a symbolic tensor expression?
Nothing showing up on my LogLogPlots

Idiomatic pattern for subtracting a function from a list

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=240468

I would like to know a more idiomatic way to subtract a function from a list of pairs than this: Table[point-{0,fitFunction[point[[1]]]}, {point,data}]

I use this ...

asked by Diffycue https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46327 1 vote

How can I simplify a symbolic tensor expression?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=240422

My question is about simplifying tensor expressions. If I have \((a+b)\otimes (c+d)\) The function TensorExpand gives \(a\otimes c + a\otimes d + b\otimes c + b\otimes \) ...

asked by Physor https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74507 2 votes

Nothing showing up on my LogLogPlots

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=240457

I am trying to make 2 log log plots. One with each equation, a and g. I don’t know why, but the plot is not showing up. My notebook is in the link below. https://imgur.com/a/sXQX0YS

What am I doing ...

asked by QuaffyWaffles https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=77475 1 vote

answered by Bob Hanlon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9362 0 votes

1.12 Thursday, February 18, 2021

1.12.1 Top new questions this week
1.12.2 Greatest hits from previous weeks
1.12.3 Can you answer these questions?

1.12.1 Top new questions this week

How to create a spiral using Golden Triangles
How to modify default options of Dataset
How to use Filling in PolarPlot?
How to reduce timing to find the integer numbers a, b, c, d, e, f, g, h, k, m of this equation?
How to extract a column (or a row) of a matrix as another column vector/ column matrix (or a row vector), not as a list?
Intuitive explanation of RemoteBatchSubmit[] in AWS for total novices?
Solving a 2D heat equation on a square with Dirichlet boundary conditions

How to create a spiral using Golden Triangles

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=239914

Working with students in a pre-calculus class, an application of the sine law. They are working on a question that has them create a Golden Triangle (A golden triangle is an isosceles triangle in ...

asked by Tom De Vries https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=721 14 votes

answered by J. M.’s ennui https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=50 14 votes

How to modify default options of Dataset

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=239960

I try to make a dark stylesheet based on the ReverseColor theme. However, dataset headers are barely readable.

This question is related to others such as Question ...

asked by Vly https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=47700 9 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 8 votes

How to use Filling in PolarPlot?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=239946

For example: PolarPlot[{1, 1 + 1/10 Sin[10 t]}, {t, 0, 2 Pi}]

how to fill color in the space between 2 functions?

asked by DORA https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74396 8 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 11 votes

How to reduce timing to find the integer numbers a, b, c, d, e, f, g, h, k, m of this equation?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=239874

I use by hand to get this result \[\sqrt {48+5 \sqrt {3}+\sqrt {27+4\sqrt {3}+\sqrt {12+3 \sqrt {3}+\sqrt {4+2\sqrt {3}}}}}=1+4 \sqrt {3}\]

asked by minhthien_2016 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5320 7 votes

answered by yarchik https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9469 6 votes

How to extract a column (or a row) of a matrix as another column vector/ column matrix (or a row vector), not as a list?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=240123

Suppose I have a matrix ’mat’ as

mat = Table[Subscript[m, i, j], {i, 5}, {j, 5}]; 
mat // MatrixForm

I want to extract the first column (or any row) as

asked by PoreyS https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=54258 6 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 6 votes

Intuitive explanation of RemoteBatchSubmit[] in AWS for total novices?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=240149

When I read Wolfram’s post about the new features in MMA 12.2 I was intrigued by RemoteBatchSubmit[]. He wrote:

I have only ever used MMA from my laptop, and never used any other cloud computing or ...

asked by TumbiSapichu https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=53229 6 votes

Solving a 2D heat equation on a square with Dirichlet boundary conditions

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=240090

I am trying to solve the following heat equation problem on the square [0,1]x[0,1]. 
\begin{equation*}  \begin{gathered}  u_t = u_{xx} + u_{yy} + f(x,y,t), \qquad  u(x,y,0) = 0, \qquad  u=0 \text{ on ...

asked by kroner https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=77278 6 votes

answered by Nasser https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=70 7 votes

1.12.2 Greatest hits from previous weeks

Crack CAPTCHA using deep learning
How to make an inkblot?
Generate a Unit Circle Trigonometry
Exporting graphics to PDF - huge file
How to make the digits of go around in a spiral like this?
How to create a new "person curve"?
How do I plot a plane EM wave?

Crack CAPTCHA using deep learning

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=143691

Deep convolutional neural networks are very good at computer vision related tasks. Optical Character Recognition (OCR) is one important branch of computer vision. In fact, the convolution neural ...

asked by xslittlegrass https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1364 88 votes

answered by xslittlegrass https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1364 98 votes

How to make an inkblot?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3345

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):

asked by István Zachar https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=89 86 votes

answered by Sjoerd C. de Vries https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=57 51 votes

Generate a Unit Circle Trigonometry

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=2456

Struggling often with Trigonometry I would like to have some code to generate this Unit Circle Trigonometry. Would be of great help when I need to transform some data :

asked by 500 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=172 18 votes

answered by Mark McClure https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36 32 votes

Exporting graphics to PDF - huge file

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=1542

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

asked by Matthew Leingang https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=395 109 votes

answered by Heike https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46 88 votes

How to make the digits of go around in a spiral like this?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=109982

Here is a start.

MapIndexed[Text[Reverse[First[RealDigits[Pi,10,252]]][[Tr@#2]],#]&, 
 Table[{t Cos[t],t Sin[t]},{t,0,16Pi,0.2}]]//Graphics

asked by matrix89 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5379 57 votes

answered by Martin Ender https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2305 73 votes

How to create a new "person curve"?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=17704

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

asked by Simon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34 85 votes

answered by Vitaliy Kaurov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=13 45 votes

How do I plot a plane EM wave?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=1987

I would like to display an electromagnetic (EM) wave. I have written code that works, but it does not "shade" the area between the graph and the axes. Both the ...

asked by Rainforest Frog https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=202 22 votes

answered by J. M.’s ennui https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=50 16 votes

1.12.3 Can you answer these questions?

Unpacking list of arguments into parameters
Can one preset credentials for ServiceConnect["Twitter", "New"] to allow wolframscript headless use?
Warnings while solving a system of coupled differential equations

Unpacking list of arguments into parameters

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=240016

I have a list in the following form:  list = {{a,1,3},{b,1,3},{c,1,3}}

Now I want to apply this list as parameters for the Sum function so that I end up with the ...

asked by Hell stormer https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=77333 1 vote

Can one preset credentials for ServiceConnect["Twitter", "New"] to allow wolframscript headless use?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=240056

Trying to run some wolframscript code from a server, is it possible to set ServiceConnect credentials in the environmental variables for example?

asked by Tim https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=416 3 votes

Warnings while solving a system of coupled differential equations

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=239861

I have a system of differential equations, given by

asked by No name https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=69573 1 vote

1.13 Thursday, February 11, 2021

1.13.1 Top new questions this week
1.13.2 Greatest hits from previous weeks
1.13.3 Can you answer these questions?

1.13.1 Top new questions this week

Mathematica cannot seem to properly handle times in the 1 hour before clocks go back
Dataset Association of Association vs Hierarchical data
Plot many curves on the same graph
Is there any other way to access the n-th element of a BlankSequence?
Periodic von Neumann neighbours
Equivalent of numpy’s newaxis
Plot[Im[f[x]],...] incorrectly gives graph of identical zero function

Mathematica cannot seem to properly handle times in the 1 hour before clocks go back

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=239480

Using Chicago as an example; According to the current rules for applying daylight saving time, at 02:00:00 on the first Sunday of November, clocks in Chicago go back 1 hour (from Central Daylight Time ...

asked by RobertNathaniel https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=60404 24 votes

answered by Patrick Stevens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=30771 22 votes

Dataset Association of Association vs Hierarchical data

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=239455

I have the following dataset:

asked by Whelp https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1287 10 votes

answered by WReach https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=142 13 votes

Plot many curves on the same graph

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=239609

This plot has 40 curves on the same graph which makes it hard to see. I need to plot them on one graph. So I have an idea to plot to make it easier to see which one is larger or smaller in each range....

asked by anhnha https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=18805 9 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 21 votes

Is there any other way to access the n-th element of a BlankSequence?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=239659

Consider a named BlankSequence x__. How can I access the n-th element? 
Is {x}[[n]] the only ...

asked by Money Oriented Programmer https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42141 8 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 10 votes

Periodic von Neumann neighbours

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=239512

From Carl Woll’s answer here, I have this code for pulling the von Neumann neighbors:

asked by TubularHell https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=76599 8 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 6 votes

Equivalent of numpy’s newaxis

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=239518

Numpy has a newaxis object that allows you to insert a new dimension of length 1 into an array. So after ...

asked by Dan Piponi https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=13642 8 votes

answered by swish https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2490 8 votes

Plot[Im[f[x]],...] incorrectly gives graph of identical zero function

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=239728

Consider

Plot[Im[(1 + (-1)^(2/3)*x)/((-1)^(2/3) + x)], {x, 0, 1}]

At least in Mma 11 it gives the following picture: Meanwhile,

asked by Roma Lee https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=57495 7 votes

1.13.2 Greatest hits from previous weeks

How to create animated snowfall?
Calling Correct Function for Plotting DiracDelta
How to manipulate 2D plots?
Using Export[] sends the file where?
How can I reproduce this mandala with Mathematica?
Mathematica Minecraft
Plotting the frequency spectrum of a data series using Fourier

How to create animated snowfall?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=16881

Well, the title is self-explanatory. What sorts of snowfall can we generate using Mathematica? There are two options I suggest to consider:

1) Continuous GIF animations with smallest possible number ...

asked by faleichik https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=219 40 votes

answered by Simon Woods https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=862 54 votes

Calling Correct Function for Plotting DiracDelta

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3506

I am wondering what is the correct function in Mathematica to plot the true impulse function, better known as the DiracDelta[] function. When using this inside of a ...

asked by night owl https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=116 17 votes

answered by Heike https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46 19 votes

How to manipulate 2D plots?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=7142

When it comes to visual analysis, large datasets or data with intricate internal details often makes plotting in 2D useless, as the outcome is either just a fraction of the full dataset, or no details ...

asked by István Zachar https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=89 137 votes

answered by IstvánZacharhttps://mathematica.stackexchange.com/landing/r/digest?cta=user&id=89 155 votes

Using Export[] sends the file where?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=8586

I am trying to use the Export command to convert a list of plots into a *.gif file, and the command runs and executes well, but I can’t find the file! Where is it ...

asked by Patrick Da Silva https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1785 37 votes

answered by Vitaliy Kaurov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=13 51 votes

How can I reproduce this mandala with Mathematica?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=233050

I found this image on the Internet and it is very beautiful. How can I reproduce it? The ideal would be to be able to control the colors of the outside as well as the center.

asked by Susana https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=37778 14 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 35 votes

Mathematica Minecraft

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=19669

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

asked by faleichik https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=219 167 votes

answered by faleichikhttps://mathematica.stackexchange.com/landing/r/digest?cta=user&id=219 241 votes

Plotting the frequency spectrum of a data series using Fourier

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=18082

testData = Table[N@Sin[500 x], {x, 0, 100}]; 
ListLinePlot[Abs[Fourier[testData]], PlotRange -> Full]

Gives me Which I do not expect because the Fourier ...

asked by C. E. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=731 14 votes

answered by KennyColnago https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=3246 16 votes

1.13.3 Can you answer these questions?

Fourier transform in polar coordinates using built-in hankel transform of the function constant 1
Exponent combinations
Plot derivative of a real function consisting of a complex function

Fourier transform in polar coordinates using built-in hankel transform of the function constant 1

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=239754

Like in the table of transforms https://en.wikipedia.org/wiki/Fourier_transform#Distributions,_one-dimensional the FT (Fourier transform) of \(\delta \) is 1 and the FT of 1 is \(\delta \), but in polar ...

asked by user740332 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=76926 1 vote

Exponent combinations

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=239664

How can I have Mathematica represent the product of two different bases and exponents as a single power (where possible)? For example, see the product below can be expressed below:

asked by Steve237 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=69429 1 vote

Plot derivative of a real function consisting of a complex function

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=239796

I obtained the data for the real and imaginary parts of a complex function \(A(x,t)=A_r(x,t)+i A_i(x,t)\) from NDSolve, both are functions of time \(t\) and space \(x\). ...

asked by Enter https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=19178 1 vote

1.14 Thursday, February 4, 2021

1.14.1 Top new questions this week
1.14.2 Greatest hits from previous weeks
1.14.3 Can you answer these questions?

1.14.1 Top new questions this week

Confirm vs Throw
How to use wolframscript to develop flexible command-line tools?
Automatic Method for FindMinimum with constraints
How to refine a boundary mesh with MeshRefinementFunction?w
Ugly streaks caused by Arg in a contour plot
Trying to Rotate the North Pole View of a Globe
problem with DelaunayMesh 3D coordinates

Confirm vs Throw

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=239250

Version 12.2 brought us Confirm and Enclose. What’s the point? Is it just that it’s a slightly more convenient syntax than ...

asked by Patrick Stevens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=30771 13 votes

How to use wolframscript to develop flexible command-line tools?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=239072

I am currently changing a notebook into a wolframscript for a "production" environment, where I plan to pack the script as a standard CLI tool. However I do not know how to implement such an ...

asked by Gravifer https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72025 10 votes

Automatic Method for FindMinimum with constraints

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=238999

What is the default method used by FindMinimum with constraints? The documentation says:

"Currently, the only method available for constrained optimization is ...

asked by VarunM https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=69094 9 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 8 votes

How to refine a boundary mesh with MeshRefinementFunction?w

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=239220

MeshRefinementFunction works well to refine elements in a defined spatial domain (here \(x>0\)):

asked by Oscillon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=13605 8 votes

answered by Tim Laska https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=61809 8 votes

Ugly streaks caused by Arg in a contour plot

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=239255

I had a more general question about a similar problem more than two years ago, Getting rid of discontinuities in plots caused by square roots, logarithms, ‘Arg‘, etc, which got lots of interesting ...

asked by https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=35000 8 votes

answered by Michael E2 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4999 11 votes

Trying to Rotate the North Pole View of a Globe

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=239294

My goal is to generate diagrams like this.

But I would like to be able to rotate the globe about the North Pole, so that I can represent different times of the day. When I use ImageRotate, the ...

asked by David Elm https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=44449 7 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 11 votes

problem with DelaunayMesh 3D coordinates

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=239303

I found DelaunayMesh works fine for 2D. For example,

asked by matheorem https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4742 7 votes

answered by user21 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=18437 7 votes

1.14.2 Greatest hits from previous weeks

Conversion of Sine to Cosine
Extract real part of a complex expression better than Re does
Assign the results from a Solve to variable(s)
Why round to even integers?
Using Export[] sends the file where?
Formatting legend text font
What do the X and Y axis stand for in the Fourier transform domain?

Conversion of Sine to Cosine

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=67521

I’m solving equations with many Cosines and Sines. And I want to convert all the Sines to Cosines using trigonometric formulas such as cos(x)=sin(x+pi/2). How can I do this?

asked by YongCheol Kwon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=23041 4 votes

answered by Sjoerd C. de Vries https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=57 2 votes

Extract real part of a complex expression better than Re does

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3306

I have a complex expression with real positive variables only.

Mathematica Input Style:

asked by max https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=796 34 votes

answered by nixeagle https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=814 53 votes

Assign the results from a Solve to variable(s)

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=6669

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?

asked by stevenvh https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1450 56 votes

answered by Artes https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=184 34 votes

Why round to even integers?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=2116

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

asked by wxffles https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=427 83 votes

answered by Per Alexandersson https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=488 51 votes

Using Export[] sends the file where?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=8586

I am trying to use the Export command to convert a list of plots into a *.gif file, and the command runs and executes well, but I can’t find the file! Where is it ...

asked by Patrick Da Silva https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1785 37 votes

answered by Vitaliy Kaurov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=13 51 votes

Formatting legend text font

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3433

I am using this code to plot a graph, and I am trying to make the font of the legend bigger.

asked by Julia https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=525 20 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 25 votes

What do the X and Y axis stand for in the Fourier transform domain?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=85139

In Wolfram Mathematica the function Fourier has the following declaration

Fourier[list]

And after a list is given to the ...

asked by user253956 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=29958 27 votes

answered by Hugh https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12558 61 votes

1.14.3 Can you answer these questions?

RegionPlot of the Maximum of a function
How to let Mathematica evaluate a large amount of data
Directed Infinity vs Indeterminant in this output

RegionPlot of the Maximum of a function

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=239047

For the function fun[a_, b_, x_, y_] = Sin[a x] Cos[b y] (a x + b y); corresponding to \(x\) and \(y\), I need a RegionPlot showing the maximum of function \(fun[a, b, x]\)

asked by Mike https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=76947 1 vote

answered by Bob Hanlon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9362 0 votes

How to let Mathematica evaluate a large amount of data

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=239107

I have the following code in mathematica which runs perfectly for a small matrix of 21 x 12 matrix. But I really want to test it for a large system. My data is 35844 x 21000 elements, totaling 1.5 GB. ...

asked by shixx597_Min https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=59772 1 vote

Directed Infinity vs Indeterminant in this output

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=239335

When I evaluate

asked by user824530 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=75136 1 vote

1.15 Thursday, January 28, 2021

1.15.1 Top new questions this week
1.15.2 Greatest hits from previous weeks
1.15.3 Can you answer these questions?

1.15.1 Top new questions this week

What’s the difference between these 2 associations?
How can I handle graphics or artworks with millions of points?
ContourPlot3D, grid of cylinders
Distorting image to ensure consistent vanishing point
Export infinite looping GIFs by default
Replace a color in image with hatchfilling
MeshRefinementFunction on 2D surfaces embedded in 3D

What’s the difference between these 2 associations?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=238880

I have 2 associations similar to these simplified ones:

asked by Coolwater https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9754 16 votes

answered by Leonid Shifrin https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=81 16 votes

How can I handle graphics or artworks with millions of points?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=238735

As a hobby, I am trying to use Mathematica and Wolfram Language as a tool for making generative artworks. Generative art techniques may require drawing millions of points, lines, or curves. For ...

asked by mikabozu https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74721 15 votes

answered by George Varnavides https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=41179 21 votes

ContourPlot3D, grid of cylinders

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=238849

I am trying to make a 3D contour plot that looks like a grid of cylinders to represent the Fermi surface of a metal, like below:

I have no problem generating something that kind of looks like it.

asked by Nick https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=76998 10 votes

answered by cvgmt https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72111 13 votes

Distorting image to ensure consistent vanishing point

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=238742

Here’s Giorgio de Chirico’s painting, Ariadne:

The Surrealist artist deliberately broke the rules of geometric perspective, giving the work his characteristic sense of mystery and unease. What would ...

asked by David G. Stork https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9735 10 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 2 votes

Export infinite looping GIFs by default

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=238591

frames=Table[Plot[Sin[x(1+a x)],{x,0,6}],{a,0,2,0.2}]; 
Export["test.gif",frames]

The above code runs in version 9.0 to get a infinite looping GIF ...

asked by expression https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7339 10 votes

answered by Kuba https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5478 7 votes

Replace a color in image with hatchfilling

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=238687

Is it possible to identify a color (say grey in a 3 color Black, Gray and White image) and ...

asked by skyfire https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=70181 9 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 10 votes

MeshRefinementFunction on 2D surfaces embedded in 3D

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=238705

DiscretizeRegion doesn’t seem to run the supplied MeshRefinementFunction when meshing a 2D surface in 3D. For example:

asked by alessandro https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42454 7 votes

answered by Tim Laska https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=61809 3 votes

1.15.2 Greatest hits from previous weeks

How do I identify the source of a "Tag times protected" error?
Labeling individual curves in Mathematica
How to add a vertical line to a plot
Drawing a square root spiral
Multivariable Taylor expansion does not work as expected
Solving \(L=\frac {3}{2} \sqrt {4 \pi ^2 A^2+W^2}-\frac {\sqrt {5 W \sqrt {4 \pi ^2 A^2+W^2}+6 \pi ^2 A^2+3 W^2}}{\sqrt {2}}+\frac {3 W}{2}\) for \(W\)
Mathematica command that allows it to read my intentions

How do I identify the source of a "Tag times protected" error?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=11982

I have some code that looks like

Table[ 
    a = 1; 
    b = {2, 3} 
    c = i;, 
    {i, 2} 
] 
 
which gives an error: 
  Set::write: Tag Times in c {2,3} is Protected....

asked by dearN https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=204 29 votes

answered by Mr.Wizard https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=121 35 votes

Labeling individual curves in Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=4444

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,...

asked by Tianxiang Xiong https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1041 63 votes

answered by Artes https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=184 47 votes

How to add a vertical line to a plot

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3561

In the plot below I would like to add two vertical lines at \(x = \frac {\pi }{15} \pm \frac {1}{20}\). How can I do that?

asked by sjdh https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=515 61 votes

answered by Ajasja https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=745 82 votes

Drawing a square root spiral

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=66969

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

asked by matrix89 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5379 24 votes

answered by Bob Hanlon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9362 21 votes

Multivariable Taylor expansion does not work as expected

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=15023

The basic multivariable Taylor expansion formula around a point is as follows:

asked by matheorem https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4742 63 votes

answered by Jens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=245 71 votes

Solving \(L=\frac {3}{2} \sqrt {4 \pi ^2 A^2+W^2}-\frac {\sqrt {5 W \sqrt {4 \pi ^2 A^2+W^2}+6 \pi ^2 A^2+3 W^2}}{\sqrt {2}}+\frac {3 W}{2}\) for \(W\)

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=57763

When I solve the aforementioned equation for \(W\) or \(A\) on Mathematica I get a long and ugly equation in return, namely one of the solutions for \(W\) is: (attempt to read at your own health)

asked by J.D’Almbert https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=19257 8 votes

answered by Alexei Boulbitch https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=788 15 votes

Mathematica command that allows it to read my intentions

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=194384

In version 2.0 of Mathematica there was a command, ReadProgrammerIntentions[ ] which allowed it rapidly compose code that could solve problems simple to complex, ...

asked by MikeY https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=47314 52 votes

answered by MarcoB https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27951 38 votes

1.15.3 Can you answer these questions?

How to improve this code?
Error on DSolve
Remove defect of display in ListDensityPlot3D

How to improve this code?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=238887

The aim of my work is to find a value for the complex constant \(\omega \). In order to do that I solve the below system of differential equations with a manual shooting method: I first solve the system ...

asked by mattiav27 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=8822 3 votes

Error on DSolve

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=238596

I’ve been trying to solve this initial value problem using DSolve[]: \[ \frac {dy}{dt}=1+t\space \sin (t\space y),\quad y(0)=0, \quad t=[0,2] \]

asked by Walser https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=60465 1 vote

answered by Mariusz Iwaniuk https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=26828 0 votes

Remove defect of display in ListDensityPlot3D

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=238719

I have a 3D volumetric data (for example, \(64\times 64\times 64\), at each point there is a value) read in from a file and I want to use ListDensityPlot3D to ...

asked by Dennis https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=69969 1 vote

1.16 Thursday, January 21, 2021

1.16.1 Top new questions this week
1.16.2 Greatest hits from previous weeks
1.16.3 Can you answer these questions?

1.16.1 Top new questions this week

How can I use Mathematica to solve a complex truth-teller/liar logic problem?
list-array construction
why do these two Meijer G functions not cancel each other?
How to partition a square into successive halves
Ignoring fractions can lead to correct answer
Context Manipulation within Scoping Constructs
Why does NMinimize not follow MaxIterations?

How can I use Mathematica to solve a complex truth-teller/liar logic problem?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=238461

I have a logic puzzle I want to convert to Mathematica to solve: Person A states, "Exactly two people are truth-tellers," Person B states, "I and Person C are truth-tellers."

asked by Peter Burbery https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=76873 16 votes

answered by SneezeFor16Min https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=69875 19 votes

list-array construction

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=238293

I want to create the list ix={1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4} I can do

asked by geom https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=68502 11 votes

answered by Simon Woods https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=862 20 votes

why do these two Meijer G functions not cancel each other?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=238321

I encountered such expressions in Mathematica MeijerG[{{ }, {1, c + 1/2}}, {{0, c, c, c}, { }}, 1] + MeijerG[{{1}, {c + 1/2}},    {{c, c, c},    {0}}, 1]

which in ...

asked by Jing https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=76801 8 votes

answered by Chromo Runge https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=68326 12 votes

How to partition a square into successive halves

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=238440

I am teaching the idea of infinite geometric series to high school students, looking for hints to create the diagram below using Mathematica. (I don’t need the labels). I can do it manually, but ...

asked by Tom De Vries https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=721 7 votes

answered by J. M.’s ennui https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=50 9 votes

Ignoring fractions can lead to correct answer

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=238501

There is a curious example in Posamentier’s book "Magnificent Mistakes in Mathematics" (p. 72): \((7+3/7)*(4-3/13)= 7*4=28\), where cancelling the fractions leads to correct result. If we ...

asked by Darko G https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=60625 7 votes

answered by Bob Hanlon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9362 9 votes

Context Manipulation within Scoping Constructs

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=238335

In the following the full context form of Test is not required as "Aaa`" is added to ...

asked by Ronald Monson https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2249 6 votes

answered by Ronald Monson https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2249 2 votes

Why does NMinimize not follow MaxIterations?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=238268

...

asked by Tomi https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36939 6 votes

answered by Anton Antonov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34008 4 votes

1.16.2 Greatest hits from previous weeks

Is it possible to export the equations from Mathematica to MATLAB?
How to ask Mathematica to imitate Andy Warhol’s pop-art painting?
How to plot an ellipse?
What’s the most difficult multidimensional integral that Mathematica has solved?
Even Fibonacci numbers
Find eigen energies of time-independent Schrödinger equation
Standard deck of 52 playing cards in curated data?

Is it possible to export the equations from Mathematica to MATLAB?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=14035

Is it possible to export the output expressions from Mathematica computations (e.g., equations) in valid MATLAB syntax?

asked by Seyhmus Güngören https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4256 43 votes

answered by rm -rf https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5 48 votes

How to ask Mathematica to imitate Andy Warhol’s pop-art painting?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=59132

I tried to ask Mathematica to imitate Andy Warhol, let it convert a Marilyn Monroe’s portrait so that it looks like Warhol’s world famous pop-art painting. However, the result shown below is far from ...

asked by Putterboy https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=16069 52 votes

answered by Dr. belisarius https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=193 67 votes

How to plot an ellipse?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=20100

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

asked by Sriram https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=6075 18 votes

answered by Jens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=245 30 votes

What’s the most difficult multidimensional integral that Mathematica has solved?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222184

I am interested in benchmarking numerical integration methods and am trying to develop a wider set of difficult multivariate examples. For my particular methods, I only want to look at non-negative-...

asked by ben18785 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=19278 6 votes

Even Fibonacci numbers

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=37266

Today, I found the Euler Project. Problem #2 is

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:

asked by xyz https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9627 34 votes

answered by rcollyer https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=52 46 votes

Find eigen energies of time-independent Schrödinger equation

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=32293

I’m trying to get the eigenvalues of a one dimensional time-independent Schrödinger equation,

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

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

asked by xslittlegrass https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1364 49 votes

answered by Jens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=245 46 votes

Standard deck of 52 playing cards in curated data?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=16108

I am not sure how to find out what all is included as curated data. For example, are the individual images of each of the 52 cards in a standard deck of playing cards included?

If not, is there a way ...

asked by JohnD https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1629 25 votes

answered by rm -rf https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5 23 votes

1.16.3 Can you answer these questions?

ListDensityPlot3D with x-axis in logscale
Trying to solve a PDE getting warnings I don’t understand
How can we improve transonic flow visualization?

ListDensityPlot3D with x-axis in logscale

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=238481

Starting from a data set like the one used in this post: Importing and visualizing 4D data DATA It can be viewed using ListDensityPlot3D, as follows:

asked by Ivan Y. Forero https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=76882 1 vote

Trying to solve a PDE getting warnings I don’t understand

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=238231

Consider the partial differential equation

asked by beginners https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=76785 2 votes

How can we improve transonic flow visualization?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=238500

With this code we can make 2D FEM simulation of transonic flow around airfoil NACA 0012 at Mach number of 0.925. It takes about 5 minutes on the XENIA-15 laptop of 32 GB memory with processor Intel ...

asked by Alex Trounev https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=58388 4 votes

1.17 Thursday, January 14, 2021

1.17.1 Top new questions this week
1.17.2 Greatest hits from previous weeks
1.17.3 Can you answer these questions?

1.17.1 Top new questions this week

Faster "Closest Pair of Points Problem" implementation?
Broken ValueQ function in Mma12.2?
Graphics not correctly produced when saving to PDF in Version 12
MoleculePlot draws sucrose benzoate with overlapping bonds
How to globally disable and re-enable Echo?
Compile - Optimization of function calls - does it matter?
neighbouring pixels : next smaller and bigger perimeter

Faster "Closest Pair of Points Problem" implementation?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=237884

The closest pair of points problem is a common computational geometry problem: given n points, find a pair of points with the smallest distance between them. A naive algorithm of finding distances ...

asked by Aaron T. Becker https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=76690 17 votes

answered by Carl Woll https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=45431 11 votes

Broken ValueQ function in Mma12.2?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=237871

f[x] ^= 1; 
ValueQ[g[x]]

returns True in Mathematica 12.2. Is it a bug?

asked by Roma Lee https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=57495 15 votes

answered by MarcoB https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27951 17 votes

Graphics not correctly produced when saving to PDF in Version 12

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=237994

12.0.0 for Microsoft Windows (64-bit) (April 6, 2019) How do I get my graphic to look the same in PDF as it does in a Notebook? This is what the graphic looks like in the FrontEnd:

This is how the ...

asked by Steven Thomas Hatton https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=44139 10 votes

answered by MelaGo https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=63360 13 votes

MoleculePlot draws sucrose benzoate with overlapping bonds

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=237903

Recently I learned that in Mathematica it is possible to create chemical structures here: Chemical formulas with Mathematica I am having a problem with a structure called "Sucrose benzoate"

asked by John https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72940 9 votes

answered by Jason B. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9490 9 votes

How to globally disable and re-enable Echo?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=238163

I have Echo’s buried in code all over my notebook, I’d like a flag to turn them all on or off globally.

Sure Unprotect[Echo];Echo=Identity would disable them, but ...

asked by M.R. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=403 6 votes

answered by Carl Woll https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=45431 9 votes

Compile - Optimization of function calls - does it matter?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=238018

I was surprised to see that, in the results of CompilePrint for a function made with Compile, calls to ...

asked by Sean https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=76328 6 votes

answered by Sean https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=76328 2 votes

neighbouring pixels : next smaller and bigger perimeter

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=237914

I have a list of pixels centers, for example :

asked by yfs https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=71775 6 votes

answered by C. E. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=731 7 votes

1.17.2 Greatest hits from previous weeks

How to make Jacobian automatically in Mathematica
Plotting Complex Quantity Functions
QR Code in shopping cart handle
How do I plot a plane EM wave?
Standard deck of 52 playing cards in curated data?
Why I get the "Set::write: "Tag Times in is Protected." error?
Mathematica vs. Python - how does Mathematica compare to Python’s scientific computing suite?

How to make Jacobian automatically in Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=5790

If we have two vectors, \(a\) and \(b\), 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( 
\begin{array}{...

asked by George Mills https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1012 39 votes

answered by Jens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=245 52 votes

Plotting Complex Quantity Functions

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3458

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

asked by night owl https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=116 42 votes

answered by Artes https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=184 29 votes

QR Code in shopping cart handle

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=26268

This week, the market people from my work wanted to put QR codes in shopping cart handles, but when they tested it, the QR code did not work. I noted that the cylindrical curvature (even small) ...

asked by Murta https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2266 196 votes

answered by halirutan https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=187 192 votes

How do I plot a plane EM wave?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=1987

I would like to display an electromagnetic (EM) wave. I have written code that works, but it does not "shade" the area between the graph and the axes. Both the ...

asked by Rainforest Frog https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=202 22 votes

answered by J. M.’s ennui https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=50 16 votes

Standard deck of 52 playing cards in curated data?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=16108

I am not sure how to find out what all is included as curated data. For example, are the individual images of each of the 52 cards in a standard deck of playing cards included?

If not, is there a way ...

asked by JohnD https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1629 25 votes

answered by rm -rf https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5 23 votes

Why I get the "Set::write: "Tag Times in is Protected." error?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=11868

Why I get the error below with this code:

asked by Aurelius https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1669 10 votes

answered by Mark McClure https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36 13 votes

Mathematica vs. Python - how does Mathematica compare to Python’s scientific computing suite?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=86058

Python’s family of packages for scientific computing has matured rapidly. I can pretty much replicate all of Mathematica’s functionalities, but with production level and open-source code using the ...

asked by M.R. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=403 49 votes

answered by Jens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=245 36 votes

1.17.3 Can you answer these questions?

NDSolve - interpolation or machine precision problem
Matrix regularization, how to pick \(\lambda \)
Memory consuming Expand

NDSolve - interpolation or machine precision problem

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=237920

For the following equations;

asked by confused https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74890 1 vote

Matrix regularization, how to pick \(\lambda \)

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=237834

Since v12 FindFit[] now supports regularisation, such as Tikhonov regularization. Do there exist statistics to help guide the choice of the hyper-parameter

asked by Tomi https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36939 2 votes

Memory consuming Expand

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=238106

Expand floods all my 64GB RAM in MMA 12.1 (Windows). Therefore I cannot run the code. Somebody with >64GB RAM could give the result. A memory saving alternative ...

asked by granular bastard https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=69288 1 vote

1.18 Thursday, January 7, 2021

1.18.1 Top new questions this week
1.18.2 Greatest hits from previous weeks:
1.18.3 Can you answer these questions?

1.18.1 Top new questions this week

Why MMA refuses to simplify the following simple expression?
Simplifying code that displays a square rolling inside a circle
Trying to build a code to translate handwritten formulas using ML
How to define a function reminding of names of the independent variables?
Improve running speed for DeleteDuplicates
Why does Mathematica try to take the first element of the empty list when plotting?
Why do the frame ticks disapear when a plot is exported as PNG?

Why MMA refuses to simplify the following simple expression?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=237547

I have the following simple expression Exp[(Log[1 + x]^2 - Log[x]^2)/Log[1 + 1/x]] - x^2

that can be shown to simplify to \(x\)

asked by user16320 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=16320 13 votes

answered by yarchik https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9469 5 votes

Simplifying code that displays a square rolling inside a circle

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=237692

The vertex A,B of the square ABCD with side length \(\sqrt {2}\) is on the circle with radius \(\sqrt {2}\), vertex C,D is inside the circle, roll the square ABCD along the inside of the circle ...

asked by expression https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7339 10 votes

answered by David G. Stork https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9735 0 votes

Trying to build a code to translate handwritten formulas using ML

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=237533

I’m lazy writing equations in Latex so I want a code to translate handwritten equations. This question is related to an old experiment I’m reviewing during vacations, here. I’m trying to use ...

asked by Gluoncito https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=8696 10 votes

How to define a function reminding of names of the independent variables?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=237458

I am using a function with a lot of variables. There are 9 and sometimes more of them. In this case, it is difficult to memorize, which one stays on the, say, fourth position, and which one - on the ...

asked by Alexei Boulbitch https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=788 8 votes

answered by CA Trevillian https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=63039 2 votes

Improve running speed for DeleteDuplicates

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=237681

How to make this faster? I want to remove elements that satisfy the condition below but it’s way too slow.

asked by anhnha https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=18805 8 votes

answered by WReach https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=142 10 votes

Why does Mathematica try to take the first element of the empty list when plotting?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=237785

I’m using Mathematica 12.1.1.0. When I enter

asked by Jason Gross https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12258 7 votes

answered by Bob Hanlon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9362 3 votes

Why do the frame ticks disapear when a plot is exported as PNG?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=237678

I am using M12.0.0.0 on Ubuntu and I have these two plots:

asked by valar morghulis https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=26937 6 votes

answered by Rolf Mertig https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=29 5 votes

1.18.2 Greatest hits from previous weeks:

What do the X and Y axis stand for in the Fourier transform domain?
How can I plot the direction field for a differential equation?
Is Mathematica worth it for me?
How to ask Mathematica to imitate Andy Warhol’s pop-art painting?
Figuring when the minute and hour hand coincide on a clock
Conversion of Sine to Cosine
Finding unit tangent, normal, and binormal vectors for a given r(t)

What do the X and Y axis stand for in the Fourier transform domain?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=85139

In Wolfram Mathematica the function Fourierhas the following declaration

Fourier[list]

And after a list is given to the ...

asked by user253956 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=29958 27 votes

answered by Hugh https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12558 61 votes

How can I plot the direction field for a differential equation?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=8841

I’d like to plot the graph of the direction field for a differential equation, to get a feel for it. I’m a novice, right now, when it comes to plotting in Mathematica, so I’m hoping that someone can ...

asked by Matt Groff https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1735 31 votes

answered by Peter Breitfeld https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=307 25 votes

Is Mathematica worth it for me?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=100072

I’m 13 years old and in 7th grade. I’m currently in Algebra 1, and I have fallen in love with both math and programming.

When I came upon Mathematica, it was awesome. My two favorite things fused ...

asked by Nico A https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=35769 81 votes

answered by Pillsy https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=531 55 votes

How to ask Mathematica to imitate Andy Warhol’s pop-art painting?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=59132

I tried to ask Mathematica to imitate Andy Warhol, let it convert a Marilyn Monroe’s portrait so that it looks like Warhol’s world famous pop-art painting. However, the result shown below is far from ...

asked by Putterboy https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=16069 52 votes

answered by Dr. belisarius https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=193 67 votes

Figuring when the minute and hour hand coincide on a clock

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=573

I would like to list all possible times in a 12-hour period, where the hour hand overlaps the minute hand completely. This is really a question about three distinct things - to be done in Mathematica ...

asked by Steve D https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=191 15 votes

answered by Verbeia https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=8 21 votes

Conversion of Sine to Cosine

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=67521

I’m solving equations with many Cosines and Sines. And I want to convert all the Sines to Cosines using trigonometric formulas such as cos(x)=sin(x+pi/2). How can I do this?

asked by YongCheol Kwon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=23041 4 votes

answered by Sjoerd C. de Vries https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=57 2 votes

Finding unit tangent, normal, and binormal vectors for a given r(t)

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=18598

For my Calc III class, I need to find \(T(t), N(t)\), and \(B(t)\) for \(t=1, 2\), and \(-1\), given \(r(t)=\{t,t^2,t^3\}\).

I’ve got Mathematica, but I’ve never used it before and I’m not sure how to coerce ...

asked by a98 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5605 30 votes

answered by Artes https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=184 44 votes

1.18.3 Can you answer these questions?

Numerically obtaining inverse 2D Laplace transform
How to determine population from a list of arbitrary jurisdictions (cities, states, counties, et al.)?
Computing correspondences between two images

Numerically obtaining inverse 2D Laplace transform

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=237480

I wonder if there is a function in Mathematica (or code) that can help obtaining inverse 2D Laplace transform of a function, f(s1,s2) which is the 2D Laplace transform of a function F(t1,t2) in (s1,s2)...

asked by Refaat Galal https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=76583 1 vote

How to determine population from a list of arbitrary jurisdictions (cities, states, counties, et al.)?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=237541

I am an aspiring data scientist who’s working on a passion project, namely to assign danger-level scores to police departments in the United States. One specific metric I’m developing results from ...

asked by uselesslemma https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72297 3 votes

answered by George Varnavides https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=41179 0 votes

Computing correspondences between two images

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=237484

A classic problem in computer vision is computing correspondences between keypoints in two similar images, despite modest variations in size, lightness, orientation, etc., of the images, as ...

asked by David G. Stork https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9735 6 votes

Chapter 2
Year 2020

2.1 Thursday, December 24, 2020
2.2 Thursday, December 17, 2020
2.3 Thursday, December 10, 2020
2.4 Thursday, December 3, 2020
2.5 Thursday, November 19, 2020
2.6 Thursday, November 12, 2020
2.7 Thursday, November 5, 2020
2.8 Thursday, October 29, 2020
2.9 Thursday, October 22, 2020
2.10 Thursday, October 15, 2020
2.11 Thursday, October 1, 2020
2.12 Thursday, September 24, 2020
2.13 Thursday, September 17, 2020
2.14 Thursday, September 10, 2020
2.15 Thursday, September 3, 2020
2.16 Thursday, August 20, 2020
2.17 Thursday, August 13, 2020
2.18 Thursday, August 6, 2020
2.19 Thursday, July 23, 2020
2.20 Thursday, July 16, 2020
2.21 Thursday, July 9, 2020
2.22 Thursday, July 2, 2020
2.23 Thursday, June 25, 2020
2.24 Thursday, June 18, 2020
2.25 Thursday, June 4, 2020
2.26 Thursday, May 28, 2020
2.27 Thursday, May 21, 2020
2.28 Thursday, May 14, 2020
2.29 Thursday, May 7, 2020
2.30 Thursday, April 23, 2020
2.31 Thursday, April 16, 2020
2.32 Thursday, April 9, 2020
2.33 Thursday, April 2, 2020

2.1 Thursday, December 24, 2020

2.1.1 Top new questions this week
2.1.2 Greatest hits from previous weeks
2.1.3 Can you answer these questions?

2.1.1 Top new questions this week

These PDE’s no longer evaluate in version 12.2 as they did under 12.1. What can be done to make them evaluate under 12.2?
Travelling around Jupiter
Numerically evaluating parameter derivatives of a hypergeometric function
Numeric Solution Hydrogen Atom
Sum cause a Recursion problem
Is it possible to ask Mathematica to give the maximum value of a function over a specific domain?
Unrolling a surface

These PDE’s no longer evaluate in version 12.2 as they did under 12.1. What can be done to make them evaluate under 12.2?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=236895

These 399 PDE’s no longer produce result under Version 12.2 on windows. DSolve now returns unevaluated. These all evaluated under version 12.1. Why is that? And ...

asked by Nasser https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=70 17 votes

answered by Devendra Kapadia https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=18617 12 votes

Travelling around Jupiter

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=236843

Since we have soon historical conjunction of Jupiter and Saturn I have prepared code with visualization planet Jupiter and Saturn with moons. This code first been prepared for version 11.3 and with ...

asked by Alex Trounev https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=58388 16 votes

Numerically evaluating parameter derivatives of a hypergeometric function

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=237032

I am unable to obtain the numerical value of the derivative of the hypergeometric function. Please note that the (2,4,0,0) is the derivative with respect to the first and second argument

asked by Sachin Kaushik https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=58727 7 votes

answered by Mariusz Iwaniuk https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=26828 7 votes

Numeric Solution Hydrogen Atom

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=236980

I’m trying to solve the Schrödinger equation for the hydrogen atom without made the variable separation of the polar and radial coordinate. It is my test code to extrapolate to another system with its ...

asked by Jorge Castaño https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73029 7 votes

answered by Jorge Castaño https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73029 0 votes

Sum cause a Recursion problem

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=236934

Sum[((-1)^(i + 1)*Binomial[n, i]*(n - i)!)/n!, {i, 1, n}]

This cause a Recursion problem.

As the comment said, If simplify the formula and then sum it, problem ...

asked by wuyudi https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=68689 6 votes

Is it possible to ask Mathematica to give the maximum value of a function over a specific domain?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=236971

I have a function \(f(n)\) over \(n\in \mathbb {N}\). I want to know its maximum value over a very large domain, say \(n=1,2,3,4,...,10^6\). Is there a way to ask Mathematica to give me the maximum value of ...

asked by charmin https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74550 6 votes

answered by MarcoB https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27951 9 votes

Unrolling a surface

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=237045

The surface is determined by this parametric equation ParametricPlot3D[{Cos[],Sin[],z(2+ Cos[])},{,-Pi,Pi},{z,0,1}]

How to unfold the surface in Mathematica? ...

asked by expression https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7339 5 votes

answered by Tim Laska https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=61809 3 votes

2.1.2 Greatest hits from previous weeks

Conversion of Sine to Cosine
How to ask Mathematica to imitate Andy Warhol’s pop-art painting?
Plot, extract data to a file
My Girlfriend is going to prison...Save her with Math
How to create animated snowfall?
Parallel and perpendicular symbol from Mathematica to LaTeX
1 Plot, 2 Scale/Axis

Conversion of Sine to Cosine

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=67521

I’m solving equations with many Cosines and Sines. And I want to convert all the Sines to Cosines using trigonometric formulas such as cos(x)=sin(x+pi/2). How can I do this?

asked by YongCheol Kwon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=23041 3 votes

answered by Sjoerd C. de Vries https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=57 1 vote

How to ask Mathematica to imitate Andy Warhol’s pop-art painting?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=59132

I tried to ask Mathematica to imitate Andy Warhol, let it convert a Marilyn Monroe’s portrait so that it looks like Warhol’s world famous pop-art painting. However, the result shown below is far from ...

asked by Putterboy https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=16069 51 votes

answered by Dr. belisarius https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=193 66 votes

Plot, extract data to a file

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=19859

I need to save data that Mathematica uses inside the Plot command. The format that I would like to have is:

x1 y1 
x2 y2 
.....

asked by molkee https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5097 30 votes

answered by Mr.Wizard https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=121 46 votes

My Girlfriend is going to prison...Save her with Math

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=135937

Salacious title, but true story.

asked by Prisoners Dilema https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46025 42 votes

answered by bobthechemist https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7167 23 votes

How to create animated snowfall?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=16881

Well, the title is self-explanatory. What sorts of snowfall can we generate using Mathematica? There are two options I suggest to consider:

1) Continuous GIF animations with smallest possible number ...

asked by faleichik https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=219 40 votes answered by Simon Woods https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=862 54 votes

Parallel and perpendicular symbol from Mathematica to LaTeX

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=46538

I want to get the following expression from Mathematica to LaTeX:

\[ \begin {bmatrix} E_{\parallel } \\ E_{\perp } \end {bmatrix} \]

I have tried to use inbuilt 'symbol' character from the special ...

asked by Steve Hatcher https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=13314 19 votes

answered by Sjoerd C. de Vries https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=57 27 votes

1 Plot, 2 Scale/Axis

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=627

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

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

asked by 500 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=172 148 votes

answered by ArgentoSapiens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=92 151 votes

2.1.3 Can you answer these questions?

How to determine if a number is an integer power?
dot product of vectors with noncommutative elements
How to Inherit Arrowheds size?

How to determine if a number is an integer power?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=236779

How can I do simple tests like determining if an integer is a power of 2? Mathematically, the result below should be True, and I understand why it doesn’t work on MMa, but how do I do this test ...

asked by Jerry Guern https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=20042 1 vote

dot product of vectors with noncommutative elements

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=237042

I came upon an interesting problem. Suppose you have three vectors \(\psi =(a, b)\), \(\phi =(c,d)\) such that their components do not commute: \(ac\neq ca\), \(bd \neq db\) etc. (in general the vectors may ...

asked by geom https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=68502 1 vote

How to Inherit Arrowheds size?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=236932

I’m trying to write a Module that produces some arrows with custom Arrowhead shapes. However, I want the code external to the

asked by Wynne https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36616 1 vote

2.2 Thursday, December 17, 2020

2.2.1 Top new questions this week
2.2.2 Greatest hits from previous weeks
2.2.3 Can you answer these questions?

2.2.1 Top new questions this week

Plotting the Star of Bethlehem
Opacity gradient in custom legend
Circle Packing in Cone Texture
Is there a Mathematica CUDA ode solver?
How to properly use the function ThermodynamicData
How do I reorder and combine sublists based on sublist rankings given by another list?
How to convert cuboid to mesh efficiently

Plotting the Star of Bethlehem

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=236499

Christmas is around the corner! In preparation, consider the polynomial f[x_,y_]:= 1/10 (4 - x^2 - 2 y^2)^2 + 1/2 (x^2 + y^2) 

and define \(r=(f_x,f_y)\) using the ...

asked by fwgb https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=44151 19 votes

answered by xzczd https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1871 15 votes

Opacity gradient in custom legend

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=236442

I need to produce the legend of a plot which encodes a color gradient together with a color gradient. In particular, I would like the image bellow to have the blueish edge faded and the redish solid:

asked by Marcelo Broinizi https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=53497 6 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 7 votes

Circle Packing in Cone Texture

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=236449

This is a cone with texture generated by PatternFilling in plane. The problem this texture mapping is not conformal. So my question is how to generated a pattern image which could suit a fixed height ...

asked by HyperGroups https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=6648 5 votes

answered by cvgmt https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72111 3 votes

Is there a Mathematica CUDA ode solver?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=236625

I have a system of ODEs which I’d like to solve with many (thousands) different initial conditions. In the net there are articles that CUDA can speed up such computations, but I haven’t found ...

asked by Andrew https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=306 5 votes

How to properly use the function ThermodynamicData

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=236558

I’ve been trying to use the function ThermodynamicData, and it is going fine when I try to calculate properties such as Enthalpy or Entropy or even phase as a ...

asked by Igor Stravinsky https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=35043 5 votes

answered by Michael E2 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4999 2 votes

How do I reorder and combine sublists based on sublist rankings given by another list?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=236526

I have two lists:

asked by Gregorio https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=75996 5 votes

answered by wuyudi https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=68689 2 votes

How to convert cuboid to mesh efficiently

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=236306

cuboids = 
Table[Cuboid @@ (pts = RandomReal[100, {2, 3}]), {i, 10000}]; 
 
Method1:

asked by HyperGroups https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=6648 5 votes

answered by chyanog https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2090 6 votes

2.2.2 Greatest hits from previous weeks

Mathematica code for Bifurcation Diagram
What are the most common pitfalls awaiting new users?
Calculate the 2D Fourier transform of an Image
How to make the digits of go around in a spiral like this?
How to make a Spherical Cow?
How can I plot a graph of an integral?
How to tell Mathematica that certain variables are real/imaginary, integer-valued, etc

Mathematica code for Bifurcation Diagram

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=13277

At the moment I am trying to construct a bifurcation diagram of the iterative function \(f(x)=\) \(ax-1.1975x^3\). I’ve scoured the internet for pre-made bifurcation diagrams and found many (mostly of the ...

asked by Mel https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=3249 27 votes

answered by Mark McClure https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36 47 votes

What are the most common pitfalls awaiting new users?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=18393

As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...

asked by Dr. belisarius https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=193 473 votes answered by Michael E2 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4999 285 votes

Calculate the 2D Fourier transform of an Image

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=29203

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

asked by user8727 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=8727 17 votes

answered by Nasser https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=70 33 votes

How to make the digits of go around in a spiral like this?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=109982

Here is a start.

MapIndexed[Text[Reverse[First[RealDigits[Pi,10,252]]][[Tr@#2]],#]&, 
 Table[{t Cos[t],t Sin[t]},{t,0,16Pi,0.2}]]//Graphics

asked by matrix89 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5379 57 votes

answered by Martin Ender https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2305 73 votes

How to make a Spherical Cow?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=125043

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

asked by Sumit https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=8070 69 votes

answered by andre314 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5467 76 votes

How can I plot a graph of an integral?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=78451

I want to plot the following function:

\[\int \left (\frac {\Gamma (x+1)}{2}-\frac {\Gamma (x-1)}{2}\right ) \, dx\]

asked by Anixx https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=651 4 votes

answered by k_v https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=24727 9 votes

How to tell Mathematica that certain variables are real/imaginary, integer-valued, etc

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=66273 I’m trying to expedite some quantum mechanical calculations (expectation values etc.) by running them through Mathematica. When I say, for example,

asked by Matthew Brunetti https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=22304 39 votes

answered by SquareOne https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=19960 24 votes

2.2.3 Can you answer these questions?

Interpolation for different Parameters
Problem in iterative equation
Importing equations generated in subpackage to be solved in another subpackage

Interpolation for different Parameters

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=236606

I am rather new to Mathematica and I tried to find a solution for my Problem on my own, also looking through this site and the suggested Similar Questions, but I at least could not make out that my ...

asked by n00bBoi1 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=76302 1 vote

Problem in iterative equation

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=236532

I am solving the following iterative equation to calculate Tf and Cp as a function of temperature:

An initial attempt for a ...

asked by John https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72940 2 votes

Importing equations generated in subpackage to be solved in another subpackage

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=236345

I have a package which contains two subpackages: one ("`MOTSimulator`MOTGenerator") which generates a systems of differential equations of the form

asked by crich https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=76216 1 vote

2.3 Thursday, December 10, 2020

2.3.1 Top new questions this week
2.3.2 Greatest hits from previous weeks

2.3.1 Top new questions this week

Find the equidistance curve between two curves
Confused by results of FunctionDomain
Cannot reproduce well-known summation result
Is there a way to get tooltip for parts of a string?
Nice use case for symbolic tensors?
Drawing hollow disks in 3D with an sphere in center and small spheres on the rings
Solve‘DirInf[] Meaningful value or just a bug?

Find the equidistance curve between two curves

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=235971

I have three function \(f(x)=x^x\), \(g(x)=\ln (x)^{\ln (x)}\), \(h(x)=\ln (x)^2\) and I want to find (numerically) \(C\) the center of the circle tangent to the three curves.

I think that one way is to find ...

asked by Domenico Modica https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=76121 14 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 14 votes

Confused by results of FunctionDomain

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=236138

Why does Mathematica give me the function domain of \[f(x)=(2x-3)^{\frac {1}{5}}-(2x+1)^{\frac {1}{5}}-(x - 3)^{\frac {1}{5}}\] as \(x\geq 3\)? I used this command:

asked by Ramez Hindi https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=76160 7 votes

answered by Roderic https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=76085 8 votes

Cannot reproduce well-known summation result

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=236149

Bug introduced in 4.2 or 5.0, persisting through 12.2.0.

Note: this is a repost of my OP on math.SE. I am posting it here because multiple users with different Mathematica versions have given me the ...

asked by Klangen https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=49819 7 votes

answered by Bob Hanlon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9362 3 votes

Is there a way to get tooltip for parts of a string?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=235911

Is there a way to get the tooltip to appear for parts of a string?

asked by user13892 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=13892 7 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 9 votes

Nice use case for symbolic tensors?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=236188

I come from before the times of symbolic tensors in Mathematica, and am used to working with concrete tensors and custom commands to contract them using Transpose, Dot, etc. I recently realized that ...

asked by Stijn https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=69486 6 votes

answered by jose https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=10552 2 votes

Drawing hollow disks in 3D with an sphere in center and small spheres on the rings

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=236161

I was trying to draw the following logo of an atom using Mathematica, but I could only figure out how to draw intersecting ellipses, not a nice logo like below. Do you have any idea? And is ...

asked by Saeid https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=35814 6 votes

answered by Michael E2 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4999 7 votes

Solve‘DirInf[] Meaningful value or just a bug?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=236077

Bug introduced in 4.1 or earlier and persisting through 12.2.0. or later

To the problem below, I get four independent, incomplete solutions, three in terms of ...

asked by Michael E2 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4999 6 votes

answered by Akku14 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34287 0 votes

2.3.2 Greatest hits from previous weeks

Why is raytracing so slow?
Generate a Unit Circle Trigonometry
Drawing a square root spiral
How do I make a 3DPlot using cylindrical coordinates?
How to calculate contour integrals with Mathematica?
Skip header lines on import
Using Export[] sends the file where?
Can you answer these questions
Periodical sum of rows by a certain step
Behavior of $MinPrecision seems to have changed between 12.0.0 and 12.1.1
HankelTransform problem

Why is raytracing so slow?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=219629

I’m trying to get some rays to bounce in a circle. But I want to be able to control the reflections, i.e. the direction the rays bounce in the circle. I have a MWE below, and it is severely limited by ...

asked by Tomi https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36939 31 votes

answered by Tim Laska https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=61809 42 votes

Generate a Unit Circle Trigonometry

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=2456

Struggling often with Trigonometry I would like to have some code to generate this Unit Circle Trigonometry. Would be of great help when I need to transform some data :

asked by 500 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=172 18 votes

answered by Mark McClure https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36 32 votes

Drawing a square root spiral

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=66969

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

asked by matrix89 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5379 24 votes

answered by Bob Hanlon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9362 21 votes

How do I make a 3DPlot using cylindrical coordinates?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=19076

I’m trying to plot a function of the form \(z(r,\theta )\) where \(r \in [0, R]\) for a finite R, \(\theta \in [0,2\pi [\), and z is the third coordinate, a function of the first two. I couldn’t find anything ...

asked by Learning is a mess https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5643 18 votes

answered by whuber https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=91 24 votes

How to calculate contour integrals with Mathematica?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=34073

How to calculate the integral of \(\frac {1}{\sqrt {4 z^2 + 4 z + 3}}\) over the unit circle counterclockwise for each branch of the integrand?

asked by user64494 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7152 42 votes

answered by Artes https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=184 64 votes

Skip header lines on import

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=50718

When importing a data file what are the comment symbols for Mathematica? That is, given a file like this

blabla 
bulbul 
 
1 2 6 54 7 ...

what symbol do I have ...

asked by MaxJ https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=14687 20 votes

answered by george2079 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2079 18 votes

Using Export[] sends the file where?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=8586

I am trying to use the Export command to convert a list of plots into a *.gif file, and the command runs and executes well, but I can’t find the file! Where is it ...

asked by Patrick Da Silva https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1785 37 votes

answered by Vitaliy Kaurov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=13 51 votes

Can you answer these questions

Periodical sum of rows by a certain step

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=236085

I’ve been struggling with one problem. I have a classic matrix in this example 12x4 such as: matrix = Table[i, {i, 12}, {4}]

asked by Jakub Petrj https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=75456 2 votes

answered by Carl Woll https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=45431 0 votes

Behavior of $MinPrecision seems to have changed between 12.0.0 and 12.1.1

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=235851

I am running into a very weird bug where setting $MinPrecisionto some value (in this case 200 has a very different and ...

asked by Kvothe https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=45020 3 votes

HankelTransform problem

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=236119

Somewhere in the following code there is a bug. The result should not be zero! FunctionExpand@HankelTransform[Sqrt[r] Cos[r], r, k, 1/2]

I think the answer should ...

asked by SolutionExists https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=70331 1 vote

2.4 Thursday, December 3, 2020

2.4.1 Top new questions this week
2.4.2 Greatest hits from previous weeks
2.4.3 Can you answer these questions?

2.4.1 Top new questions this week

Interpolation on an unstructured mesh
Tower of Pisa function
How can I ingest and analyze benchmark results posted at MSE?
Construct a polyhedron from the coordinates of its vertices and calculate the area of each face
Make an InterpolatingFunction periodic
How do I place the Clock arrows inside this clock face?
How can I sketch a right-angled triangle?

Interpolation on an unstructured mesh

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=235681

This may have a duplicate but I have spent some time looking and can’t find it. I have experimental data in the form of { {x1, y1, z1}, {x2, y2, z2}...} I wish to interpolate it so my thoughts turned ...

asked by Hugh https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12558 10 votes

answered by user21 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=18437 8 votes

Tower of Pisa function

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=235495

I’m trying to construct a ’smooth’ function \(f : \mathbb {R}^2 \longrightarrow [0,1]\) such that all level sets \[\{ x | f(x)=y\}\] are circles in a way that \(f\) looks like the ’Leaning Tower of Pisa’.

asked by darksun https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=75863 10 votes

answered by fwgb https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=44151 7 votes

How can I ingest and analyze benchmark results posted at MSE?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=235390

How can I ingest Mathematica / WL benchmark results posted at Mathematica Stack Exchange (MSE), like the ones posted here? Assumptions:

There are multiple answers with benchmarks posted

asked by Anton Antonov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34008 10 votes

answered by Anton Antonov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34008 12 votes

Construct a polyhedron from the coordinates of its vertices and calculate the area of each face

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=235524

I have the 3D coordinates for a set of points. I want to construct the convex polyhedron with those points as vertices.

I know I can use functions like DelaunayMesh

asked by Dennis https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=69969 9 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 7 votes

Make an InterpolatingFunction periodic

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=235403

Interpolation can make an InterpolatingFunction periodic with the option ...

asked by Chris K https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=6358 8 votes

answered by Michael E2 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4999 3 votes

How do I place the Clock arrows inside this clock face?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=235711

I am trying to program a clock, I have the face I want and the hands but I can not seem to put them together so they work.....

asked by Struggling Student https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=75041 7 votes

answered by Anton Antonov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34008 6 votes

How can I sketch a right-angled triangle?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=235413

I would like to replicate this ellipse, but with a right-angled triangle (with smooth/rounded corners). The formula for this ellipse:

asked by nightcape https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=75304 7 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 7 votes

2.4.2 Greatest hits from previous weeks

Elegant operations on matrix rows and columns
Positioning axes labels
How to create word clouds?
How do I clear all user defined symbols?
What does # mean in Mathematica?
How to manipulate 2D plots?
How to make an inkblot?

Elegant operations on matrix rows and columns

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3069

Question

The Mathematica tutorial has a section ’Basic Matrix Operations’, describing operations like transpose, inverse and determinant. These operations all work on entire matrices. I am missing a ...

asked by sjdh https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=515 180 votes

answered by Mr.Wizard https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=121 61 votes

Positioning axes labels

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=87388

I need to change the position of my axes labels such that the y-axis label is in the middle and parallel to the y-axis. I’d also like the x-axis label to be in the middle of the x-axis rather than ...

asked by John_dydx https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7849 15 votes

answered by Virgil https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27697 16 votes

How to create word clouds?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=2334

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, ...

asked by István Zachar https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=89 145 votes

answered by Heike https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46 119 votes

How do I clear all user defined symbols?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=850

Is there some way to do this other than going to Evaluation -> Quit kernel and firing a new one up?

asked by niklasfi https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=82 97 votes

answered by Artes https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=184 95 votes

What does # mean in Mathematica?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=19035

I asked Mathematica to compute the following

Solve[c (1-x)^2-x^(1/4) == 0, x]

and it returned this:

  x = Root[#1^8 c^4 - 8 #1^7 c^4 + 28 #1^6 c^4 - 56 #1^5 c^4 

asked by ronanymous https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5730 38 votes

answered by Dr. belisarius https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=193 64 votes

How to manipulate 2D plots?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=7142

When it comes to visual analysis, large datasets or data with intricate internal details often makes plotting in 2D useless, as the outcome is either just a fraction of the full dataset, or no details ...

asked by István Zachar https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=89 134 votes

answered by István Zachar https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=89 154 votes

How to make an inkblot?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3345

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):

asked by István Zachar https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=89 86 votes

answered by Sjoerd C. de Vries https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=57 51 votes

2.4.3 Can you answer these questions?

What is the fastest way to get the lowest eigenvalue and corresponding eigenstate in Mathematica?
How do I get built-in functions to use custom objects as if they were e.g. List?
How to speed up this code (finding eigenvector with smallest eigenvalue)?

What is the fastest way to get the lowest eigenvalue and corresponding eigenstate in Mathematica?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=235678

I tried to use the Arnoldi method to get the smallest eigenvalue and corresponding eigenstate for large matrix. However, Arnoldi did not give me the desired result:

asked by lol https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=40838 2 votes

How do I get built-in functions to use custom objects as if they were e.g. List?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=235391

(This is part 2 of my earlier question, Can I overload Part for specific heads (a la overloaded array subscripting)?, which was well-answered as asked.)

Overview: My goal is to create a custom object -...

asked by Josh Helzer https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=75893 3 votes

How to speed up this code (finding eigenvector with smallest eigenvalue)?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=235775

I have following code. The function TraceSystem is to take partial trace of matrix and I think this part is fine. The main code is below in dd and I think the main problem is in here for Eigenvector. ...

asked by lol https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=40838 1 vote

2.5 Thursday, November 19, 2020

2.5.1 Top new questions this week
2.5.2 Greatest hits from previous weeks
2.5.3 -Can you answer these questions?

2.5.1 Top new questions this week

3D Inclusion with structured mesh and coarse and arbitrary matrix
Smoother jelly / water effect on an image
Can Mathematica be used to edit MP3 tags?
How can I put the edge of a rectangle inside it rather than outside it?
How do I invert my matrix?
How to convert a Dataset into an indexed dataset / association-of-associations given a column header?
Automatically draw chords from n-1 points on a circle to a fixed point on the circle

3D Inclusion with structured mesh and coarse and arbitrary matrix

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=234780

I am wondering if there is a simple way to define a structured 3D mesh (inclusion) like e.g. that and surround it with a corse and unstructured Matrix. It should be possible to refine both more or ...

asked by Max https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=68812 15 votes

answered by Tim Laska https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=61809 8 votes

Smoother jelly / water effect on an image

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=234653

I’m trying to achieve a jelly / water surface effect. I’d like it to be a bit smoother. Here I am taking a triangulated rectangle and perturbing all points by a little random noise for each frame. ...

asked by flinty https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72682 14 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 15 votes

Can Mathematica be used to edit MP3 tags?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=234564

Can Mathematica edit mp3 tags? I have a set of files and I’d like to batch process artist, album title, etc. I know other tools exist; I wonder if Mathematica can do it.

asked by GregH https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4393 11 votes

answered by flinty https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72682 15 votes

How can I put the edge of a rectangle inside it rather than outside it?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=234866

Problem: when I draw a rectangle and put a coloured edge around it, the displayed edge is centred along the nominal edge and if it follows the same course as one of the axes then it does not show up. ...

asked by ruffle https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=59886 7 votes

answered by Brett Champion https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=69 5 votes

How do I invert my matrix?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=234836

I have the following matrix \(M\):

\begin{bmatrix} 
P & p & 0 & 0 \\ 
pe_1 & Pe_1 & \sqrt{P^2 - p^2}q_1 & \sqrt{P^2 - p^2}r_1 \\ 
pe_2 & Pe_2 & \sqrt{P^2 - p^2}q_2 & 
\end{bmatrix}

asked by Anson Bdo https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=75764 7 votes

answered by LouisB https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=22158 14 votes

How to convert a Dataset into an indexed dataset / association-of-associations given a column header?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=234931

Given a dataset as such

If "letter" is the header that is chosen, how do I convert it into an indexed dataset / association-of-associations? i.e. How do ...

asked by IntroductionToProbability https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=60568 6 votes

answered by Anton Antonov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34008 6 votes

Automatically draw chords from n-1 points on a circle to a fixed point on the circle

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=234729

I want to put n equally spaced points on a circle and automatically draw chords from all points to a fixed point preferably P(0,0). I have managed to draw the points and the circle so far with

asked by Guy Foxx https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=75736 6 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 5 votes

2.5.2 Greatest hits from previous weeks

How to find the position of elements in a list satisfying criteria
Finding Limits in several variables
Why round to even integers?
Why is raytracing so slow?
How do I identify the source of a "Tag times protected" error?
Mathematica command that allows it to read my intentions
How to make a Spherical Cow?

How to find the position of elements in a list satisfying criteria

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=180

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.

asked by PeterR https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=140 67 votes

answered by J. M.’s discontentment https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=50 63 votes

Finding Limits in several variables

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=21544

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

\[\lim _{(x,y)\to (0,0)} f(x,y)\] with Mathematica?

When \(f\) is continuous, we can use \[\lim _{(x,y)\to (0,0)} f(x,y)=\lim _{(x,0)}\]

asked by Dominic Michaelis https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5899 31 votes

answered by whuber https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=91 42 votes

Why round to even integers?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=2116

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

asked by wxffles https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=427 82 votes

answered by Per Alexandersson https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=488 50 votes

Why is raytracing so slow?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=219629

I’m trying to get some rays to bounce in a circle. But I want to be able to control the reflections, i.e. the direction the rays bounce in the circle. I have a MWE below, and it is severely limited by ...

asked by Tomi https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36939 31 votes

answered by Tim Laska https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=61809 42 votes

How do I identify the source of a "Tag times protected" error?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=11982

I have some code that looks like

Table[ 
    a = 1; 
    b = {2, 3} 
    c = i;, 
    {i, 2} 
]

which gives an error:   Set::write: Tag Times in c {2,3} is Protected....

asked by dearN https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=204 29 votes

answered by Mr.Wizard https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=121 35 votes

Mathematica command that allows it to read my intentions

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=194384

In version 2.0 of Mathematica there was a command, ReadProgrammerIntentions[ ] which allowed it rapidly compose code that could solve problems simple to complex, ...

asked by MikeY https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=47314 52 votes

answered by MarcoB https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27951 38 votes

How to make a Spherical Cow?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=125043

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

asked by Sumit https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=8070 69 votes

answered by andre314 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5467 76 votes

2.5.3 -Can you answer these questions?

Setting pieces of "matrices" - unwanted behavior
system of coupled nonlinear pdes with FEM (magneto-hydrodynamic mass transfer)
Create a Cellular Automata rule in Mathematica

Setting pieces of "matrices" - unwanted behavior

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=234703

I am constructing matrices whose elements are lists themselves (of varying length), and am (re)setting the entries of these matrices using among others the "All" command. It seems that in ...

asked by Stijn https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=69486 2 votes

system of coupled nonlinear pdes with FEM (magneto-hydrodynamic mass transfer)

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=234749

I’m trying to reproduce the magneto-hydrodynamic flow studied here using the nonlinear FEM functionality, and have been having trouble implementing the Neumann boundary conditions. Pardon the long ...

asked by George Varnavides https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=41179 1 vote

Create a Cellular Automata rule in Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=234577

I want to create an image in a cellular automata, more specifically an image of an object, like a turtle for example. I found this article online, and i am trying to replicate the results for growing ...

asked by Joana Bugalho https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=75694 2 votes

2.6 Thursday, November 12, 2020

2.6.1 Top new questions this week
2.6.2 Greatest hits from previous weeks
2.6.3 Can you answer these questions?

2.6.1 Top new questions this week

How to cut a list by max sum
Is it possible to ask Mathematica to stick two plots together to give a continuous plot ? (An example is given)
ReplaceAll, Unexpected output
Find All Permutations for Multiset
Counting the number of edges between two graph partitions
Summing over Partitions
Incomplete web image scraping

How to cut a list by max sum

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=234240

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

let maxsum=20, then I get ...

asked by wuyudi https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=68689 9 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 12 votes

Is it possible to ask Mathematica to stick two plots together to give a continuous plot ? (An example is given)

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=234373

I want to plot a function over a large range of \(x\). The problem is that for very large \(x\), even increasing PlotPoint to \(5\times 10^6\) and MaxRecursion 15, it does not give the whole result. But I ...

asked by charmin https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74550 8 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 15 votes

ReplaceAll, Unexpected output

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=234344

Each week I import a dataset, and every week the dataset differs in length (the number of records). After the import I need to do some transformations. One of these transformations is the ReplaceAll.

asked by Michiel van Mens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9590 7 votes

answered by Carl Woll https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=45431 9 votes

Find All Permutations for Multiset

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=234143

Take a list with repetitions, say {a, a, b, c}, and some permutation thereof, say {c, a, b, a}. I want to know which ...

asked by AccidentalFourierTransform https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34893 7 votes

answered by ciao https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=11467 6 votes

Counting the number of edges between two graph partitions

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=234462

Consider the following:

g = RandomGraph[WattsStrogatzGraphDistribution[1000, 0.1, 5]] 
comm = FindGraphPartition[g, 2]; 
CommunityGraphPlot[g, comm]

asked by Caitlin https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74961 5 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 5 votes

Summing over Partitions

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=234302

Imagine I have a list of integers \(l=\{l_1,l_2,...,l_{50}\}\), say, for example

l = RandomInteger[10, 50]

and I want to find how many ways there are of summing ...

asked by sam wolfe https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=64001 5 votes

answered by Carl Woll https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=45431 6 votes

Incomplete web image scraping

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=234154

Occasionally when I scrape images from a webpage, such as:

Import["https://www.freeart.com/gallery/m/mondrian/mondrian.html", "Images"]

only a ...

asked by David G. Stork https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9735 5 votes

answered by Rohit Namjoshi https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=58370 4 votes

2.6.2 Greatest hits from previous weeks

Positioning axes labels
How to perform a multi-peak fitting?
How to generate a random snowflake
Figuring when the minute and hour hand coincide on a clock
Is there an open source implementation of Mathematica-the-language?
How to make a Spherical Cow?
What’s the most difficult multidimensional integral that Mathematica has solved?

Positioning axes labels

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=87388

I need to change the position of my axes labels such that the y-axis label is in the middle and parallel to the y-axis. I’d also like the x-axis label to be in the middle of the x-axis rather than ...

asked by John_dydx https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7849 15 votes

answered by Virgil https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27697 16 votes

How to perform a multi-peak fitting?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=26336

I am wondering how to implement the multi-peak detecting and fitting in Mathematica. Following is an example of fitting the data using three peaks (such that the data ~ peak1 + peak2 + peak3). The ...

asked by Everett You https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1389 55 votes

answered by Silvia https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=17 55 votes

How to generate a random snowflake

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=39361

'Tis the season...

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

What is your best code for generating ...

asked by Peltio https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=6745 140 votes

answered by Silvia https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=17 181 votes

Figuring when the minute and hour hand coincide on a clock

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=573

I would like to list all possible times in a 12-hour period, where the hour hand overlaps the minute hand completely. This is really a question about three distinct things - to be done in Mathematica ...

asked by Steve D https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=191 15 votes

answered by Verbeia https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=8 21 votes

Is there an open source implementation of Mathematica-the-language?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=4454

I’ve seen questions before such as "What is the best open-source equivalent for Mathematica?", but that specific question (and that line of inquiry in general) cares more about the computer algebra ...

asked by sblom https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=178 122 votes

answered by Simon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34 85 votes

How to make a Spherical Cow?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=125043

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

asked by Sumit https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=8070 69 votes

answered by andre314 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5467 76 votes

What’s the most difficult multidimensional integral that Mathematica has solved?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222184

I am interested in benchmarking numerical integration methods and am trying to develop a wider set of difficult multivariate examples. For my particular methods, I only want to look at non-negative-...

asked by ben18785 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=19278 6 votes

2.6.3 Can you answer these questions?

Solving \(E[abXab]=Y\) for Gaussian \((a,b)\)
Problem with RunProcess
Does NumberLinePlot give the whole results over a large domain? Or we need to increase its precision?

Solving \(E[abXab]=Y\) for Gaussian \((a,b)\)

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=234502

I have \(d/2\)-dimensional variables \(a,b\) jointly distributed as Gaussian(\(\mu ,\Sigma \)) in \(d\) dimensions, and need to solve the following equation for \(X\) \[E[ab^TXab^T]=Y\] This is equivalent to ...

asked by Yaroslav Bulatov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=217 1 vote

Problem with RunProcess

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=234260

I’m trying to use the RunProcess function to run docker on Mac OS using Mathematica. But there is a problem:

asked by Wei Li https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=75601 1 vote

Does NumberLinePlot give the whole results over a large domain? Or we need to increase its precision?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=234324

I use this code over the domain \(x\in (0,300)\)

asked by charmin https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74550 1 vote

2.7 Thursday, November 5, 2020

2.7.1 Top new questions this week
2.7.2 Greatest hits from previous weeks
2.7.3 Can you answer these questions?

2.7.1 Top new questions this week

Why is there a discrepancy between JoinedCurve/FilledCurve and the underlying BSplineCurve segments?
Converting an equation with units to one without units
Generate an e machine graph from transition probability matrices
Deconvolution approaches for 3D data
construct a lattice with a defined unitcell
How to remove Null plot markers in QuantilePlot?
Split in non-overlapping sub-lists with elements within an interval from the first member

Why is there a discrepancy between JoinedCurve/FilledCurve and the underlying BSplineCurve segments?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=233846

This may be related to How to discretize a BezierCurve?, but this question deals with BSplineCurves with specific SplineWeights, ...

asked by robjohn https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=232 10 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 8 votes

Converting an equation with units to one without units

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=233804

I may have a solution but it is not slick! See below Doing numerical calculations with functions that use units can be very slow. I would like to have a function or operator that can turn my functions ...

asked by c186282 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4515 6 votes

answered by march https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=29734 2 votes

Generate an e machine graph from transition probability matrices

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=234036

I am trying to generate this type of graphic:

see Fig.1a from https://arxiv.org/abs/0905.3587. This process is associated with two transition matrices

asked by AG1123 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36275 6 votes

answered by Anton Antonov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34008 7 votes

Deconvolution approaches for 3D data

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=233877

Building neural nets in the WL is great. I was in the process of rewriting a previous GAN of mine in the WL to see if I can get better performance, and was surprised to find that the standard ...

asked by BBirdsell https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=49805 6 votes

construct a lattice with a defined unitcell

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=233863

We can construct a base-centered tetragonal unit cell by: LatticeData["CenteredTetragonal", "Image"]

But how can we construct a lattice by

asked by Inzo Babaria https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=33967 6 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 7 votes

How to remove Null plot markers in QuantilePlot?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=233816

Bug introduced in 12.0 and persisting in 12.1.1

I want to change the plot markers of the data points in QuantilePlot. This seems pretty straightforward:

asked by Q.P. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27119 6 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 5 votes

Split in non-overlapping sub-lists with elements within an interval from the first member

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=233767

I want to split a large ordered list into consecutive non-overlapping sub-lists, such that all elements are within an interval from the first member of the sub-list . For example:

asked by Oleg https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=75470 6 votes

answered by WReach https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=142 7 votes

2.7.2 Greatest hits from previous weeks

Code that generates a mandala
How to create word clouds?
How can I draw the Olympic rings with Mathematica?
Calling Correct Function for Plotting DiracDelta
How to create effect like Van Gogh’s stroke brush?
Parallel and perpendicular symbol from Mathematica to LaTeX
Help find a bright object on Mars!

Code that generates a mandala

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=136974

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.

asked by zeros https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=26849 73 votes

answered by Anton Antonov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34008 97 votes

How to create word clouds?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=2334

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, ...

asked by István Zachar https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=89 145 votes

answered by Heike https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46 119 votes

How can I draw the Olympic rings with Mathematica?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=8885

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, but ...

asked by Mike Honeychurch https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=77 44 votes

answered by cormullion https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=61 23 votes

Calling Correct Function for Plotting DiracDelta

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3506

I am wondering what is the correct function in Mathematica to plot the true impulse function, better known as the DiracDelta[] function. When using this inside of a ...

asked by night owl https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=116 17 votes

answered by Heike https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46 19 votes

How to create effect like Van Gogh’s stroke brush?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=39003

I need to apply Van Gogh’s stroke brush effect to a random image Take the following image as an example:

Thank you so much if you could help!

asked by user10495 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=10495 34 votes

answered by Simon Woods https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=862 51 votes

Parallel and perpendicular symbol from Mathematica to LaTeX

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=46538

I want to get the following expression from Mathematica to LaTeX:

\[ \begin {bmatrix} E_{\parallel } \\ E_{\perp } \end {bmatrix} \]

I have tried to use inbuilt ’symbol’ character from the special ...

asked by Steve Hatcher https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=13314 19 votes answered by Sjoerd C. de Vries https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=57 27 votes

Help find a bright object on Mars!

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=11819

In today’s news, scientists found a bright object on one of Curiosity’s photos (it’s near the bottom of the picture below). It’s a bit tricky to find - I actually spent quite some time staring at the ...

asked by Victor K. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1351 198 votes

answered by Niki Estner https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=242 257 votes

2.7.3 Can you answer these questions?

How can I determine and then plot a confidence bands in QuantilePlot?
How to remove the smallest term from asymptotic expansion?
Solving the following system of integrodifferential equations: speed up of the code

How can I determine and then plot a confidence bands in QuantilePlot?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=233931

Does anyone know if its possible to plot a confidence band in QuantilePlot? I haven’t been able to find any documentation for this, or a previous example on here.

asked by Q.P. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27119 3 votes

How to remove the smallest term from asymptotic expansion?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=233823

It is well-known that \(e^{-1/x}\sim o(x^n)\) as \(x\to 0^+\) for any \(n\in \mathbb {N}\), thus if I do an asymptotic expansion for a function, say \(f=1/(1-x)+e^{-1/x}\) as \(x\to 0^+\), I expect to receive an ...

asked by user142288 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=59534 5 votes

Solving the following system of integrodifferential equations: speed up of the code

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=233726

Consider a system of equations

asked by John Taylor https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=41058 1 vote

2.8 Thursday, October 29, 2020

2.8.1 Top new questions this week
2.8.2 Greatest hits from previous weeks
2.8.3 Can you answer these questions?

2.8.1 Top new questions this week

Dynamically drag graph vertices
Display Number with SI prefixes
Understanding the profiler: Is pattern matching/de-structuring expensive?
How to select the fastest approach for large numerical data computations?
Performance of pure function - Best way to define a function?
Font style inconsistency on "number sign" (hashtag) and "at symbol"
Solving a Nonlinear Complementary Problem (plasticity)

Dynamically drag graph vertices

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=233409

Is it possible to make a dynamic graph with an ability to drag vertices? In other words let vertices behave like Locators and change its ...

asked by swish https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2490 9 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 13 votes

Display Number with SI prefixes

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=233503

I have a number of val = 0.000015783 which represents a current value in Amps. I want to display it with 3 significant digits and with SI prefixes instead of the ...

asked by tobalt https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27818 7 votes

answered by creidhne https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=41569 6 votes

Understanding the profiler: Is pattern matching/de-structuring expensive?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=233388

I was profiling some code and I am trying to understand what the results mean. Suppose we have the very idiomatic,

asked by ITA https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42145 7 votes

How to select the fastest approach for large numerical data computations?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=233677

I really love the flexibility of Mathematica: there are several ways to perform one task. However, to get the performance of the intense numeric calculation, it can ...

asked by Nam Nguyen https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1712 6 votes

answered by Szabolcs https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12 7 votes

Performance of pure function - Best way to define a function?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=233637

In general, to define a function, we often use f[x_]. Another way is to use pure function (full form and shorthand). I want to test the performance of these ...

asked by Nam Nguyen https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1712 6 votes

Font style inconsistency on "number sign" (hashtag) and "at symbol"

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=233665

Why number sign "#" (known as hashtag symbol on social media) or at sign "@" are not consistent with the ...

asked by azerbajdzan https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=53172 6 votes

answered by creidhne https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=41569 9 votes

Solving a Nonlinear Complementary Problem (plasticity)

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=233340

I would like to solve the following: given \(t\mapsto \sigma (t)\) and \(E>0\), \(\sigma _y>0\), find \(\epsilon \) such that:

asked by anderstood https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=18767 5 votes

answered by xzczd https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1871 4 votes

2.8.2 Greatest hits from previous weeks

Crack CAPTCHA using deep learning
Why I get the "Set::write: "Tag Times in is Protected." error?
What do the X and Y axis stand for in the Fourier transform domain?
Where can I find examples of good Mathematica programming practice?
How to calculate scalar curvature Ricci tensor and Christoffel symbols in Mathematica?
How to add a front-end to the free Wolfram Engine?
Plotting Complex Quantity Functions

Crack CAPTCHA using deep learning

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=143691

Deep convolutional neural networks are very good at computer vision related tasks. Optical Character Recognition (OCR) is one important branch of computer vision. In fact, the convolution neural ...

asked by xslittlegrass https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1364 87 votes

answered by xslittlegrass https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1364 98 votes

Why I get the "Set::write: "Tag Times in is Protected." error?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=11868

Why I get the error below with this code:

asked by Aurelius https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1669 10 votes

answered by Mark McClure https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36 13 votes

What do the X and Y axis stand for in the Fourier transform domain?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=85139

In Wolfram Mathematica the function Fourier has the following declaration

Fourier[list]

And after a list is given to the ...

asked by user253956 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=29958 27 votes

answered by Hugh https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12558 61 votes

Where can I find examples of good Mathematica programming practice?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=18

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.’s discontentment https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=50 553 votes

answered by faysou https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=66 486 votes

How to calculate scalar curvature Ricci tensor and Christoffel symbols in Mathematica?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=8895

I am seeking a convenient and effective way to calculate such geometric quantities. I’ve used packages like TensoriaCalc, but they don’t work at all time. Sometimes,...

asked by Zoe Rowa https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1713 40 votes

answered by Yi-Zen Chu https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4869 18 votes

How to add a front-end to the free Wolfram Engine?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=198839

https://blog.stephenwolfram.com/2019/05/launching-today-free-wolfram-engine-for-developers/

http://www.wolfram.com/engine/

The Free Wolfram Engine for Developers is available for pre-production ...

asked by Alexey Golyshev https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=23402 63 votes

answered by Alexey Golyshev https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=23402 53 votes

Plotting Complex Quantity Functions

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3458

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

asked by night owl https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=116 42 votes

answered by Artes https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=184 29 votes

2.8.3 Can you answer these questions?

How to define a derivative of a function at some point?
Insufficient memory problem in Mathematica
Classify; how UtilityFunction matrix is applied to resolve prediction?

How to define a derivative of a function at some point?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=233672

Consider a function  derivative[x_]:=D[Sin[x],x]

When calling it with some argument, like derivative[2], instead of \(\cos (x)\) it gives me \(\partial _{2}\sin (2)\). Is ...

asked by John Taylor https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=41058 1 vote

Insufficient memory problem in Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=233470

I am trying to initialize a 48600 x 48600 packed array from a sparse matrix and a diagonal matrix in Mathematica 8. If S1 is a sparsearray of that size then and S2 is list of 48600 length, then I am ...

asked by Roopayan Ghosh https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=54433 4 votes

Classify; how UtilityFunction matrix is applied to resolve prediction?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=233669

I can’t find any explanation about the details of the real computation, please anybody knows?

asked by pablo https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=61453 1 vote

2.9 Thursday, October 22, 2020

2.9.1 Top new questions this week
2.9.2 Greatest hits from previous weeks
2.9.3 Can you answer these questions?

2.9.1 Top new questions this week

How can I reproduce this mandala with Mathematica?
Tennis Racket theorem
Climbing/Descending the Integer Ladder
Remove inner brackets
Identify the Vertices and Lines around the edges of a free surface - Mesh/DiscreteGraphics
How can I extract the edge points from an image?
How to speed up integers finding function?

How can I reproduce this mandala with Mathematica?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=233050

I found this image on the Internet and it is very beautiful. How can I reproduce it? The ideal would be to be able to control the colors of the outside as well as the center.

asked by Susana https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=37778 12 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 32 votes

Tennis Racket theorem

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=232976

Torque-free Euler equations experiment seen in low gravity of Russian spacecraft is modelled here with a view to see its tumbling motion around the intermediate axis \(\omega _2\) rotation. However its ...

asked by Narasimham https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=19067 10 votes

answered by Alex Trounev https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=58388 16 votes

Climbing/Descending the Integer Ladder

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=233096

A fun combinatoric puzzle that’s popped up in my work that I think would be cute to have a Mathematica solution to, if anyone wants to give it a go. It’s basically a ladder climbing/descending problem ...

asked by b3m2a1 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=38205 8 votes

answered by Leonid Shifrin https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=81 5 votes

Remove inner brackets

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=233206

If I have the result

asked by GlomGive https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=75305 7 votes

answered by wuyudi https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=68689 10 votes

Identify the Vertices and Lines around the edges of a free surface - Mesh/DiscreteGraphics

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=232975

To write a mesher that closes a mesh surface using an implied surface from a boundary spline curve and mesh generated using DiscreteGraphics, I need to identify the Vertices and Lines around the edges ...

asked by mh2000 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=57215 7 votes

answered by Tim Laska https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=61809 8 votes

How can I extract the edge points from an image?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=233092

I want to extract the edge points from a text image and use ListPlot[points] to visualize those points:

I tried to used ...

asked by vito https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=30288 7 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 9 votes

How to speed up integers finding function?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=232960

Playing with integers I looked for a way of finding, let’s say, \(4\)-digits positive integers such that \(a,b,a+b\) had the same digits, like \[1089 + 8019 = 9108\] I am a newbie and I used this function

asked by Raffaele https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=49764 7 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 12 votes

2.9.2 Greatest hits from previous weeks

Where can I find examples of good Mathematica programming practice?
Plotting a Phase Portrait
How can I save both the plot and the legend together?
Find eigen energies of time-independent Schrödinger equation
xkcd-style Plots
How to create a new "person curve"?
How to plot an ellipse?

Where can I find examples of good Mathematica programming practice?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=18

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.’s discontentment https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=50 553 votes

answered by faysou https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=66 486 votes

Plotting a Phase Portrait

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=14160

I’m trying to plot a phase portrait for the differential equation \[x'' - (1 - x^2) x' + x = 0.5 \cos (1.1 t)\,.\] The primes are derivatives with respect to \(t\). I’ve reduced this second order ODE to ...

asked by covertbob https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4528 38 votes

answered by David Slater https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1746 33 votes

How can I save both the plot and the legend together?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=35653

In this example, how can I put the legend inside the graph? Currently, when I save the graph, only the graph is saved, not the legend.

asked by Mika Ike https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=6543 42 votes

answered by C. E. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=731 38 votes

Find eigen energies of time-independent Schrödinger equation

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=32293

I’m trying to get the eigenvalues of a one dimensional time-independent Schrödinger equation,

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

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

asked by xslittlegrass https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1364 48 votes

answered by Jens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=245 46 votes

xkcd-style Plots

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=11350

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

asked by Amatya https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2039 616 votes

answered by Simon Woods https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=862 474 votes

How to create a new "person curve"?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=17704

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

asked by Simon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34 83 votes

answered by Vitaliy Kaurov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=13 45 votes

How to plot an ellipse?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=20100

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

asked by Sriram https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=6075 17 votes

answered by Jens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=245 29 votes

2.9.3 Can you answer these questions?

Equation of Motion: Perturb Scalar Field and flat FLRW Metric (xAct)
Is there any way to change the box-formatting behavior thoroughly?
How to get colors at points in Graphics3D?

Equation of Motion: Perturb Scalar Field and flat FLRW Metric (xAct)

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=233105

Is there a way to get the equations of motion (eom) of a scalar field from a Lagrangian in a perturbed FLRW metric? I want to perturb the field as well as the metric to 1st order. What I did so far:

asked by kalle https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=68748 1 vote

Is there any way to change the box-formatting behavior thoroughly?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=233100

Background The box-formmating behavior is affected by the downvalues of the symbol MakeBoxes. But the formatting behavior is not exactly ...

asked by asd1dsa https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72876 2 votes

How to get colors at points in Graphics3D?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=233287

To get the color at a 2D point in Graphics you can Rasterize it and look up the pixel value, but not for ...

asked by M.R. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=403 2 votes

2.10 Thursday, October 15, 2020

2.10.1 Top new questions this week
2.10.2 Greatest hits from previous weeks
2.10.3 Can you answer these questions?

2.10.1 Top new questions this week

How can I plot my financial indicator below a trading chart (produced by TradingChart) with the same x-axis?
Adding elements of second list in succession
Has the Undo command really been settled? On version 12.1 it only works sporadically. What are some reasons it drops steps?
Solving heat equation on a cylinder with insulated ends and convective boundary conditions
Converting a RawBoxes object to a workable expression
Mean age of people
Suggestion bar still causing Kernel crashes?

How can I plot my financial indicator below a trading chart (produced by TradingChart) with the same x-axis?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=231660

Since this question was not answered, I would like to ask again with some additional information. I have a trading chart saved as chart1 as follows.

asked by DLT https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=54107 9 votes

answered by Lukas Lang https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36508 6 votes

Adding elements of second list in succession

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=231695 Given

t1 = {{1, 2}, {3, 4}}; 
t2 = {{a, b, c}, {e, f}};

I want to add in succession elements of list 2 to list 1 to get:

asked by user57467 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=57467 7 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 8 votes

Has the Undo command really been settled? On version 12.1 it only works sporadically. What are some reasons it drops steps?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=231523

Although Undo has been around since version 10 (before my time) I’ve noticed that sometimes it works just fine up to the moment of the last ...

asked by Jules Manson https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=37721 7 votes

Solving heat equation on a cylinder with insulated ends and convective boundary conditions

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=231588

I am trying to solve heat equation on a cylinder whose ends are thermally insulated and its circular face is exposed to convection. Therefore I have Neumann boundary condition on all faces of the ...

asked by Deep https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=44615 7 votes

answered by yawnoc https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72028 5 votes

Converting a RawBoxes object to a workable expression

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=232789

I have manged to turn an image into a RawBoxes expression. How do I turn in back into something I can use in Graphics In ...

asked by Hugh https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12558 6 votes

answered by Carl Woll https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=45431 9 votes

Mean age of people

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=232809

I have the following datas:

I want to find mean age by using following formula,

Any way to do this in general in Mathematica easily.

asked by Jasmine https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73364 6 votes

answered by xzczd https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1871 12 votes

Suggestion bar still causing Kernel crashes?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=232784

On Mathematica 12.1.1, Windows 10. When Suggestions bar is active, entering and evaluating the following crashes the Kernel.

asked by ciao https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=11467 6 votes

2.10.2 Greatest hits from previous weeks

How to express trigonometric equation in terms of of given trigonometric function?
Elegant operations on matrix rows and columns
What do the X and Y axis stand for in the Fourier transform domain?
Figuring when the minute and hour hand coincide on a clock
Code that generates a mandala
How to generate a random snowflake
Extract real part of a complex expression better than Re does

How to express trigonometric equation in terms of of given trigonometric function?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=434

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

using following trigonometric identities

asked by Prashant Bhate https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=99 30 votes

answered by Simon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34 37 votes

Elegant operations on matrix rows and columns

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3069

Question

The Mathematica tutorial has a section ’Basic Matrix Operations’, describing operations like transpose, inverse and determinant. These operations all work on entire matrices. I am missing a ...

asked by sjdh https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=515 180 votes

answered by Mr.Wizard https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=121 60 votes

What do the X and Y axis stand for in the Fourier transform domain?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=85139

In Wolfram Mathematica the function Fourier has the following declaration

Fourier[list]

And after a list is given to the ...

asked by user253956 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=29958 27 votes

answered by Hugh https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12558 61 votes

Figuring when the minute and hour hand coincide on a clock

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=573

I would like to list all possible times in a 12-hour period, where the hour hand overlaps the minute hand completely. This is really a question about three distinct things - to be done in Mathematica ...

asked by Steve D https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=191 15 votes

answered by Verbeia https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=8 21 votes

Code that generates a mandala

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=136974

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

asked by zeros https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=26849 72 votes

answered by Anton Antonov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34008 95 votes

How to generate a random snowflake

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=39361

’Tis the season...

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

What is your best code for generating ...

asked by Peltio https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=6745 140 votes

answered by Silvia https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=17 181 votes

Extract real part of a complex expression better than Re does

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3306

I have a complex expression with real positive variables only.

Mathematica Input Style:

asked by max https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=796 33 votes

answered by nixeagle https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=814 52 votes

2.10.3 Can you answer these questions?

Passing input from a textfile into a function
How to get the coefficients of second-order Runge-Kutta formula coherently?
Taking "intermediate" limits, e.g. \({\cal X}\to 0\) but \({\cal X}/\epsilon \to \infty \) as \(\epsilon \to 0\) - *without* taking \(\epsilon \to 0\) directly

Passing input from a textfile into a function

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=231540

I have a text file which is a list of numbers and would like to pass each number in the list as input to a Mathematica function. For example, my text might contain [2, 1, 4], and I would like to pass ...

asked by Joshua Steier https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=75099 1 vote

How to get the coefficients of second-order Runge-Kutta formula coherently?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=231528

The form of the second order Runge Kutta formula is as follows(the following is from page 287 of this book):

asked by A little mouse on the pampas https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42417 1 vote

Taking "intermediate" limits, e.g. \({\cal X}\to 0\) but \({\cal X}/\epsilon \to \infty \) as \(\epsilon \to 0\) - *without* taking \(\epsilon \to 0\) directly

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=232859 I have an expression that I would like to take limits of but not in a conventional sense. Take for example, an expression like

This expression involves intermediate variables

asked by epsilonD3LT4 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=75082 1 vote

2.11 Thursday, October 1, 2020

2.11.1 Top new questions this week
2.11.2 Greatest hits from previous weeks
2.11.3 Can you answer these questions?

2.11.1 Top new questions this week

What is a good way of perfoming operations on specified columns of a table with many columns
Quickest way to test whether array is constant
Solving a rotating combination lock puzzle
Shortest way to make a checkerboard pattern
Smoothing the Region?
How to replace only the isolated variable x?
Counting Elements in Multiple Lists

What is a good way of perfoming operations on specified columns of a table with many columns

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=230854

If I have a table of data and I want to do a specific operation on say the third column, I usually do something like this:

asked by Q.P. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27119 11 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 8 votes

Quickest way to test whether array is constant

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=230971

At the moment I use Length[ DeleteDuplicates[ array ] ] == 1 to check whether an array is constant, but I’m not sure whether this is optimal. What would be the ...

asked by Gert https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27889 11 votes

answered by Sjoerd Smit https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=43522 9 votes

Solving a rotating combination lock puzzle

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=230749

The following puzzle appears in The House of da Vinci II and I thought it might be interesting to tackle in Mathematica:

There are numbers marked on four rotating cylinders. These numbers must add up ...

asked by flinty https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72682 9 votes

answered by C. E. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=731 8 votes

Shortest way to make a checkerboard pattern

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=230988

I’m looking for the shortest (in terms of characters) code snippet to make an n-square checkerboard. Here’s my first try (comes in at 72 characters):

asked by M.R. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=403 7 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 9 votes

Smoothing the Region?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=230725

There is a 2D Pi

I successed transformed it to 3D.

asked by partida https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=15961 7 votes

answered by xzczd https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1871 9 votes

How to replace only the isolated variable x?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=230717

I want to replace the variable x in the result, not x in unrelated x[i]

asked by A little mouse on the pampas https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42417 7 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 11 votes

Counting Elements in Multiple Lists

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=230864

How to build a table that counts how many times each element in mainlist occurs in lst1, lst2, lst3, lst4 and which lst1, lst2, lst3, lst4 contains that element. For example, in mainlist, element ...

asked by PRG https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42700 6 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 7 votes

2.11.2 Greatest hits from previous weeks

What does # mean in Mathematica?
Where can I find examples of good Mathematica programming practice?
How do I identify the source of a "Tag times protected" error?
How to create a new "person curve"?
Mathematica 10.0.x freezes in Initializing kernels
Extract real part of a complex expression better than Re does
Calculate the 2D Fourier transform of an Image

What does # mean in Mathematica?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=19035

I asked Mathematica to compute the following

Solve[c (1-x)^2-x^(1/4) == 0, x] 
 
and it returned this: 
  x = Root[#1^8 c^4 - 8 #1^7 c^4 + 28 #1^6 c^4 - 56 #1^5 c^4 ...

asked by ronanymous https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5730 37 votes

answered by Dr. belisarius https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=193 64 votes

Where can I find examples of good Mathematica programming practice?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=18

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.’s discontentment https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=50 550 votes

answered by faysou https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=66 484 votes

How do I identify the source of a "Tag times protected" error?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=11982

I have some code that looks like

Table[ 
    a = 1; 
    b = {2, 3} 
    c = i;, 
    {i, 2} 
] 
 
which gives an error: 
  Set::write: Tag Times in c {2,3} is Protected....

asked by dearN https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=204 28 votes

answered by Mr.Wizard https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=121 35 votes

How to create a new "person curve"?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=17704

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

asked by Simon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34 83 votes

answered by Vitaliy Kaurov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=13 45 votes

Mathematica 10.0.x freezes in Initializing kernels

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=92931

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 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=6783 80 votes

answered by ilian https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=145 101 votes

Extract real part of a complex expression better than Re does

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3306

I have a complex expression with real positive variables only.

Mathematica Input Style:

asked by max https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=796 33 votes

answered by nixeagle https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=814 52 votes

Calculate the 2D Fourier transform of an Image

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=29203

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

asked by user8727 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=8727 15 votes

answered by Nasser https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=70 32 votes

2.11.3 Can you answer these questions?

Simplify Equation with variable unequal to zero
finding primes using chebyshev bias
Why does NDSolve not give consistent results?

Simplify Equation with variable unequal to zero

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=230846

How can I simplify the following equation with Mathematica assuming z!=0? I have the following code:

asked by Franz Ferdinand https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74882 1 vote

finding primes using chebyshev bias

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=230943

Using the problem from my previous question link. For each n, that is n= \(10^3\) to \(10^6\) with a ten-fold increase, how do I use Chebyshev Bias to display the number of primes (which are in the ...

asked by complab56 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74866 1 vote

Why does NDSolve not give consistent results?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=230784

This is my code:

asked by S.J.E. Huisman https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74858 1 vote

2.12 Thursday, September 24, 2020

2.12.1 Top new questions this week
2.12.2 Greatest hits from previous weeks
2.12.3 Can you answer these questions?

2.12.1 Top new questions this week

Solving the Lotka-McKendrick model with NDSolve
Nonlinear dispersal equation modeling insect aggregation
Making a faster alternative for PatternSequence
How can I get material property data past what’s provided via ElementData?
DSolve does not return solution to simple system of second order PDEs
Build the following symmetric array
Evaluate section by button click

Solving the Lotka-McKendrick model with NDSolve

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=230366

The Lotka-McKendrick model is a demographic model that represents the way a population changes over time due to fertility and mortality. For an age-specific population density \( u(a, t) \), and a total ...

asked by Pillsy https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=531 12 votes

answered by Chris K https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=6358 9 votes

Nonlinear dispersal equation modeling insect aggregation

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=230429

I’m a newbie with Mathematica, I know it’s a basic answer, but I can’t solve the problem on my own. I have the following equation reflecting insect aggregation at low population densities (taken from ...

asked by Vefhug https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74729 10 votes

answered by xzczd https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1871 17 votes

Making a faster alternative for PatternSequence

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=230622

I need to improve a pattern or switch an approach. It is best described by an example For a hierarchy/order given by a list e.g.:

order = {1, 2, 3}

and a list:

asked by Kuba https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5478 9 votes

answered by Leonid Shifrin https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=81 9 votes

How can I get material property data past what’s provided via ElementData?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=230484

Background Let’s say I want information (e.g. bulk modulus or space group) on an element or chemical compound that isn’t available via e.g. ElementData[]

asked by Sterling https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=61736 6 votes

answered by Sterling https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=61736 6 votes

DSolve does not return solution to simple system of second order PDEs

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=230383

I’m trying to solve a simple system of second order PDEs with Mathematica 11.1. Here is the system:

asked by C. B. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74734 6 votes

answered by bbgodfrey https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1063 3 votes

Build the following symmetric array

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=230650

My mind is a bit cloudy and I can’t quite pinpoint the pattern here that will allow me to write an elegant piece of code to build the following symmetric matrix of for a given size ...

asked by QuantumDot https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2048 5 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 4 votes

Evaluate section by button click

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=230613

I have a section in my notebook devoted to unit testing, since I’m not comfortable to use the built-in system. I’d like to evaluate the entire section by button click. But I get lost in the notebook ...

asked by infinitezero https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=31036 5 votes

answered by Kuba https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5478 5 votes

2.12.2 Greatest hits from previous weeks

Assign the results from a Solve to variable(s)
Finding unit tangent, normal, and binormal vectors for a given r(t)
Multivariable Taylor expansion does not work as expected
xkcd-style Plots
What’s the most difficult multidimensional integral that Mathematica has solved?
Drawing a square root spiral
Get a "step-by-step" evaluation in Mathematica

Assign the results from a Solve to variable(s)

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=6669

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?

asked by stevenvh https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1450 56 votes

answered by Artes https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=184 34 votes

Finding unit tangent, normal, and binormal vectors for a given r(t)

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=18598

For my Calc III class, I need to find \(T(t), N(t)\), and \(B(t)\) for \(t=1, 2\), and \(-1\), given \(r(t)=\{t,t^2,t^3\}\).

I’ve got Mathematica, but I’ve never used it before and I’m not sure how to coerce ...

asked by a98 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5605 30 votes

answered by Artes https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=184 43 votes

Multivariable Taylor expansion does not work as expected

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=15023

The basic multivariable Taylor expansion formula around a point is as follows:

\[ f(\mathbf r + \mathbf a) = f(\mathbf r) + (\mathbf a \cdot \nabla )f(\mathbf r) + \frac {1}{2!}(\mathbf a \cdot \nabla ) \]

asked by matheorem https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4742 58 votes

answered by Jens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=245 65 votes

xkcd-style Plots

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=11350

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

asked by Amatya https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2039 615 votes

answered by Simon Woods https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=862 474 votes

What’s the most difficult multidimensional integral that Mathematica has solved?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222184

I am interested in benchmarking numerical integration methods and am trying to develop a wider set of difficult multivariate examples. For my particular methods, I only want to look at non-negative-...

asked by ben18785 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=19278 6 votes

Drawing a square root spiral

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=66969

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

asked by matrix89 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5379 24 votes

answered by Bob Hanlon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9362 21 votes

Get a "step-by-step" evaluation in Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=148

Is it possible in Mathematica to get a step-by-step evaluation of some functions; that’s to say, outputting not only the result but all the stages that have led to it? If so, how does one do it?

asked by Cydonia7 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=44 125 votes

answered by J. M.’s discontentment https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=50 105 votes

2.12.3 Can you answer these questions?

How can I make NDSolve aware of vectorial nature of an ODE?
NDsolve Boundary Condition is a Function of the Solution
Optimizing a graph-theoretic piece of code

How can I make NDSolve aware of vectorial nature of an ODE?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=230550

I am trying to solve the equilibrium equation \(\text {DIV } \mathbf P(\textbf {u}(x,y)) = \mathbf {f}\), where \(\mathbf P\) is the stress tensor defined by \[ \mathbf P = \mathbf F + (1-\det \mathbf F) \] asked by rmk236 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74782 1 vote

NDsolve Boundary Condition is a Function of the Solution

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=230520

I am trying to solve something like Fick’s Law using NDSolve

\[\frac {\partial \varphi }{\partial t}=\frac {\partial ^2 \varphi }{\partial r^2}+F(r,t)\] Subject to a ...

asked by UranylTrioxide https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74775 1 vote

Optimizing a graph-theoretic piece of code

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=230425

I have written the following piece of code:

asked by Mr. Mister https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74745 2 votes

2.13 Thursday, September 17, 2020

2.13.1 Top new questions this week
2.13.2 Greatest hits from previous weeks
2.13.3 Can you answer these questions?

2.13.1 Top new questions this week

Display hexagon grid to visualize Langton’s ant
Position function error
Mathematica 12.1.0.0 exporting low quality images at high ImageResolution
How can I count the color pixels in each partition of the image
Why does Nearest not return both equally distant values?
BarChart does not display asymmetric error bars correctly
Pattern-matching complex numbers as a + bi

Display hexagon grid to visualize Langton’s ant

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=230017

I am looking to recreate the following image from this reference as

using Mathematica’s Polygon documentation under "Applications" as a starting point. I want to eventually use Mathematica ...

asked by C. Fuhrman https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=60593 10 votes

answered by flinty https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72682 8 votes

Position function error

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=230018

I recently upgraded from Mathematica 6 to the most recent version. In my new version the Position function returns strange results that were not present in the old ...

asked by Peter https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74626 8 votes

answered by ciao https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=11467 11 votes

Mathematica 12.1.0.0 exporting low quality images at high ImageResolution

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=229973

I recently upgraded from Mathematica 11 to Mathematica 12.1.0.0 . I understand there were some UI changes to accommodate high resolution monitors. I’m not sure if this issue is related to that. I am ...

asked by user3556814 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74618 8 votes

answered by Piotr Wendykier https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9239 1 vote

How can I count the color pixels in each partition of the image

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=230060

I have a image of 1000 x 1000 pixels of which I have made 5 x 5 partitions. After that I am looking for a way to count number of color pixels in each partition. Thanks in advance for help.

asked by Atique Khan https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=59972 7 votes

answered by flinty https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72682 4 votes

Why does Nearest not return both equally distant values?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=230082

Define the following three vectors:

a = {0., 0., 0.}; 
b = {-0.5`, 0.4330127018922193`, 0.25`}; 
c = {-0.5`, 0.`, 0.`};

Note that the distance from a to c is the ...

asked by abwatson https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1709 7 votes

answered by Michael E2 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4999 5 votes

BarChart does not display asymmetric error bars correctly

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=230145

BarChart seems to read the uncertainty in elements the other way around. The object: Around[5, {1, 10}] is evaluated as . However, when you use it in a BarChart, the uncertainties are swapped:

asked by Luis https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=24933 6 votes

Pattern-matching complex numbers as a + bi

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=230013

I just started working with Mathematica and am toying with pattern matching. There may be something obvious I’m missing in this, but I can’t figure it out by myself. I want to write down a function ...

asked by ppln https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=69266 6 votes

answered by eyorble https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=52935 5 votes

2.13.2 Greatest hits from previous weeks

Plot, extract data to a file
How to calculate scalar curvature Ricci tensor and Christoffel symbols in Mathematica?
How can I improve Mathematica’s resolution on a macbook retina display?
Code that generates a mandala
How to create effect like Van Gogh’s stroke brush?
Find eigen energies of time-independent Schrödinger equation
How to find the position of elements in a list satisfying criteria

Plot, extract data to a file

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=19859

I need to save data that Mathematica uses inside the Plot command. The format that I would like to have is:

x1 y1 
x2 y2 
.....

asked by molkee https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5097 30 votes

answered by Mr.Wizard https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=121 47 votes

How to calculate scalar curvature Ricci tensor and Christoffel symbols in Mathematica?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=8895

I am seeking a convenient and effective way to calculate such geometric quantities. I’ve used packages like TensoriaCalc, but they don’t work at all time. Sometimes,...

asked by Zoe Rowa https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1713 38 votes

answered by Yi-Zen Chu https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4869 18 votes

How can I improve Mathematica’s resolution on a macbook retina display?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=18419

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

asked by Tom Wellington https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2437 44 votes

Code that generates a mandala

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=136974

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

asked by zeros https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=26849 71 votes

answered by Anton Antonov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34008 95 votes

How to create effect like Van Gogh’s stroke brush?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=39003

I need to apply Van Gogh’s stroke brush effect to a random image Take the following image as an example:

Thank you so much if you could help!

asked by user10495 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=10495 34 votes

answered by Simon Woods https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=862 51 votes

Find eigen energies of time-independent Schrödinger equation

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=32293

I’m trying to get the eigenvalues of a one dimensional time-independent Schrödinger equation,

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

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

asked by xslittlegrass https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1364 48 votes

answered by Jens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=245 46 votes

How to find the position of elements in a list satisfying criteria

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=180

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.

asked by PeterR https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=140 66 votes

answered by J. M.’s discontentment https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=50 63 votes

2.13.3 Can you answer these questions?

Faster alternative to ImageCorrespondingPoints?
How to make this expression?

Faster alternative to ImageCorrespondingPoints?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=229962

I’m trying to use ImageCorrespondingPoints to register frames in a video sequence. Computational speed is an important consideration for the application I am ...

asked by Brady Hunt https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9017 2 votes

How to make this expression?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=230052

How to code this expression in WolframAlpha. I am interested in how to code the second sum, because it contains a boolean expression: \[\sum _{i=1}^{100}{\sum _{j>n}}{x_{i}x_{j}}\]

asked by Andrey Stebenkov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74632 1 vote

2.14 Thursday, September 10, 2020

2.14.1 Top new questions this week
2.14.2 Greatest hits from previous weeks
2.14.3 Can you answer these questions?

2.14.1 Top new questions this week

Can we use Mathematica to design an electronic active filter?
How to mesh a French biscuit (modulated ellipsoid)
Solutions for searching over Mathematica notebooks?
Coordinate-free derivative
Please explain this syntax: GaborWavelet[6]["FourierFactor"]
How to select several columns from a dataset
BarLegend ticks distorted in MatrixPlot

Can we use Mathematica to design an electronic active filter?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=229714

How can we use Mathematica to design an electronic implementation of an active filter?

asked by David Keith https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=44700 19 votes

answered by David Keith https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=44700 22 votes

How to mesh a French biscuit (modulated ellipsoid)

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=229535

I would like to create a boundary mesh of the following ellipsoid, whose thickness is modulated along its long axis:

The surface parametrization I used for it is:

asked by Oscillon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=13605 10 votes

answered by Michael E2 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4999 10 votes

Solutions for searching over Mathematica notebooks?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=229522

I have hundreds of Mathematica notebooks accumulated over the years, and I’d like to search over them. I’ve been using various versions of text search (grep, SilverSearcher, Spotlight), but there are ...

asked by Yaroslav Bulatov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=217 10 votes

answered by Chris Degnen https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=363 11 votes

Coordinate-free derivative

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=229703

Given the function \[f:v\mapsto \dfrac {v}{\|v\|},\] I would like to compute the derivative of \(f\), that is \(df(v)\). It is possible to derive it by hand, which leads to

asked by anderstood https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=18767 9 votes

Please explain this syntax: GaborWavelet[6]["FourierFactor"]

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=229853

I’ve been using Mathematica for some years, yet I’m befuddled by this statement: GaborWavelet[6]["FourierFactor"]

It appears to give the center frequency ...

asked by Chris https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=66733 7 votes

answered by Carl Woll https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=45431 11 votes

How to select several columns from a dataset

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=229678

I have a dataset with 20 columns. For a analysis I need all columns except the columns 9 and 11. What I do is:

asked by Michiel van Mens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9590 7 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 9 votes

BarLegend ticks distorted in MatrixPlot

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=229502

As shown in many threads here (this, this, ...), Ticks is a valid option of BarLegend.

But it doesn’t seem to work well in this ...

asked by xiaohuamao https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=11125 7 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 8 votes

2.14.2 Greatest hits from previous weeks

Help find a bright object on Mars!
Extract real part of a complex expression better than Re does
Solving \(L=\frac {3}{2} \sqrt {4 \pi ^2 A^2+W^2}-\frac {\sqrt {5 W \sqrt {4 \pi ^2 A^2+W^2}+6 \pi ^2 A^2+3 W^2}}{\sqrt {2}}+\frac {3 W}{2}\) for \(W\)
How to ask Mathematica to imitate Andy Warhol’s pop-art painting?
Cutting bagels into linked halves
How to generate a random snowflake
Finding unit tangent, normal, and binormal vectors for a given r(t)

Help find a bright object on Mars!

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=11819

In today’s news, scientists found a bright object on one of Curiosity’s photos (it’s near the bottom of the picture below). It’s a bit tricky to find - I actually spent quite some time staring at the ...

asked by Victor K. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1351 198 votes

answered by Niki Estner https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=242 257 votes

Extract real part of a complex expression better than Re does

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3306

I have a complex expression with real positive variables only.

Mathematica Input Style:

asked by max https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=796 33 votes

answered by nixeagle https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=814 52 votes

Solving \(L=\frac {3}{2} \sqrt {4 \pi ^2 A^2+W^2}-\frac {\sqrt {5 W \sqrt {4 \pi ^2 A^2+W^2}+6 \pi ^2 A^2+3 W^2}}{\sqrt {2}}+\frac {3 W}{2}\) for \(W\)

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=57763

When I solve the aforementioned equation for \(W\) or \(A\) on Mathematica I get a long and ugly equation in return, namely one of the solutions for \(W\) is: (attempt to read at your own health)

asked by J.D’Almbert https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=19257 8 votes

answered by Alexei Boulbitch https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=788 15 votes

How to ask Mathematica to imitate Andy Warhol’s pop-art painting?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=59132

I tried to ask Mathematica to imitate Andy Warhol, let it convert a Marilyn Monroe’s portrait so that it looks like Warhol’s world famous pop-art painting.

However, the result shown below is far from ...

asked by Putterboy https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=16069 50 votes

answered by Dr. belisarius https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=193 65 votes

Cutting bagels into linked halves

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=7545

I recently came across this video: Mathematically correct breakfast, which shows how a bagel can be neatly sliced into two identical linked halves. I’d like to try this with Mathematica. Here’s a ...

asked by rm -rf https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5 62 votes

answered by Heike https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46 76 votes

How to generate a random snowflake

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=39361

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

What is your best code for generating ...

asked by Peltio https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=6745 140 votes

answered by Silvia https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=17 181 votes

Finding unit tangent, normal, and binormal vectors for a given r(t)

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=18598

For my Calc III class, I need to find \(T(t), N(t)\), and \(B(t)\) for \(t=1, 2\), and \(-1\), given \(r(t)=\{t,t^2,t^3\}\).

I’ve got Mathematica, but I’ve never used it before and I’m not sure how to coerce ...

asked by a98 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5605 30 votes

2.14.3 Can you answer these questions?

Solving equations over unknown Domains
Not able to globalize variables from a manipulate expression
force maximum simplification of radicals in a traditional way-How to do it?

Solving equations over unknown Domains

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=229778

I am trying to solve for what values of some variables make some expressions true; not exactly equations. For a toy example, I am trying to solve for all values of \(x\) that make \(4x\) an Integer.

asked by Matthew Crawford https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=51196 1 vote

Not able to globalize variables from a manipulate expression

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=229534

I am attempting to globalize the variables inside of a Manipulate expression for which my variables are also using interdependent controls. I have attempted to use

asked by Ryan https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74490 1 vote

force maximum simplification of radicals in a traditional way-How to do it?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=229660

this should be simple but I can’t get mathematica to simplify a radical or a set of radicals and express them in the traditional way for example by simplifying this

asked by BeTDa https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72885 2 votes

answered by Daniel Huber https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46318 0 votes

2.15 Thursday, September 3, 2020

2.15.1 Top new questions this week
2.15.2 Greatest hits from previous weeks
2.15.3 Can you answer these questions?

2.15.1 Top new questions this week

Is it possible to call back to Mathematica when using Python through ExternalEvaluate?
Camera view along the trajectory
How to select 2 pairs of distinct twins form a list of 4-tuples?
Combine two plots with reversed y-axis
Can this probability function speed be improved?
Embed a rose flower image in 3D space with axes labeled in UTF8
Simplify Nested Lists

Is it possible to call back to Mathematica when using Python through ExternalEvaluate?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=229164

makes it possible to call Python code from Mathematica. The Wolfram Client for Python makes it possible to call Mathematica from Python. When using ...

asked by Szabolcs https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12 8 votes

answered by Riccardo Di Virgilio https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=51868 3 votes

Camera view along the trajectory

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=229242

I want to create an animation like this one: https://www.youtube.com/watch?v=rvzZmNW2_70 After googling I have found just below informations about this issue: https://twitter.com/bencbartlett/status/...

asked by Mustafa Kosem https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74423 7 votes

answered by C. E. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=731 6 votes

How to select 2 pairs of distinct twins form a list of 4-tuples?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=229409

Given a list of 4-tuples as follows. data = Tuples[Range@6, 4]; I want to select any 4-tuples with two pairs of different twins, for example, as follows:

asked by Wissen Macht Frei https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42141 6 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 3 votes

Combine two plots with reversed y-axis

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=229128

I need to display two y-values for a list of points. I tried doing this:

asked by Rodrigo https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=43431 6 votes

answered by LouisB https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=22158 4 votes

Can this probability function speed be improved?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=229239

I have a process that as part of it requires a certain probability query, specifically, given a multinomial distribution with f equiprobable categories and r trials, some specific category has a given ...

asked by ciao https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=11467 5 votes

answered by JimB https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=19758 4 votes

Embed a rose flower image in 3D space with axes labeled in UTF8

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=229299

I am trying to create an image in which a rose flower image in a 3D space with axes labeled in UTF8! Labels don’t render correctly and not sure how to put the image at say the original of XYZ space.

asked by chikitin https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74442 4 votes

answered by flinty https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72682 4 votes

Simplify Nested Lists

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=229427

I have a problem with nested lists. For example, i have this list:

asked by aptmess https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=58120 4 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 7 votes

2.15.2 Greatest hits from previous weeks

How can I plot implicit equations?
My Girlfriend is going to prison...Save her with Math
Image processing: Floor plan - detecting rooms’ borders (area) and room names’ texts
Crack CAPTCHA using deep learning
Solving \(L=\frac {3}{2} \sqrt {4 \pi ^2 A^2+W^2}-\frac {\sqrt {5 W \sqrt {4 \pi ^2 A^2+W^2}+6 \pi ^2 A^2+3 W^2}}{\sqrt {2}}+\frac {3 W}{2}\) for \(W\)
Entering numbers in Scientific Notation?
Finding unit tangent, normal, and binormal vectors for a given r(t)

How can I plot implicit equations?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=34668

If you enter the following into Wolfram | Alpha, you get nice graphs:

graph 4 x^4 + y^2 = 2  How do you do this in Mathmatica? I realize that these are not ...

asked by Rollie https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=10174 36 votes

answered by Timothy Wofford https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9391 38 votes

My Girlfriend is going to prison...Save her with Math

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=135937

Salacious title, but true story.

asked by Prisoners Dilema https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46025 42 votes

answered by bobthechemist https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7167 23 votes

Image processing: Floor plan - detecting rooms’ borders (area) and room names’ texts

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=19546

Here is a simple building floor plan. I would like to derive the rooms as (rectangular) components and the names of the rooms. This is very common representation of building floor plans.

The problem

asked by s.s.o https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=840 64 votes

answered by Niki Estner https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=242 59 votes

Crack CAPTCHA using deep learning

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=143691

Deep convolutional neural networks are very good at computer vision related tasks. Optical Character Recognition (OCR) is one important branch of computer vision.

In fact, the convolution neural ...

asked by xslittlegrass https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1364 87 votes

answered by xslittlegrass https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1364 98 votes

Solving \(L=\frac {3}{2} \sqrt {4 \pi ^2 A^2+W^2}-\frac {\sqrt {5 W \sqrt {4 \pi ^2 A^2+W^2}+6 \pi ^2 A^2+3 W^2}}{\sqrt {2}}+\frac {3 W}{2}\) for \(W\)

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=57763

When I solve the aforementioned equation for \(W\) or \(A\) on Mathematica I get a long and ugly equation in return, namely one of the solutions for \(W\) is: (attempt to read at your own health)

asked by J.D’Almbert https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=19257 8 votes

answered by Alexei Boulbitch https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=788 15 votes

Entering numbers in Scientific Notation?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=36792

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?

asked by hhh https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2000 59 votes

answered by Joe https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=44710 1 vote

Finding unit tangent, normal, and binormal vectors for a given r(t)

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=18598

For my Calc III class, I need to find \(T(t), N(t)\), and \(B(t)\) for \(t=1, 2\), and \(-1\), given \(r(t)=\{t,t^2,t^3\}\).

I’ve got Mathematica, but I’ve never used it before and I’m not sure how to coerce ...

asked by a98 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5605 30 votes

2.15.3 Can you answer these questions?

How to force FindClusters to return a specific number of clusters?
Calculate a nested integral
Differents Initial Conditions for NDSolve

How to force FindClusters to return a specific number of clusters?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=229313

I am using FindClusters with the Method -> "KMedoids" option. I am specifying a desired number of clusters. It returns with many fewer than the desired number. Is there a way to force it ...

asked by abwatson https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1709 2 votes

Calculate a nested integral

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=229251

I wish to plot the following probability on Mathematica: \[ \pi =n\cdot \int _{-\infty }^{+\infty }\int _{-\infty }^{+\infty } \]

asked by Avocaddo https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=68764 1 vote

Differents Initial Conditions for NDSolve

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=229185

I would like to solve a system of differential equations and another euqtions conect to the system. For example:

asked by Slayz https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74408 1 vote

2.16 Thursday, August 20, 2020

2.16.1 Top new questions this week
2.16.2 Greatest hits from previous weeks
2.16.3 Can you answer these questions?

2.16.1 Top new questions this week

Deleting duplicates after n-occurrences
How can I enclose a closed curve with another identical slightly bigger closed curve?
Glowing weighted graph (network): vertexes and edges
Why does it take so long to Quit?
How to use Flatten to a specific element of a list
Parsing error [bug?] with systems of nonlinear PDEs, Mathematica 12.0.0
Collecting common powers of terms

Deleting duplicates after n-occurrences

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=228775

As a generalization of DeleteDuplicates, I want to delete duplicates from a list, but only after n number of duplicates. Say,

asked by azerbajdzan https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=53172 11 votes

answered by ciao https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=11467 16 votes

How can I enclose a closed curve with another identical slightly bigger closed curve?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=228524

I have a closed curve. I am trying to enclose this closed curve with another closed curve, which looks identical in the shape of the first closed curve, but slightly bigger. How to do this?

asked by acoustics https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=53981 10 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 17 votes

Glowing weighted graph (network): vertexes and edges

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=228738

I am trying to find a way (desirably simple and performance/speed optimized for larger graphs) to do the following :

Styling graph vertexes by glow-effect and its intensity depending on ...

asked by Vitaliy Kaurov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=13 8 votes

answered by flinty https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72682 5 votes

Why does it take so long to Quit?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=228484

Running Quit is a core task repeated many times in any debugging/development cycle. Its efficiency is therefore important and yet in my set-up it is taking ...

asked by Ronald Monson https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2249 8 votes

answered by Ronald Monson https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2249 9 votes

How to use Flatten to a specific element of a list

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=228579

Let's say I have a list {{1, 2, 3}, {4, 5}, ...}. I want to make the list 
look like {1, 2, 3, {4, 5}, ...}. I am doing this way:

asked by Arghya Datta https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=51545 7 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 10 votes

Parsing error [bug?] with systems of nonlinear PDEs, Mathematica 12.0.0

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=228692

I find the following behavior using 12.0.0. (EDIT: I asked a friend to try it in 12.1.1 and he finds the same result.) Here is a system of coupled nonlinear PDEs that ...

asked by Will.Mo https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=49788 6 votes

Collecting common powers of terms

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=228768

How to collect the common powers appearing in the following function using MATHEMATICA, such that if I input

(4 m^6)/((m - n)^2 (m + n)^4 (2m+n)^4)

then the ...

asked by Erosannin https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73763 6 votes

answered by Bob Hanlon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9362 3 votes

2.16.2 Greatest hits from previous weeks

Help find a bright object on Mars!
How to plot an ellipse?
How to make the digits of \(\pi \) go around in a spiral like this?
How to calculate contour integrals with Mathematica?
How to make a Spherical Cow?
How to find integer solutions?
Plotting a Phase Portrait

Help find a bright object on Mars!

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=11819

In today’s news, scientists found a bright object on one of Curiosity’s photos (it’s near the bottom of the picture below). It’s a bit tricky to find - I actually spent quite some time staring at the ...

asked by Victor K. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1351 198 votes

answered by Niki Estner https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=242 257 votes

How to plot an ellipse?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=20100

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

asked by Sriram https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=6075 17 votes

answered by Jens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=245 29 votes

How to make the digits of \(\pi \) go around in a spiral like this?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=109982

Here is a start.

MapIndexed[Text[Reverse[First[RealDigits[Pi,10,252]]][[Tr@#2]],#]&, 
 Table[{t Cos[t],t Sin[t]},{t,0,16Pi,0.2}]]//Graphics

asked by matrix89 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5379 56 votes

answered by Martin Ender https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2305 71 votes

How to calculate contour integrals with Mathematica?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=34073

How to calculate the integral of \(\frac {1}{\sqrt {4 z^2 + 4 z + 3}}\) over the unit circle counterclockwise for each branch of the integrand?

asked by user64494 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7152 40 votes

answered by Artes https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=184 63 votes

How to make a Spherical Cow?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=125043

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

asked by Sumit https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=8070 69 votes

answered by andre314 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5467 76 votes

How to find integer solutions?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=42359

Following is the equation: Need to solve for integer values of x,y when a,b lies between -1000 and 1000. Problem is to find the number of integer values of pair (x,y) that satisfy it.

asked by Sahil Sareen https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12396 2 votes

answered by bill s https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1783 4 votes

Plotting a Phase Portrait

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=14160

I’m trying to plot a phase portrait for the differential equation \[x'' - (1 - x^2) x' + x = 0.5 \cos (1.1 t)\,.\] The primes are derivatives with respect to \(t\). I’ve reduced this second order ODE to ...

asked by covertbob https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4528 38 votes

answered by David Slater https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1746 32 votes

2.16.3 Can you answer these questions?

Export function not working via JLink in Java8 compiled application
Custom arrowhead will not align properly
How to control a presenter notebook with a mobile device?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=228496

I have documented the following issue with evaluating the Export function via J/Link: https://stackoverflow.com/questions/63390977/wolfram-mathematica-kernellink-export-function-not-working-via-jlink- ...

asked by Ceddaerrix https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74211 1 vote

Custom arrowhead will not align properly

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=228631

I am trying to put a custom arrowhead on an arrow I am drawing in a plot. My problem is that the (thick) line of the arrow is showing behind the arrow tip. So it seems like the arrowhead is aligned ...

asked by Bjoj https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36437 1 vote

How to control a presenter notebook with a mobile device?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=228733

In the video of the link below, at 1:40 is said that the presentation can be controlled by a mobile device, how can I do that?

https://www.youtube.com/watch?v=GMHM_iUL_sU

asked by Daniel Rocha da Silva https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74279 1 vote

2.17 Thursday, August 13, 2020

2.17.1 Top new questions this week
2.17.2 Greatest hits from previous weeks
2.17.3 Can you answer these questions?

2.17.1 Top new questions this week

Which function names have been re-purposed in Mathematica after being deprecated?
StringJoin in Thread not working
Using sequence to complete arguments to a function
How can I get the progressive application of list of rules?
Finding the Period of a Limit Cycle
Assigning a Color to each Point on the Plane
using regex to find a specific word

Which function names have been re-purposed in Mathematica after being deprecated?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=228295

I have just learned about the new function Splice from this answer. It turns out that this function used to have a completely different usage! (See below.) To me, this seems dangerous, to deprecate a ...

asked by march https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=29734 14 votes

answered by J. M.’s technical difficulties https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=50 9 votes

StringJoin in Thread not working

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=228320

Here is what I have tried first.

Thread[f["x", {"1", "2"}]] 
 
{f["x", "1"], f["x", "2"]}

But the weirdest thing happened when I ...

asked by kile https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=65814 7 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 9 votes

Using sequence to complete arguments to a function

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=228363

I have a function of, say 4 arguments f[a,b,{c,e},d] where some of the arguments are lists. Given a list of triplets that are possible last-three-arguments to f I’d like to paste them as arguments to ...

asked by ulvi https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1714 6 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 7 votes

How can I get the progressive application of list of rules?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=228088

I have a very long list of rules, and using this list of rules I want to see how some elements evolve as I successively apply the next rules on the previous rule.

Here is the simpler version of my ...

asked by Gummala Navneeth https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=66938 6 votes

answered by march https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=29734 9 votes

Finding the Period of a Limit Cycle

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=228319

I’m interested in the periods of limit cycles of the Wilson-Cowan equations which have the form \[x'(t) = -x + S(ax(t) - by(t) +e)\] \[y'(t) = -y + S(cx(t) - dy(t) + f)\] where \[S(x) = 1 + \] ...

asked by Cheyne https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74162 5 votes

answered by Chris K https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=6358 6 votes

Assigning a Color to each Point on the Plane

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=228423

I have a dataset consisting of points on the plane and a corresponding color. These colors divide the plane into a few distinct regions. I would like to make a plot or diagram that nicely shows this ...

asked by Cheyne https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74162 5 votes

answered by C. E. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=731 4 votes

using regex to find a specific word

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=228278

I want to find the word "circle" and "circles" in the list.

list = {"circle" , "picircle" , "circles" }

The regex code I wrote which isn’t working:

asked by Aryan https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73776 5 votes

answered by Natas https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=67431 7 votes

2.17.2 Greatest hits from previous weeks

Can Mathematica do symbolic linear algebra?
How to make the digits of go around in a spiral like this?
How to plot an ellipse?
Standard deck of 52 playing cards in curated data?
Skip header lines on import
How to graph a sphere with cartesian equations?
How to create a new "person curve"?

Can Mathematica do symbolic linear algebra?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3242

For instance, is there some way I can say "let A and B be arbitrary real \(m\times n\) and \(k\times m\) matrices, Simplify[Transpose[Transpose[A].Transpose[B]]]" and Mathematica would simplify it to B.A? ...

asked by Niki Estner https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=242 63 votes

answered by Chip Hurst https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4346 6 votes

How to make the digits of go around in a spiral like this?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=109982

Here is a start.

MapIndexed[Text[Reverse[First[RealDigits[Pi,10,252]]][[Tr@#2]],#]&, 
 Table[{t Cos[t],t Sin[t]},{t,0,16Pi,0.2}]]//Graphics

asked by matrix89 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5379 56 votes

answered by Martin Ender https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2305 71 votes

How to plot an ellipse?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=20100

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 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=6075 17 votes

answered by Jens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=245 29 votes

Standard deck of 52 playing cards in curated data?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=16108

I am not sure how to find out what all is included as curated data. For example, are the individual images of each of the 52 cards in a standard deck of playing cards included?

If not, is there a way ...

asked by JohnD https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1629 25 votes

answered by rm -rf https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5 23 votes

Skip header lines on import

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=50718

When importing a data file what are the comment symbols for Mathematica? That is, given a file like this

blabla 
bulbul 
 
1 2 6 54 7 ... 
..

what symbol do I have to put in front of header lines so ...

asked by MaxJ https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=14687 20 votes

answered by george2079 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2079 18 votes

How to graph a sphere with cartesian equations?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=24169

I’m new to Mathematica and I need to ask how to graph a sphere, cylinder, etc.. using cartesian equations.

For example in sphere’s case \(x^2+y^2+z^2=1\)

I tried to use Plot3D but it doesn’t ...

asked by German https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7145 7 votes

answered by Dr. belisarius https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=193 13 votes

How to create a new "person curve"?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=17704

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 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34 83 votes

answered by Vitaliy Kaurov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=13 45 votes

2.17.3 Can you answer these questions?

Mathematica 12.0 and BibTeX reference problem (Windows 10)
How to convince Mathematica that \((-1)^{2/3} = e^{2\pi i /3}\)
How to monitor progress of multiple downloads with URLDownload?

Mathematica 12.0 and BibTeX reference problem (Windows 10)

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=228347

I have problems getting the Citation Management in Mathematica 12.0 to work. It does not work with either EndNote or BibTeX. To do a minimal example, I have the following BibTeX file (libra.bib) ...

asked by jaclea https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7911 1 vote

How to convince Mathematica that \((-1)^{2/3} = e^{2\pi i /3}\)

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=228257

I have a list T which contains 3 + 4*E^(2*Pi*I/3). Yet MemberQ[ T , 3 + 4*(-1)^(2/3) ] 
returns false. 
One can check for themselves with MemberQ[{3 + 4*E^(2*Pi*I/3)}, 3 + 4*(-1)^(2/3)]. 
It will return  ...

asked by Descartes Before the Horse https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=69355 2 votes

How to monitor progress of multiple downloads with URLDownload?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=228403

I have a few image urls that I want to download async, how can we monitor progress of URLDownload? Example:

Monitor[ 
    URLDownload[ 
         WebImageSearch["dog",  ...

asked by M.R. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=403 1 vote

2.18 Thursday, August 6, 2020

2.18.1 Top new questions this week
2.18.2 Greatest hits from previous weeks
2.18.3 Can you answer these questions?

2.18.1 Top new questions this week

How can I find a functional square root in Mathematica?
The numerics of FresnelS[]
How to enter a nuclear reaction?
How to find a numerical antiderivative with NIntegrate methods?
How to draw one-line Venn diagram?
How to express permutation as the least number of exchanges
Remove mesh triangles in contour plot

How can I find a functional square root in Mathematica?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=227863

A functional square root of a function \(g\) is another function \(f\) such that \(g=f\circ f\). According to that article, there is a systematic approach to finding a functional square root that involves ...

asked by flinty https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72682 10 votes

answered by flinty https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72682 2 votes

The numerics of FresnelS[]

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=227893

Bug introduced in 12.1 or earlier and persisting through 12.1.1 or later [CASE:4615361]

Note: A worse problem existed in 12.0 for inputs greater than 8 and of precisions less than 43.66; 12.1 fixed ...

asked by Michael E2 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4999 9 votes

answered by J. M.’s technical difficulties https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=50 6 votes

How to enter a nuclear reaction?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=227846

Sometimes the simplest things are the most difficult, I need to make a presentation, and I thought to do it in Mathematica, I wanted to do a demonstration too, well...this is the Rutherford’s equation

asked by Chris Schwenke https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=65367 9 votes

answered by Bob Hanlon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9362 14 votes

How to find a numerical antiderivative with NIntegrate methods?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=227869

@JimBelk asked in Interpolating an Antiderivative how to find a numerical antiderivative. I gave an answer that uses NDSolve with the default method for integrating \(y'=f(x,y)\). However for ...

asked by Michael E2 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4999 8 votes

answered by Michael E2 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4999 9 votes

How to draw one-line Venn diagram?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=227990

This is the a list of set.

data = {{"A"}, {"J"}, {"Q"}, {"G", "H"}, {"I", "O"}, 
  {"B", "C", "E",  ...

asked by partida https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=15961 6 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 10 votes

How to express permutation as the least number of exchanges

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=227996

If there are grammatical or terminological errors in the following description, please help correct:

In some problems, it is necessary to find out what minimum number of exchanges can change a list ...

asked by Ordinary users68 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42417 5 votes

answered by Hausdorff https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73380 5 votes

Remove mesh triangles in contour plot

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=227837

How do I get rid of the mesh in this contour plot?

 ContourPlot[x^2 + y^2, {x, -10, 10}, {y, -10, 10}, 
    Contours -> {1.0, 4.0, 10.5}, ContourStyle -> None, 
    ContourShading ->  ...

asked by QuantumDot https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2048 5 votes

answered by Michael E2 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4999 6 votes

2.18.2 Greatest hits from previous weeks

How to create animated snowfall?
What does # mean in Mathematica?
Elegant operations on matrix rows and columns
Help find a bright object on Mars!
Plot, extract data to a file
Labeling individual curves in Mathematica
How to add a vertical line to a plot

How to create animated snowfall?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=16881

Well, the title is self-explanatory. What sorts of snowfall can we generate using Mathematica? There are two options I suggest to consider:

1) Continuous GIF animations with smallest possible number ...

asked by faleichik https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=219 39 votes

answered by Simon Woods https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=862 53 votes

What does # mean in Mathematica?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=19035

I asked Mathematica to compute the following

Solve[c (1-x)^2-x^(1/4) == 0, x] 
 
and it returned this: 
 
  x = Root[#1^8 c^4 - 8 #1^7 c^4 + 28 #1^6 c^4 - 56 #1^5 c^4 + 70 #1^4 c^4 - 56 #1^3 c^4 + 28  ...

asked by ronanymous https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5730 37 votes

answered by Dr. belisarius https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=193 63 votes

Elegant operations on matrix rows and columns

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3069

Question

The Mathematica tutorial has a section ’Basic Matrix Operations’, describing operations like transpose, inverse and determinant. These operations all work on entire matrices. I am missing a ...

asked by sjdh https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=515 179 votes

answered by Mr.Wizard https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=121 60 votes

Help find a bright object on Mars!

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=11819

In today’s news, scientists found a bright object on one of Curiosity’s photos (it’s near the bottom of the picture below). It’s a bit tricky to find - I actually spent quite some time staring at the ...

asked by Victor K. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1351 198 votes answered by Niki Estner https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=242 257 votes

Plot, extract data to a file

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=19859

I need to save data that Mathematica uses inside the Plot command. The format that I would like to have is:

x1 y1 
x2 y2

i.e. basically, two columns, x and y (sorted, if possible) so that I ...

asked by molkee https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5097 29 votes

answered by Mr.Wizard https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=121 46 votes

Labeling individual curves in Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=4444

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

asked by Tianxiang Xiong https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1041 62 votes

answered by Artes https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=184 46 votes

How to add a vertical line to a plot

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3561

In the plot below I would like to add two vertical lines at \(x = \frac {\pi }{15} \pm \frac {1}{20}\). How can I do that?

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

asked by sjdh https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=515 56 votes

answered by Ajasja https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=745 76 votes

2.18.3 Can you answer these questions?

Does MMA have a built-in function or a user-defined function to judge whether the two matrices are congruent
Symbolic solution to periodic boundary conditions
Collecting terms in NCAlgebra

Does MMA have a built-in function or a user-defined function to judge whether the two matrices are congruent

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=227756

It can be seen from the following relationship that matrix A and matrix B must be congruent matrices with each other:

A = {{1, 4, 4}, {5, 2, 2}, {3, 1, 3}}; 
B = EulerMatrix[{/4, 0,  ...

asked by Ordinary users68 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42417 3 votes

Symbolic solution to periodic boundary conditions

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=228028

Is it possible to get an analytical solution to the following problem? If so, how? \[a w^{(1,0)}(x,t)+b w^{(0,1)}(x,t)=p(x)+g w(x,t)\]

asked by Scott G https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=74062 1 vote

answered by Michael Seifert https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27813 0 votes

Collecting terms in NCAlgebra

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=227812

Let's say we have GP[v],GM[v]: two noncommutative objects depending on the commutative variable v. 
<< NC`; 
<< NCAlgebra`; 
SetCommutative[v]; 
SetNonCommutative[GP, GM] 
NCCollect[ 
 GM[v] **  ...

asked by Kawette https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=60529 1 vote

2.19 Thursday, July 23, 2020

2.19.1 Top new questions this week
2.19.2 Greatest hits from previous weeks
2.19.3 Can you answer these questions?

2.19.1 Top new questions this week

How to rewrite a tensor as a matrix
Breaking "Functional Loops" and Doing Lazy Evaluation In Mathematica
Hexadecimal bytes as variable converted to binary bits
Kernel starts up very slowly on Linux
How to decompose a list of n-tuples into a union of Cartesian products
Mathematica emits a beep after any evaluation - how to remove it?
Prony series with a large number of terms

How to rewrite a tensor as a matrix

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=226089 I put

{TensorProduct[{1, 0}, {0, 1}, {0, 1}, {0, 1}, {0, 1}]}/Sqrt[2]//MatrixForm 
and I got 
$$ 
\left( 
\begin{array}{cc} 
 \left( 
\begin{array}{cc} 
 \left( 
\begin{array}{cc} 
 0 & 0 \\ 
 0 & 0 \\

asked by Moeki https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73815 12 votes

answered by Suba Thomas https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5998 9 votes

Breaking "Functional Loops" and Doing Lazy Evaluation In Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=226334

Alright, so this is a question about the functional way to break a for/while loop. Since we’re on the Mathematica SE, I’m interested in the ways a Mathematica vet would handle this, however the ...

asked by dskeletov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34831 8 votes

answered by flinty https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72682 6 votes

Hexadecimal bytes as variable converted to binary bits

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=226171

I am working with hexadecimal bytes but need to shift them into lists of binary bits for a few operations and then back again. For example, I would like C12B to turn into ...

asked by toothandsticks https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73837 8 votes

answered by Hausdorff https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73380 9 votes

Kernel starts up very slowly on Linux

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=226128

V 12.1.1, starting a kernel, e.g. by entering wolframscript in the shell, takes 
an unexpectedly long time (~5 min, the time elapsed between pressing Enter and 
the showing-up of In[1] := ); but the  ...

asked by https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12924 8 votes

answered by Ordinary users68 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42417 5 votes

How to decompose a list of n-tuples into a union of Cartesian products

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=226294

I have a list with all elements at the same level

{ 
    {a, d}, {a, e}, {a, f}, 
    {b, d}, {b, e}, {b, f}, 
    {c, d}, {c, e}, {c, f}, 
    {x, t}, {x, q} 
}

How can I transform this to a list of ...

asked by Martin Leung https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73880 7 votes

answered by yarchik https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9469 4 votes

Mathematica emits a beep after any evaluation - how to remove it?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=226316

Without any obvious reason Mathematica started to emit a beep after each evaluation, even when it is error free. Why is that, and how can I turn it off? I tried restarting Mathematica to no avail, and ...

asked by Jxx https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=68480 6 votes

answered by Ordinary users68 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42417 6 votes

Prony series with a large number of terms

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=226327

A Prony series is similar to a Fourier series but can have fewer terms. It takes the form \(\sum _{i=1}^{M} A_i e^{\sigma _i t} \cos \left (\omega _i t+\phi _i\right )\) Note that unlike Fourier series ...

asked by Hugh https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12558 6 votes

2.19.2 Greatest hits from previous weeks

Is there an open source implementation of Mathematica-the-language?
Image processing: Floor plan - detecting rooms’ borders (area) and room names’ texts
How to make Jacobian automatically in Mathematica
Skip header lines on import
How to find the position of elements in a list satisfying criteria
How to make an inkblot?
How to generate a random snowflake

Is there an open source implementation of Mathematica-the-language?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=4454

I’ve seen questions before such as "What is the best open-source equivalent for Mathematica?", but that specific question (and that line of inquiry in general) cares more about the computer algebra ...

asked by sblom https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=178 121 votes

answered by Simon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34 83 votes

Image processing: Floor plan - detecting rooms’ borders (area) and room names’ texts

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=19546

Here is a simple building floor plan. I would like to derive the rooms as (rectangular) components and the names of the rooms. This is very common representation of building floor plans.

The ...

asked by s.s.o https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=840 63 votes

answered by Niki Estner https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=242 58 votes

How to make Jacobian automatically in Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=5790

If we have two vectors, \(a\) and \(b\), 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(

asked by George Mills https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1012 38 votes

answered by Jens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=245 50 votes

Skip header lines on import

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=50718

When importing a data file what are the comment symbols for Mathematica? That is, given a file like this

blabla bulbul

1 2 6 54 7 ...

what symbol do I have to put in front of header lines so ...

asked by MaxJ https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=14687 20 votes

answered by george2079 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2079 18 votes

How to find the position of elements in a list satisfying criteria

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=180

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, #>7&] gives the elements themselves, and Position[x,8] gives the  ...

asked by PeterR https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=140 65 votes

answered by J. M.’s technical difficulties https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=50 62 votes

How to make an inkblot?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3345

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___] :=  ...

asked by István Zachar https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=89 86 votes

answered by Sjoerd C. de Vries https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=57 51 votes

How to generate a random snowflake

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=39361

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

What is your best code for generating ...

asked by Peltio https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=6745 140 votes

answered by Silvia https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=17 181 votes

2.19.3 Can you answer these questions?

How to write this piece of code without AppendTo
Solving a cubic equation in mathematica
Using Select for lattice points

How to write this piece of code without AppendTo

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=226081

I am trying to fill a vector starting from component 11 from another vector, I use this code:

Do[AppendTo[xp, x[[i + 10]]], {i, 1, 99982}]

How can I fill xp without using ‘AppendTo’?

asked by mattiav27 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=8822 1 vote

Solving a cubic equation in mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=226231

I am trying to solve a cubic equation using Mathematica of a rather complicated expression say \(f(r,\beta ,\theta )\) , and in terms of \(r\) the maximum degree term that appears is of degree \(3\) so I ...

asked by Wubba lubba dub dub https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=70072 1 vote

Using Select for lattice points

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=226130

I know how to use Select to generate a list of numbers which satisfy a certain condition. However, I am not sure how to do this for points (specifically 2-tuples) rather than numbers. What I am trying ...

asked by Descartes Before the Horse https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=69355 1 vote

2.20 Thursday, July 16, 2020

2.20.1 Top new questions this week
2.20.2 Greatest hits from previous weeks
2.20.3 Can you answer these questions?

2.20.1 Top new questions this week

Reveal the formal PDE of FiniteElement
Drag and lift force acting on an airfoil
When is a symbol a Symbol? Is there an easy mathematica way to test if an object is a symbol sort of like a SymbolQ?
Using Regular Expression
Changing the color of the animate box
Bad linear fit for simple data
How to use each replacement only once in a list of replacements

Reveal the formal PDE of FiniteElement

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=225711

When FiniteElement method is used, the differential equations will first be transformed to certain standard form (named as formal PDE in recent FEM document), and it turns out to be critical to check ...

asked by xzczd https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1871 11 votes

answered by user21 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=18437 8 votes

Drag and lift force acting on an airfoil

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=225928

To calculate force acting on an airfoil we can use FEM with version 12 and over. Here we show an example with NACA2415. First we calculate mesh and potential flow:

ClearAll[NACA2415]; 
NACA2415[{m_,  ...

asked by Alex Trounev https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=58388 9 votes

answered by user21 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=18437 6 votes

When is a symbol a Symbol? Is there an easy mathematica way to test if an object is a symbol sort of like a SymbolQ?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=225811

Yes I know there is no built in native function called SymbolQ (but JavaScript does). However could one be simulated to work for most cases? I often rely

on objectName[symbol] and makeRuleRow[symbol]  ...

asked by Jules Manson https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=37721 9 votes

answered by Michael E2 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4999 8 votes

Using Regular Expression

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=225910

sample2 = "this is a test to find whether pi works for other words or not as well pi pi pi potatpi pineapple pi-neapple";

so sample2 is a string, and I want to search the word/substring ...

asked by Aryan https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73776 8 votes

answered by C. E. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=731 9 votes

Changing the color of the animate box

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=225941

Is there a way to change the coloring of the boxes that are generated by Animate or Manipulate? The color of what is gray by default.

Animate[ArrayPlot[CellularAutomaton[n, {{1}, 0}, {40, All}]], {n,  ...

asked by thinkingdude https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73139 8 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 9 votes

Bad linear fit for simple data

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=225985

I have some data :

data={{1.01074, 0.964488}, {1.08552, 0.993067}, {1.07907, 
  1.01836}, {1.0477, 1.03695}, {1.07717, 1.07973}, {1.10243, 
  1.08195}, {1.12669, 1.09112}, {1.09405, 1.09319},  ...

asked by J.A https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=58104 7 votes

answered by flinty https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72682 12 votes

How to use each replacement only once in a list of replacements

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=225929

I have a list of replacements and some list they are acting on. However, some RHS of the replacements rules are identical (the LHS is not). I want to use those rules one after another (perhaps cycling ...

asked by Kvothe https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=45020 7 votes

answered by Michael E2 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4999 5 votes

2.20.2 Greatest hits from previous weeks

Positioning axes labels
Generate a Unit Circle Trigonometry
Is there something like DensityPlot3D to visualize atomic orbitals?
Mathematica command that allows it to read my intentions
Does Mathematica 11 work with MacOS Catalina 10.15
Finding Limits in several variables
Parallel and perpendicular symbol from Mathematica to LaTeX

Positioning axes labels

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=87388

I need to change the position of my axes labels such that the y-axis label is in the middle and parallel to the y-axis. I’d also like the x-axis label to be in the middle of the x-axis rather than ...

asked by John_dydx https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7849 15 votes

answered by Virgil https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27697 16 votes

Generate a Unit Circle Trigonometry

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=2456

Struggling often with Trigonometry I would like to have some code to generate this Unit Circle Trigonometry. Would be of great help when I need to transform some data :

asked by 500 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=172 18 votes

answered by Mark McClure https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36 32 votes

Is there something like DensityPlot3D to visualize atomic orbitals?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=32378

I’m visualizing some hydrogen like atomic orbitals. For looking at plane slices of the probability density, the DensityPlot function works well, and with something like:

Manipulate[ 
 DensityPlot[  ...

asked by Peeter Joot https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=10 45 votes

answered by xslittlegrass https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1364 24 votes

Mathematica command that allows it to read my intentions

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=194384

In version 2.0 of Mathematica there was a command, ReadProgrammerIntentions[ ] which allowed it rapidly compose code that could solve problems simple to complex, based on my requirements. Understand ...

asked by MikeY https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=47314 52 votes

answered by MarcoB https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27951 38 votes

Does Mathematica 11 work with MacOS Catalina 10.15

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=207522

I just upgraded my macbook to 10.15 and could not open Mathematica 11. I am wondering are there any workarounds to use Mathematica 11 without upgrading to 12? Thank you!

asked by Jiang Xiang https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=16218 27 votes

answered by Itai Seggev https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4848 18 votes

Finding Limits in several variables

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=21544

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

\[\lim _{(x,y)\to (0,0)} f(x,y)\] with Mathematica?

When \(f\) is continuous, we can use \[\lim _{(x,y)\to (0,0)}\] ...

asked by Dominic Michaelis https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5899 31 votes

answered by whuber https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=91 42 votes

Parallel and perpendicular symbol from Mathematica to LaTeX

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=46538

I want to get the following expression from Mathematica to LaTeX:

\begin{bmatrix} 
E_{\parallel} \\ E_{\perp} 
\end{bmatrix}

I have tried to use inbuilt ’symbol’ character from the special ...

asked by Steve Hatcher https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=13314 18 votes

answered by Sjoerd C. de Vries https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=57 26 votes

2.20.3 Can you answer these questions?

Finding the domain in which a function is analytic with no imaginary part
Argmax - all maximizer positions
AceFEM MacOS not responding

Finding the domain in which a function is analytic with no imaginary part

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=225913

I was wondering if it is easy to see if a given expression evaluates to a real number in a given domain? Let e.g. \(f(x,y,z)\) be some function depending on three variables \(x,y,z\). I would like to know if ...

asked by CAF https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=30885 1 vote

Argmax - all maximizer positions

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=225980

Generally the Argmax function returns one position, where a function is maximized. Is there a easy way to obtain a list of rules for all maximizer points?

asked by Daniel Rehsmann https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73792 1 vote

answered by Bob Hanlon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9362 0 votes

AceFEM MacOS not responding

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=225678

I just upgraded to v7.114 of AceFEM running on MacOS 10.15.5 and Mathematica 12.0.0.0. I was running v7.101 without a problem. AceGEN seems to work but all AceFEM code starts but does nothing. The ...

asked by Andrew https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73727 1 vote

2.21 Thursday, July 9, 2020

2.21.1 Top new questions this week
2.21.2 Greatest hits from previous weeks
2.21.3 Can you answer these questions?

2.21.1 Top new questions this week

How to solve the Monty Hall problem?
Change Opacity along a ListLinePlot
Use Cases with empty cells in the list
Writing compiled functions as fast as Python’s Numba
Why are more highly nested lists often not more memory and time-intensive?
Correcting the Color Scale of a MatrixPlot
Verify an inequality of many parameters

How to solve the Monty Hall problem?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=225238

Problem For purely recreational purposes I would like to solve the Monty Hall problem with Mathematica using the function Probability (dedicated to the calculation of probabilities). About the Monty ...

asked by mlpo https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=11155 12 votes

answered by Sjoerd Smit https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=43522 16 votes

Change Opacity along a ListLinePlot

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=225337

I’m trying to change the opacity of a line in a ListLinePlot for increasing x-value. E.g. the line should have opacity 1 at beginning and shade than down to opacity along the line. I want to take the ...

asked by piolio https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73660 10 votes

answered by C. E. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=731 8 votes

Use Cases with empty cells in the list

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=225360

I work with a complex dataset. The most simple form of this list looks like:

dat1 = {{a, b, c, {}}, {d, e, f, {1}}, {h, i, j, {2}}} 
 
I want to select the nested {} part. 
Cases[dat1, {___, {a_}} :>  ...

asked by Michiel van Mens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9590 9 votes

answered by flinty https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72682 9 votes

Writing compiled functions as fast as Python’s Numba

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=225277

I want to write some code to simulate a damped oscillator that is just as fast as code written using Numba's @njit decorator. I’ve written the mathematica code and mine is 20-40x slower than the ...

asked by Diffycue https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46327 9 votes

answered by xzczd https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1871 16 votes

Why are more highly nested lists often not more memory and time-intensive?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=225540

I would expect more highly nested lists, being deeper and more complex than flatter lists, to take up more space (bytecount) and take more time and memory to operate on in general. Consider the ...

asked by Just Some Old Man https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12697 7 votes

answered by Henrik Schumacher https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=38178 10 votes

Correcting the Color Scale of a MatrixPlot

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=225186

I did a MatrixPlot of a set of values that range between 0 and 1. I got the following first plot with no problems:

As we can see from the legend, the values range between 0 and 1. Now, I am doing ...

asked by Naps https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73570 7 votes

answered by C. E. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=731 5 votes

Verify an inequality of many parameters

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=225380

I’ve got an inequality of 10 non-negative parameters (arising from a 5x5 matrix) and would like to verify whether it holds. I tried the following, which doesn’t seem to work:

asked by Vicky https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73675 6 votes

answered by flinty https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72682 4 votes

2.21.2 Greatest hits from previous weeks

How to calculate scalar curvature Ricci tensor and Christoffel symbols in Mathematica?
Figuring when the minute and hour hand coincide on a clock
xkcd-style Plots
Are you interested in purchasing David Wagner’s "Power programming with Mathematica"?
Parallel and perpendicular symbol from Mathematica to LaTeX
Mathematica Minecraft
Labeling individual curves in Mathematica

How to calculate scalar curvature Ricci tensor and Christoffel symbols in Mathematica?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=8895

I am seeking a convenient and effective way to calculate such geometric quantities. I’ve used packages like TensoriaCalc, but they don’t work at all time. Sometimes, I run into the following error:

asked by Zoe Rowa https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1713 38 votes

answered by Yi-Zen Chu https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4869 18 votes

Figuring when the minute and hour hand coincide on a clock

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=573

I would like to list all possible times in a 12-hour period, where the hour hand overlaps the minute hand completely. This is really a question about three distinct things - to be done in Mathematica ...

asked by Steve D https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=191 15 votes

answered by Verbeia https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=8 21 votes

xkcd-style Plots

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=11350

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

asked by Amatya https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2039 613 votes

answered by Simon Woods https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=862 472 votes

Are you interested in purchasing David Wagner’s "Power programming with Mathematica"?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=16485

I recently contacted McGraw-Hill to see if they have a mechanism in place for printing out-of-print books that are still of interest. Specifically, I asked about "Power programming with Mathematica" ...

asked by Todd Allen https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=249 158 votes

answered by Todd Allen https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=249 233 votes

Parallel and perpendicular symbol from Mathematica to LaTeX

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=46538

I want to get the following expression from Mathematica to LaTeX:

 
\begin{bmatrix} 
E_{\parallel} \\ E_{\perp} 
\end{bmatrix}

I have tried to use inbuilt ’symbol’ character from the special ...

asked by Steve Hatcher https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=13314 18 votes

answered by Sjoerd C. de Vries https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=57 26 votes

Mathematica Minecraft

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=19669

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

asked by faleichik https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=219 164 votes

answered by faleichik https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=219 234 votes

Labeling individual curves in Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=4444

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.

asked by Tianxiang Xiong https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1041 62 votes

answered by Artes https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=184 46 votes

2.21.3 Can you answer these questions?

How to include a meter in Manipulate that shows a value calculated from the manipulate dynamic variable?
Measuring the time remaining until completion for built in functions
creating uppertriangularized matrix

How to include a meter in Manipulate that shows a value calculated from the manipulate dynamic variable?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=225465

I’m trying to make a visualization of grid (representing magnetic states) and I want to include a meter that shows a variable calculated from the manipulate index

(of the form J1/J2 = (index)*0.1) so  ...

asked by mike1994 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73104 1 vote

Measuring the time remaining until completion for built in functions

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=225436

All of the functions in How to create a progress bar?, the ProgressIndicator built-in and Monitoring lengthy computations estimate the completion time for implementation of operations that are ...

asked by thinkingdude https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73139 1 vote

creating uppertriangularized matrix

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=225231

I am trying to create an uppertriangularized matrix of arbitrary size,max of the form

{{1,2,3,4,5},{0,1,2,3,4},{0,0,1,2,3},{0,0,0,1,2},{0,0,0,0,1}} 
 
using the code 
table = Table[mu^(j - 1)  ...

asked by Z Ming Ma https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=70345 1 vote

2.22 Thursday, July 2, 2020

2.22.1 Top new questions this week
2.22.2 Greatest hits from previous weeks
2.22.3 Can you answer these questions?

2.22.1 Top new questions this week

How to make a structured mesh with a hole and extrude it
How to NOT a specific pattern?
Ordering Problem With VoronoiMesh
Peculiar behaviour in the implementation of "Filling"
i_:0|1 varies in v12.1: incompatible change or bug?
Inverse of StringReplace
Intersection of 3 circles in GeometricScene

How to make a structured mesh with a hole and extrude it

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=224739

I am trying to use the FEMAddOns package to make a structured mesh with a hole and then extrude it. As a warm up example this worked nicely.

Needs["FEMAddOns`"] 
pts1 = Table[ 
  25. (  ...

asked by Hugh https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12558 14 votes

answered by Tim Laska https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=61809 13 votes

How to NOT a specific pattern?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=225008

been going around in cirlces on this:

{1/3, 1, 0.22, 3, "v", 4} /. _?NumericQ -> "999"

Now I’m trying to replace everything that is not a number; is there a way to do this? ...

asked by CuriousDudeFromEgypt https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=66462 10 votes

answered by Szabolcs https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12 13 votes

Ordering Problem With VoronoiMesh

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=224830

Imagine I want to model 2D cells moving in a tissue. Consider, as an example, Lloyd’s relaxation algorithm. Using VoronoiMesh I’m able to mimic some cell movement. Now, if I colour one of the cells in ...

asked by sam wolfe https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=64001 9 votes

answered by TumbiSapichu https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=53229 2 votes

Peculiar behaviour in the implementation of "Filling"

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=224907

I was working with mathematica and I need to use "Filling", however I notice that it doesn’t work when you have "small" numbers, for example if I make the following:

asked by Cruz https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=69573 9 votes

i_:0|1 varies in v12.1: incompatible change or bug?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=224987

Just check

i_: 0 | 1 // FullForm 
 
In v12.0 or earlier the output is 
Alternatives[Optional[Pattern[i, Blank[]], 0], 1] 
 
But in v12.1 the output becomes 
Optional[Pattern[i, Blank[]], Alternatives[0,  ...

asked by xzczd https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1871 9 votes

answered by Szabolcs https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12 9 votes

Inverse of StringReplace

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=225071

Suppose I have the following StringReplace rule

StringReplace[st, {"a" -> "0", "OverBar[a]" -> "1", "b" -> "1",

asked by math https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72358 8 votes

answered by Suba Thomas https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5998 8 votes

Intersection of 3 circles in GeometricScene

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=224874

I am trying to represent the image below in Mathematica and can’t seem to make it work. There doesn’t seem to be any constraint of type circle intersection in the documentation. I tried this:

asked by SorinS https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73427 8 votes

answered by SneezeFor16Min https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=69875 11 votes

2.22.2 Greatest hits from previous weeks

Why I get the "Set::write: "Tag Times in is Protected." error?
What are the most common pitfalls awaiting new users?
Is it possible to export the equations from Mathematica to MATLAB?
Generate a Unit Circle Trigonometry
How to find the position of elements in a list satisfying criteria
Get a "step-by-step" evaluation in Mathematica
Is there any algorithm that runs faster in Mathematica than in C or Fortran?

Why I get the "Set::write: "Tag Times in is Protected." error?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=11868

Why I get the error below with this code:

Needs["VectorAnalysis`"] 
 
 = 1000; 
g = 9.80665; 
 = 0.001; 
p[x_, y_, z_, t_] = {x^2, Sqrt[y], -z, t^3}; 
f[x_, y_, z_, t_] = {-x^2, Sqrt[y]/2, z, t^2}; 
 
  ...

asked by Aurelius https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1669 10 votes

answered by Mark McClure https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36 13 votes

What are the most common pitfalls awaiting new users?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=18393

As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...

asked by Dr. belisarius https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=193 462 votes

answered by Michael E2 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4999 279 votes

Is it possible to export the equations from Mathematica to MATLAB?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=14035

Is it possible to export the output expressions from Mathematica computations (e.g., equations) in valid MATLAB syntax?

asked by Seyhmus Güngören https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4256 41 votes

answered by rm -rf https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5 48 votes

Generate a Unit Circle Trigonometry

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=2456

Struggling often with Trigonometry I would like to have some code to generate this Unit Circle Trigonometry. Would be of great help when I need to transform some data :

asked by 500 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=172 18 votes

answered by Mark McClure https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36 32 votes

How to find the position of elements in a list satisfying criteria

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=180

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, #>7&] gives the elements themselves, and Position[x,8] gives the  ...

asked by PeterR https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=140 64 votes

answered by J. M.’s technical difficulties https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=50 62 votes

Get a "step-by-step" evaluation in Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=148

Is it possible in Mathematica to get a step-by-step evaluation of some functions; that’s to say, outputting not only the result but all the stages that have led to it? If so, how does one do it?

asked by Cydonia7 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=44 125 votes

answered by J. M.’s technical difficulties https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=50 105 votes

Is there any algorithm that runs faster in Mathematica than in C or Fortran?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=208045

I’m just curious. My friend just told me that Mathematica is mostly for symbolic calculation and not efficient for Numerical computations. He told me that’s the reason most of the people don’t use ...

asked by Gummala Navneeth https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=66938 44 votes

answered by Szabolcs https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12 73 votes

2.22.3 Can you answer these questions?

An apparent bug in Geometry‘ConvexHull2
When making a package, how can I make a function that is already used by system?
Simplifying expressions using elementary properties of integrals

An apparent bug in Geometry‘ConvexHull2

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=224966

I was replacing some usages of Geometry‘ConvexHull2 with ConvexHullMesh and found one of my tests failing. It turned out the test asserted an incorrect expected result that agrees with the result of ...

asked by Vladimir Reshetnikov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7288 1 vote

When making a package, how can I make a function that is already used by system?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=224730

Obviously, Plus[a,b] is given by Mathematica but say I have a package and I want to name a function Plus[a,b]. How can I go about making a new function without overwriting the original function ...

asked by Brandon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73362 2 votes

Simplifying expressions using elementary properties of integrals

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=225023

I want to be able to use Simplify (or FullSimplify) to simplify expressions involving, for example, sums of integrals, for instance turning \[ \int _a^b f(x)\,dx + \int _b^c f(x)\,dx \] into \[ \int _a^c\] ...

asked by Pillsy https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=531 2 votes

2.23 Thursday, June 25, 2020

2.23.1 Top new questions this week
2.23.2 Greatest hits from previous weeks
2.23.3 Can you answer these questions?

2.23.1 Top new questions this week

Version 12.1.1 unable to type ">"
Is there any better way to create a, a, a, b, b, b, b, b, c, c from a, 3, b, 5, c, 2?
Selecting lists where all are prime
Inverting replace direction
Calculate Radius of Curvature
Legendre expansion of the Dirac delta function
Which methods are available for NDEigensystem?

Version 12.1.1 unable to type ">"

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=224461

Bug introduced in 12.1.1

Since I upgraded to version 12.1.1 I am unable to use > (Shift+.). When I type Shift+. the cell that I am typing in converts to Python. What am I doing wrong?

Steps to ...

asked by wdacda https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27856 15 votes

answered by Mr.Wizard https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=121 10 votes

Is there any better way to create a, a, a, b, b, b, b, b, c, c from a, 3, b, 5, c, 2?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=224581

My attempt:

data = {{a, 3}, {b, 5}, {c, 2}}; 
 
output = Table[#[[1]], #[[2]]] & /@ data // Flatten 
 
{a, a, a, b, b, b, b, b, c, c}

asked by Too Fat Man No Neck https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42141 11 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 18 votes

Selecting lists where all are prime

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=224500

Given

    t={{7, 13, 19}, {13, 25, 37}, {19, 37, 55}, {25, 49, 73}, {31, 61, 91}, {37, 73, 109}} 
 
I want to select those lists where all three numbers are primes, so I should get 
{{7, 13, 19}, {37,  ...

asked by user57467 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=57467 9 votes

answered by Pillsy https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=531 12 votes

Inverting replace direction

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=224314

I just have a simple problem. I have a list such that,

rep = { a1 -> b1, a2 -> b2, a3 -> b3}; 
 
I want to invert replace direction such that, 
{ b1 -> a1, b2 -> a2, b3 -> a3}

asked by Saesun Kim https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=29998 8 votes

answered by PaulCommentary https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=54458 8 votes

Calculate Radius of Curvature

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=224269

I have a list of coordinates that make a near-parabolic graph, which I managed to fit and calculate the curvature. However, the curvature only outputs a equation. Is there any way to calculate the ...

asked by Char https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=66040 8 votes

answered by yarchik https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9469 11 votes

Legendre expansion of the Dirac delta function

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=224276

There is a known expansion for the Dirac delta function in the interval \( (-1, 1) \) in terms of the Legendre polynomials as

$$\delta(x) = \sum_{k = 0}^{\infty} (-1)^k \frac{(4k + 1) (2k)!}{2^{2k + 1}

asked by Novice https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72595 7 votes

answered by yarchik https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9469 11 votes

Which methods are available for NDEigensystem?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=224511

I am trying to find out what methods/options are available for NDEigensystem and descriptions of their use. Perusing the help, online Q&As, Mathematica’s in-line autofill, etc., I’ve found a few, ...

asked by Eli Lansey https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9 6 votes

answered by user21 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=18437 5 votes

2.23.2 Greatest hits from previous weeks

How can I save both the plot and the legend together?
Formatting legend text font
QR Code in shopping cart handle
Solving \(L=\frac {3}{2} \sqrt {4 \pi ^2 A^2+W^2}-\frac {\sqrt {5 W \sqrt {4 \pi ^2 A^2+W^2}+6 \pi ^2 A^2+3 W^2}}{\sqrt {2}}+\frac {3 W}{2}\) for \(W\)
1 Plot, 2 Scale/Axis
What are the most common pitfalls awaiting new users?
How to express trigonometric equation in terms of of given trigonometric function?

How can I save both the plot and the legend together?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=35653

In this example, how can I put the legend inside the graph? Currently, when I save the graph, only the graph is saved, not the legend.

Expr1 = -2 p + 1 
Expr2 = 2 p - 1 
Expr3 = p - 1/2 
Plot[{Expr1,  ...

asked by Mika Ike https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=6543 41 votes

answered by C. E. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=731 35 votes

Formatting legend text font

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3433

I am using this code to plot a graph, and I am trying to make the font of the legend bigger.

<<PlotLegends` 
ListLogLogPlot[{Sort[moby]}, PlotRange -> Full, Joined -> True,

asked by Julia https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=525 20 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 25 votes

QR Code in shopping cart handle

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=26268

This week, the market people from my work wanted to put QR codes in shopping cart handles, but when they tested it, the QR code did not work. I noted that the cylindrical curvature (even small) ...

asked by Murta https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2266 194 votes

answered by halirutan https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=187 190 votes

Solving \(L=\frac {3}{2} \sqrt {4 \pi ^2 A^2+W^2}-\frac {\sqrt {5 W \sqrt {4 \pi ^2 A^2+W^2}+6 \pi ^2 A^2+3 W^2}}{\sqrt {2}}+\frac {3 W}{2}\) for \(W\)

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=57763

When I solve the aforementioned equation for \(W\) or \(A\) on Mathematica I get a long and ugly equation in return, namely one of the solutions for \(W\) is: (attempt to read at your own health)

asked by J.D’Almbert https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=19257 8 votes

answered by Alexei Boulbitch https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=788 14 votes

1 Plot, 2 Scale/Axis

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=627

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

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

asked by 500 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=172 145 votes

answered by ArgentoSapiens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=92 149 votes

What are the most common pitfalls awaiting new users?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=18393

As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...

asked by Dr. belisarius https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=193 462 votes

answered by Michael E2 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4999 279 votes

How to express trigonometric equation in terms of of given trigonometric function?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=434

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]

asked by Prashant Bhate https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=99 30 votes

answered by Simon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34 37 votes

2.23.3 Can you answer these questions?

Using RegionPlot with NDSolve
Implementing binomial expansion of (non-commuting) matrices in Mathematica
Acquiring images from Zwo ASI camera in Mathematica Home Edition v 11.2.0.0

Using RegionPlot with NDSolve

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=224477

So I have a DE which has no analytical solution and thus solved using NDSolve, involving some parameters like this:

solution=NDSolve[{b/z[t]^4+a z'[t]+z''[t]==0,z[0]==3,z'[0]==3},z,{t,0,5}]

I was ...

asked by t-smart https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=53560 1 vote

Implementing binomial expansion of (non-commuting) matrices in Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=224402

Given two matrices \(A\) and \(B\), their Binomial expansion is, in general, given by (see this page) \((A+B)^n = \sum \limits _{k=0, k=n[2]}^n \Bigg ( \sum \limits _{r=0}^k \binom {k}{r} A^r B^{k-r} \Bigg )\) ...

asked by Rob https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=66809 1 vote

answered by flinty https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72682 0 votes

Acquiring images from Zwo ASI camera in Mathematica Home Edition v 11.2.0.0

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=224258

I plan to use a ZWO ASI planetary camera (USB connection) for astronomical photography and would like to control the image acquisition using Mathematica. The issue is that although I have installed ...

asked by Dave Baker https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73406 1 vote

2.24 Thursday, June 18, 2020

2.24.1 Top new questions this week
2.24.2 Greatest hits from previous weeks
2.24.3 Can you answer these questions?

2.24.1 Top new questions this week

Find second largest elements in list
The performance of AceFEM in Intel Processor VS. AMD Processor
Rendering PNG images to spline curves
Parallel computing: cores vs threads
Convert ConvexHull to Inequality
Multi-variable Fixed Point Iteration Command?
Unimport wolfram language package

Find second largest elements in list

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=223907

Given a list:

lis = {37.21, 37.21, 37.2, 44, 44, 44, 101, 101} 
 
What is a simple way to extract the second largest elements? 
 
In[]:= someFunction[lis] 
 
Out[]= {44, 44, 44}

asked by Conor Cosnett https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36681 14 votes

answered by Mr.Wizard https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=121 16 votes

The performance of AceFEM in Intel Processor VS. AMD Processor

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=224062

I am going to buy a new powerful desktop that I will use to run finite element simulations using AceFEM. I found out that the new AMD Ryzen 9 3950X obtained more points in the CPU Passmark benchmark ...

asked by KratosMath https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=53039 8 votes

answered by marko https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=48938 8 votes

Rendering PNG images to spline curves

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=223978

I found something interesting on this page (Generic contour smoothing with shading) that could help me improve my images. Unfortunately, they can only be used with graphics generated by the software ...

asked by LCarvalho https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=37895 8 votes

answered by flinty https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72682 9 votes

Parallel computing: cores vs threads

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=223899

I’m running Mathematica on a machine wtih 48 cores and 96 threads. I want to limit the number of threads the computation can have access to. If I give LaunchKernels[1] it correctly launches a single ...

asked by Paolo Pani https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73287 8 votes

answered by Mr.Wizard https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=121 9 votes

Convert ConvexHull to Inequality

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=223943

I have the following convex hull.

P0={0,0,0}; 
P1={1,0,0}; 
P2={0,1,0}; 
P3={0,0,1}; 
 
ConvexHullMesh[{P0,P1,P2,P3}]

Now I want the region algebraically as equality of the convex hull generated, in ...

asked by Sumit Banik https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=71940 7 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 9 votes

Multi-variable Fixed Point Iteration Command?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=223817

We want to find the zeros of a multi-dimensional function

  f[x_, y_] = {x + 1/4 (-Cos[x] + Sin[y]), x - y - Sin[y]/4}

To find the zeros, we can initialize and show the iterates using FindRoot

asked by Moo https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36141 7 votes

answered by flinty https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72682 7 votes

Unimport wolfram language package

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=224140

In Wolfram Language, Import["file.wl"] can import external wolfram package, Is it reversible? Can I unimport some packages? In other means Unset all the Function, Variable which is Set when ...

asked by Audra Jacot https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=67051 6 votes

answered by Szabolcs https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12 7 votes

2.24.2 Greatest hits from previous weeks

Positioning axes labels
Using Export[] sends the file where?
How to tell Mathematica that certain variables are real/imaginary, integer-valued, etc
Generate a Unit Circle Trigonometry
How to add a vertical line to a plot
Selecting every n-th element from a list
How to plot an ellipse?

Positioning axes labels

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=87388

I need to change the position of my axes labels such that the y-axis label is in the middle and parallel to the y-axis. I’d also like the x-axis label to be in the middle of the x-axis rather than ...

asked by John_dydx https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7849 15 votes

answered by Virgil https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27697 16 votes

Using Export[] sends the file where?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=8586

I am trying to use the Export command to convert a list of plots into a *.gif file, and the command runs and executes well, but I can’t find the file! Where is it supposed to go? Did it even work?

asked by Patrick Da Silva https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1785 37 votes

answered by Vitaliy Kaurov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=13 51 votes

How to tell Mathematica that certain variables are real/imaginary, integer-valued, etc

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=66273

I’m trying to expedite some quantum mechanical calculations (expectation values etc.) by running them through Mathematica. When I say, for example,

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

and then ...

asked by Matthew Brunetti https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=22304 36 votes

answered by SquareOne https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=19960 22 votes

Generate a Unit Circle Trigonometry

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=2456

Struggling often with Trigonometry I would like to have some code to generate this Unit Circle Trigonometry. Would be of great help when I need to transform some data :

asked by 500 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=172 18 votes

answered by Mark McClure https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36 32 votes

How to add a vertical line to a plot

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3561

In the plot below I would like to add two vertical lines at \(x = \frac {\pi }{15} \pm \frac {1}{20}\). How can I do that?

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

asked by sjdh https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=515 54 votes

answered by Ajasja https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=745 75 votes

Selecting every n-th element from a list

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=64003

I have a list:

data = {4, 5, 7, 8, 9, 5, 3, 2, 1, 2, 13, 12}; 
 
I want to take those elements in the list which are located at equal distances, 
say, every third element, getting the list {7, 5, 1,  ...

asked by Suro https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=20003 34 votes

How to plot an ellipse?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=20100

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 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=6075 17 votes

answered by Jens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=245 29 votes

2.24.3 Can you answer these questions?

Export Large Sparse Matrix As .mtx File
What are "VariableReplacementDump" and "TranscendentalDump"?
Why doesn’t Mathematica provide an answer while Wolfram|Alpha does, concerning a series convergence?

Export Large Sparse Matrix As .mtx File

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=223991

I’m trying to export a large sparse matrix of dimension 1164960 by 1164960 with 17815680 elements as an .mtx file so I can import it into Python. I first the run the following code successfully.

asked by Daniel Berkowitz https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27536 1 vote

What are "VariableReplacementDump" and "TranscendentalDump"?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=223879

I have run into a Mathematica object I’ve never seen before and Googling those reveals nothing. I’m talking about VariableReplacementDump and TranscendentalDump. Here’s how I got these:

asked by Lokdal https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=23117 1 vote

Why doesn’t Mathematica provide an answer while Wolfram|Alpha does, concerning a series convergence?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=224072

Among other series I’ve been working on, I was asked to find whether \[\sum _n 1-\cos (\frac {\pi }{n})\] converged, and Mathematica’s output to

SumConvergence[1 - Cos[Pi/n], n] simply was repeating the  ...

asked by Hal https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73083 1 vote

2.25 Thursday, June 4, 2020

2.25.1 Top new questions this week
2.25.2 Greatest hits from previous weeks
2.25.3 Can you answer these questions?

2.25.1 Top new questions this week

Find if there are consecutive 1s in a binary representation of a number
Why do some PlotThemes not work with Mesh as expected? What can be done about it?
How can I replace a set of Nested For Loops with a Functional Code Alternative?
How to construct this matrix in Mathematica
Rewriting partitions using exponents
What is the difference between a variable and a "slot variable"?
Efficiently populate sparse matrix with band structure

Find if there are consecutive 1s in a binary representation of a number

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=223087

Given a list of numbers in decimal form, what is the most efficient way to determine if there are any consecutive 1s in the binary forms of those numbers? My solution so far:

dim = 3; 
declist =  ...

asked by KHAAAAAAAAN https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=65587 10 votes

answered by MassDefect https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42264 10 votes

Why do some PlotThemes not work with Mesh as expected? What can be done about it?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=223159

While updating my answer for (189038) I noted that some PlotThemes do not work with Mesh in a meaningful way:

SeedRandom["08.01.2019"]; 
$plotThemes = Map[ToString] @ { Web, Monochrome, Detailed,  ...

asked by gwr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=764 9 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 10 votes

How can I replace a set of Nested For Loops with a Functional Code Alternative?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=223023

Despite having looked over various posts concerning optimizing nested For loop expressions into a functional programming equivalent I still can not figure out how to actually to do this. Such ...

asked by Stuart Poss https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=35282 8 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 7 votes

How to construct this matrix in Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222895

I create a symbolic matrix using the following:

mat = ToExpression[Table[StringJoin[{"s", ToString[i], ToString[j]}], {i, 1, d}, {j, 1, d}]]

for arbitrary \(d\). Notice that for \(d=2\), this gives

asked by Sid https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=26461 8 votes

answered by Edmund https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=19542 6 votes

Rewriting partitions using exponents

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222950

I’m looking for a way to re-express a partition given in full form, like \(\{{2, 2, 1, 1}\}\), into the shortened form \(\{2^2, 1^2\}\), i.e. given a partition with repeated entries, count the number of ...

asked by ZeroTheHero https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=52937 7 votes

answered by kirma https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=3056 7 votes

What is the difference between a variable and a "slot variable"?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222964

Investigating Function[] , I found:

What is the difference between using a variable (in the case, \(u\)) and a "slot variable"? It seems anything can be done with both. Is there something that ...

asked by Billy Rubina https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=603 7 votes

answered by MarcoB https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27951 9 votes

Efficiently populate sparse matrix with band structure

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222924

I’m trying to efficiently populate elements of a very large (2^20 x 2^20) symmetric matrix with 1s - luckily the matrix is very sparse, <0.1the matrix has a very well defined ...

asked by KHAAAAAAAAN https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=65587 7 votes

answered by Henrik Schumacher https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=38178 8 votes

2.25.2 Greatest hits from previous weeks

Is there something like DensityPlot3D to visualize atomic orbitals?
How to find integer solutions?
How can I plot the direction field for a differential equation?
Calculate the 2D Fourier transform of an Image
How do I draw a pair of buttocks?
Elegant operations on matrix rows and columns
Finding Limits in several variables

Is there something like DensityPlot3D to visualize atomic orbitals?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=32378

I’m visualizing some hydrogen like atomic orbitals. For looking at plane slices of the probability density, the DensityPlot function works well, and with something like:

Manipulate[ 
 DensityPlot[  ...

asked by Peeter Joot https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=10 44 votes

answered by xslittlegrass https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1364 24 votes

How to find integer solutions?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=42359

Following is the equation:

Need to solve for integer values of x,y when a,b lies between -1000 and 1000. Problem is to find the number of integer values of pair (x,y) that satisfy it.

asked by Sahil Sareen https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12396 2 votes

answered by bill s https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1783 4 votes

How can I plot the direction field for a differential equation?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=8841

I’d like to plot the graph of the direction field for a differential equation, to get a feel for it. I’m a novice, right now, when it comes to plotting in Mathematica, so I’m hoping that someone can ...

asked by Matt Groff https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1735 29 votes

answered by Peter Breitfeld https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=307 24 votes

Calculate the 2D Fourier transform of an Image

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=29203

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 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=8727 14 votes

answered by Nasser https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=70 32 votes

How do I draw a pair of buttocks?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=66538

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

asked by Simpleton Jack https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=22399 287 votes

answered by mikuszefski https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7608 440 votes

Elegant operations on matrix rows and columns

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3069

Question

The Mathematica tutorial has a section ’Basic Matrix Operations’, describing operations like transpose, inverse and determinant. These operations all work on entire matrices. I am missing a ...

asked by sjdh https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=515 177 votes

answered by Mr.Wizard https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=121 60 votes

Finding Limits in several variables

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=21544

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

\[\lim _{(x,y)\to (0,0)} f(x,y)\] with Mathematica?

When \(f\) is continuous, we can use

\[\lim _{(x,y)\to (0,0)}\] ...

asked by Dominic Michaelis https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5899 30 votes

answered by whuber https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=91 41 votes

2.25.3 Can you answer these questions?

How to plot a characteristic curve for silicon diode
GetProcessMemoryInfo
Solving PDE IVP with inequalities in domains

How to plot a characteristic curve for silicon diode

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=223212

There is a figure given that shows the relation between Forward current(y axis) and forward Voltage (x axis ) for a forward biased diode, with the given formula

asked by Haneen Hussam https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73068 1 vote

answered by MarcoB https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27951 0 votes

GetProcessMemoryInfo

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=223025

The GetProcessMemoryInfo from psapi.dll is a helpful function that can be used to monitor the memory wolframkernel.exe used, where how much memory can be used and is actually used by wolframkernel is ...

asked by Frank https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=8207 1 vote

answered by Frank https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=8207 0 votes

Solving PDE IVP with inequalities in domains

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=223155

I want to solve the following problem in Mathematica:

I used the following Mathematica code. I am unsure whether this is the correct way of entering the assumptions for the initial and boundary ...

asked by Leponzo https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=60411 1 vote

2.26 Thursday, May 28, 2020

2.26.1 Top new questions this week
2.26.2 Greatest hits from previous weeks
2.26.3 Can you answer these questions?

2.26.1 Top new questions this week

PlusMinus definition unexpectedly affects plotting
Can someone boost even more my code?
Why does NMaximize miss this global maximum?
How to break the x axis of a plot?
How to pick consecutive numbers from list?
Multiply each element of second position of two list
Area/Volume of a 2D/3D object as it is filled up with water

PlusMinus definition unexpectedly affects plotting

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222380

In version 10.1 I found a strange Plot behavior I did not anticipate. It seems that various heads including PlusMinus are treated as wrappers and stripped by Plot in a way that is not safe. This ...

asked by Mr.Wizard https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=121 12 votes

answered by Mr.Wizard https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=121 12 votes

Can someone boost even more my code?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222464

UPDATE

As suggested by Roman, I’ve included here all my code.

I’m using just bult-in function and compile to boost my code, but I think that it can be better. My code looks like

 
    nof = 30; 
     ...

asked by Magela https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=68365 11 votes

answered by Henrik Schumacher https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=38178 19 votes

Why does NMaximize miss this global maximum?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222716

I am having trouble maximizing a function which appears as a curvature of a planar curve.

{tmin, tmax} = {0, 2 Pi} 
 
f = -((6-3 Cos[t] - Cos[3 t])/((-11+6 Cos[t] + 8 Cos[2 t] - 6 Cos[3 t] + Cos[4 t]) 
  ...

asked by A. Kato https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=62063 8 votes

answered by Michael E2 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4999 12 votes

How to break the x axis of a plot?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222517

I have the following data from which I get an interpolation:

SPE = Interpolation[{{0, 4.08}, {0.5, 9}, {1.5, 12}, {5, 0.158}, {10, 
     0.158}, {15, 0.415}, {20, 0.802}, {30, 2.64}, {40, 4.99}, {60,  ...

asked by mattiav27 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=8822 8 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 7 votes

How to pick consecutive numbers from list?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222407

Question is very simple. If we have

tst = {2,3,4,6,7,9,11} 
 
result must be 
 
{{2,3,4}, {6,7}, {9}, {11}} 
 
 
There are similar questions, but not exact. 
 
My best solution is: 
 
myFun[arr_] :=  ...

asked by lesobrod https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5950 8 votes

answered by J. M.’s technical difficulties https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=50 14 votes

Multiply each element of second position of two list

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222548

If I have two list such as:

list1 = {{40., 7.50551*10^-10}, {40.,7.50557*10^-10}, {40.,7.50566*10^-10}, 
         {40.0001, 7.50578*10^-10}, {40.0001, 7.50591*10^-10},{40.0001, 7.50607*10^-10}, 
        ...

asked by John https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72900 7 votes

answered by David Keith https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=44700 7 votes

Area/Volume of a 2D/3D object as it is filled up with water

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222837

How could I get the volume of water on a region as it is filled up with water from below? Assume gravity points in some appropriate downward axis like y (or z in 3D) so the water fills upward from ...

asked by flinty https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72682 6 votes

2.26.2 Greatest hits from previous weeks

Plotting the frequency spectrum of a data series using Fourier
Generate a Unit Circle Trigonometry
Figuring when the minute and hour hand coincide on a clock
Formatting legend text font
How do I clear all user defined symbols?
How to calculate contour integrals with Mathematica?
Calling Correct Function for Plotting DiracDelta

Plotting the frequency spectrum of a data series using Fourier

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=18082

testData = Table[N@Sin[500 x], {x, 0, 100}]; 
ListLinePlot[Abs[Fourier[testData]], PlotRange -> Full] 
 
Gives me 
 
Which I do not expect because the Fourier Transform is FourierTransform[Sin[500  ...

asked by C. E. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=731 14 votes

answered by KennyColnago https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=3246 16 votes

Generate a Unit Circle Trigonometry

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=2456

Struggling often with Trigonometry I would like to have some code to generate this Unit Circle Trigonometry. Would be of great help when I need to transform some data :

asked by 500 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=172 18 votes

answered by Mark McClure https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36 32 votes

Figuring when the minute and hour hand coincide on a clock

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=573

I would like to list all possible times in a 12-hour period, where the hour hand overlaps the minute hand completely. This is really a question about three distinct things - to be done in Mathematica ...

asked by Steve D https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=191 15 votes

answered by Verbeia https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=8 21 votes

Formatting legend text font

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3433

I am using this code to plot a graph, and I am trying to make the font of the legend bigger.

<<PlotLegends` 
ListLogLogPlot[{Sort[moby]}, PlotRange -> Full, Joined -> True, 
     ...

asked by Julia https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=525 20 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 25 votes

How do I clear all user defined symbols?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=850

Is there some way to do this other than going to 
Evaluation -> Quit kernel and firing a new one up?

asked by niklasfi https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=82 95 votes

answered by Artes https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=184 92 votes

How to calculate contour integrals with Mathematica?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=34073

How to calculate the integral of \(\frac {1}{\sqrt {4 z^2 + 4 z + 3}}\) over the unit circle counterclockwise for each branch of the integrand?

asked by user64494 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7152 40 votes

answered by Artes https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=184 63 votes

Calling Correct Function for Plotting DiracDelta

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3506

I am wondering what is the correct function in Mathematica to plot the true impulse function, better known as the DiracDelta\[\] function. When using this inside of a function or just the function ...

asked by night owl https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=116 17 votes

answered by Heike https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46 19 votes

2.26.3 Can you answer these questions?

Natural deduction with FindEquationalProof
NDSolve very slow
Change Font and Size of Print[] output

Natural deduction with FindEquationalProof

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222577

Out of curiosity, I’m trying to implement a natural deduction prover in Mathematica using FindEquationalProof. So far, I’ve implemented a few of the easier rules:

axioms = { 
  ForAll[{A, B},  ...

asked by imas145 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=61387 1 vote

NDSolve very slow

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222571

I am trying to run this code to get the output from NDSolve for 4 dynamical equations. However, I have two issues:

(1) It is taking a very long time (can reach several hours for a given instance) ...

asked by user135626 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=19550 2 votes

Change Font and Size of Print[] output

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222504

I managed to create a definition for the "Print" style, following the instructions here. However, the result does not work in my v.12.1. On the plus side, a "Print" entry exists at the bottom of the ...

asked by Nicholas G https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=43662 1 vote

2.27 Thursday, May 21, 2020

2.27.1 Top new questions this week
2.27.2 Greatest hits from previous weeks
2.27.3 Can you answer these questions?

2.27.1 Top new questions this week

How to clear all definitions matching f[1, ...] but not f[2, ...]?
Rescaling data to make a "continuous" function
Why does Mathematica ignore 1 as an exponent? Or as a coefficient?
How to add ’border’ to Voronoi diagram
Contracting indices in lists
How to extract all possible sub-products which match specific pattern?
Raytracing using Regions & NSolve

How to clear all definitions matching f[1, ...] but not f[2, ...]?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222002

I would like to clear all definitions of the form f[1,...] in such a way that f[2,...] remain unaffected.

The two methods I know to clear variables don’t seem to apply to this situation:

Pattern

asked by WillG https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=59634 10 votes

answered by Simon Woods https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=862 15 votes

Rescaling data to make a "continuous" function

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222252

I have acquired many sets of data, which all represent a single function, but which are randomly rescaled by a constant (due to the measurement specifics). I’m looking to effectively stitch them ...

asked by ChaSta https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=48457 9 votes

answered by aooiiii https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=68990 7 votes

Why does Mathematica ignore 1 as an exponent? Or as a coefficient?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221934

Two different examples of same problem:

 
In: Cases[{f^2, g^3, k^p, h}, x_^n_ -> n] 
 
Out: {2,3,p}     # The result misses the exponen of h, '1'

The same problem in a different context:

asked by MaxB https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=66077 8 votes

answered by Nasser https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=70 11 votes

How to add ’border’ to Voronoi diagram

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221984

Suppose I have a set of points pts, from which I generate a Voronoi diagram VD:

pts = RandomReal[{-1, 1}, {100, 2}]; 
VD = Show[VoronoiMesh[pts], Graphics[{Red, Point[pts]}]] 
 
Now, as per the  ...

asked by TumbiSapichu https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=53229 7 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 7 votes

Contracting indices in lists

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222037

Using an answer to this question (Working with Dirac Gamma Matrices using FeynCalc - A simple problem), I defined

Clear[] 
SetAttributes[, Listable] 
[_] := If[ == 0, KroneckerProduct @@  ...

asked by FB20 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72314 6 votes

answered by Chanto https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=35091 4 votes

How to extract all possible sub-products which match specific pattern?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222285

I have an expression of the form

expr = 3*(a.b)*(c.d)*f[x] + 5*(m.n)*(p.q)*(r.s)*f[y] 
 
and want to extract all possible subexpressions matching the pattern ((_).(_))*f[_]. 
Expected result (in  ...

asked by Shadowray https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=47416 6 votes

answered by Marius Ladegård Meyer https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=22099 7 votes

Raytracing using Regions & NSolve

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222105

I want to use geometric shapes in Mathematica to build complex shapes and use my raytracing algorithm on it. I have a working example where we can get the intersections from a combination of a Cone[] ...

asked by Tomi https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36939 6 votes

answered by Tim Laska https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=61809 5 votes

2.27.2 Greatest hits from previous weeks

Help find a bright object on Mars!
Figuring when the minute and hour hand coincide on a clock
How to perform a multi-peak fitting?
Using Export[] sends the file where?
Can Mathematica do symbolic linear algebra?
Assign the results from a Solve to variable(s)
Creating a table/Matrix during a For loop

Help find a bright object on Mars!

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=11819

In today’s news, scientists found a bright object on one of Curiosity’s photos (it’s near the bottom of the picture below). It’s a bit tricky to find - I actually spent quite some time staring at the ...

asked by Victor K. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1351 197 votes

answered by Niki Estner https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=242 255 votes

Figuring when the minute and hour hand coincide on a clock

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=573

I would like to list all possible times in a 12-hour period, where the hour hand overlaps the minute hand completely. This is really a question about three distinct things - to be done in Mathematica ...

asked by Steve D https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=191 15 votes

answered by Verbeia https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=8 21 votes

How to perform a multi-peak fitting?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=26336

I am wondering how to implement the multi-peak detecting and fitting in Mathematica. Following is an example of fitting the data using three peaks (such that the data ~ peak1 + peak2 + peak3).

asked by Everett You https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1389 54 votes

answered by Silvia https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=17 54 votes

Using Export[] sends the file where?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=8586

I am trying to use the Export command to convert a list of plots into a *.gif file, and the command runs and executes well, but I can’t find the file! Where is it supposed to go? Did it even work?

asked by Patrick Da Silva https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1785 37 votes

answered by Vitaliy Kaurov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=13 49 votes

Can Mathematica do symbolic linear algebra?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3242

For instance, is there some way I can say "let A and B be arbitrary real \(m\times n\) and \(k\times m\) matrices, Simplify[Transpose[Transpose[A].Transpose[B]]]" and Mathematica would simplify it to B.A?

asked by Niki Estner https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=242 61 votes

Assign the results from a Solve to variable(s)

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=6669

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?

asked by stevenvh https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1450 52 votes

answered by Artes https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=184 33 votes

Creating a table/Matrix during a For loop

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=2930

I have a For loop (with i as a counter), which calculates different values (y1, y2, y3,...) as a function of the variable x. How can I create a table/matrix which contains i lines, each line ...

asked by Solarboy https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=727 10 votes

answered by Mr.Wizard https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=121 14 votes

2.27.3 Can you answer these questions?

Computations with OptimizedExpressions without completely expanding them
LeviCivitaTensor contraction indices
Using Fold[ or Map[ Better?

Computations with OptimizedExpressions without completely expanding them

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221938

I have to manipulate huge expressions that are rational functions of many (30) variables with integer coefficients. Storing them just as a ratio of two polynomials would be impractical. But they can ...

asked by Vladimir Reshetnikov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7288 2 votes

LeviCivitaTensor contraction indices

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=222179

apparently my computer has problems when I try to perform a calculation with TensorContract.

In particular, with the second answer to my previous question Contracting indices in lists, I want to ...

asked by FB20 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72314 1 vote

Using Fold[ or Map[ Better?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221941

I’m working through MMA Cookbook by Mangano, page 54. He shows Map is a compact form of Fold function. Is using Fold function important?

myMap3[f_, l_] := Fold[Prepend[#1, f[#2]]&, {}, l]

asked by code9910743 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=59860 2 votes

2.28 Thursday, May 14, 2020

2.28.1 Top new questions this week
2.28.2 Greatest hits from previous weeks
2.28.3 Can you answer these questions?

2.28.1 Top new questions this week

What causes Module variables to leak?
Looping through all functions defined in Mathematica
Solver for COVID-19 epidemic model with the Caputo fractional derivatives
Possible bug in finite sum over inverse squares \(\sum \limits _{i=1}^n \frac {1}{(x (n-i)+i)^2}\)
Removing banal words from a list
How to reproduce Wolfram Language’s base64 encoded string with command-line tool?
Does the following change to MKL environment variable boost Mathematica speed on AMD CPUs

What causes Module variables to leak?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221436

Sometimes, after writing code like

f[] := Module[{a}, ...] 
 
and running f[] multiple times, there will be many Temporary symbols of the form a$123 in 
the Global namespace. Sometimes this happens  ...

asked by Szabolcs https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12 25 votes

answered by Leonid Shifrin https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=81 22 votes

Looping through all functions defined in Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221555

Is there a way to loop through all the Functions (Elementary and Special functions) that exist in Mathematica?

I want to construct a table of some identities and maybe I can discover something ...

asked by Micha Kuczynski https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72609 12 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 13 votes

Solver for COVID-19 epidemic model with the Caputo fractional derivatives

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221609

As it is known in biological system with memory it would be suitable to use fractional derivatives to describe evolution of the system. In a current version of Mathematica 12.1 there is no special ...

asked by Alex Trounev https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=58388 10 votes

Possible bug in finite sum over inverse squares \(\sum \limits _{i=1}^n \frac {1}{(x (n-i)+i)^2}\)

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221373

Revisiting the problem Limit of partial sums involving inverse squares I found another difficulty with Sum[]

Consider this sum

s[x_, n_] :=  Sum[ 1/(i + (n - i) x)^2, {i, 1, n}] 
 
Here we assume x  ...

asked by Dr. Wolfgang Hintze https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=16361 10 votes

answered by Soner https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=49198 13 votes

Removing banal words from a list

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221540

NB: I am aware of the DeleteStopwords symbol.

I want to remove from a list of words the ones that are likely to be more banal. So for instance if we have

{"exegesis", "mystification", "bread",  ...

asked by Diffycue https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46327 9 votes

answered by Vitaliy Kaurov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=13 10 votes

How to reproduce Wolfram Language’s base64 encoded string with command-line tool?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221381

With Wolfram Language:

In[7]:= ExportString["foobar", "Base64"] 
 
Out[7]= "Zm9vYmFyXDo0ZTJkXDo2NTg3" 
 
 
With the closest command-line software I could think of 
 
echo -n 'foobar' | openssl base64     ...

asked by qazwsx https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=357 9 votes

answered by Jason B. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9490 17 votes

Does the following change to MKL environment variable boost Mathematica speed on AMD CPUs

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221767

I personally do not have an AMD CPU but since they are literally becoming quite hot these days, I thought whether the following fix (as proposed here: ...

asked by Ali Hashmi https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27331 7 votes

answered by ilian https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=145 9 votes

2.28.2 Greatest hits from previous weeks

Multivariable Taylor expansion does not work as expected
How to calculate scalar curvature Ricci tensor and Christoffel symbols in Mathematica?
How to create effect like Van Gogh’s stroke brush?
How to perform a multi-peak fitting?
What are the most common pitfalls awaiting new users?
How to find integer solutions?
LaTeXand Mathematica

Multivariable Taylor expansion does not work as expected

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=15023

The basic multivariable Taylor expansion formula around a point is as follows:

$$ 
f(\mathbf r + \mathbf a) = f(\mathbf r) + (\mathbf a \cdot \nabla )f(\mathbf r) + \frac{1}{2!}(\mathbf a \cdot  ...

asked by matheorem https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4742 55 votes

answered by Jens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=245 61 votes

How to calculate scalar curvature Ricci tensor and Christoffel symbols in Mathematica?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=8895

I am seeking a convenient and effective way to calculate such geometric quantities. I’ve used packages like TensoriaCalc, but they don’t work at all time. Sometimes, I run into the following error:

asked by Zoe Rowa https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1713 36 votes

answered by Yi-Zen Chu https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4869 17 votes

How to create effect like Van Gogh’s stroke brush?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=39003

I need to apply Van Gogh’s stroke brush effect to a random image

Take the following image as an example:

Thank you so much if you could help!

asked by user10495 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=10495 33 votes

answered by Simon Woods https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=862 51 votes

How to perform a multi-peak fitting?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=26336

I am wondering how to implement the multi-peak detecting and fitting in Mathematica. Following is an example of fitting the data using three peaks (such that the data ~ peak1 + peak2 + peak3).

The ...

asked by Everett You https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1389 54 votes

answered by Silvia https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=17 54 votes

What are the most common pitfalls awaiting new users?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=18393

As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...

asked by Dr. belisarius https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=193 460 votes

answered by Michael E2 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4999 277 votes

How to find integer solutions?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=42359

Following is the equation:

Need to solve for integer values of x,y when a,b lies between -1000 and 1000. Problem is to find the number of integer values of pair (x,y) that satisfy it.

asked by Sahil Sareen https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12396 2 votes

answered by bill s https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1783 4 votes

LaTeXand Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=736

I quite often would like to draw graphics in my LaTeXdocuments using Mathematica. I have encountered three problems. I would like to know if there are any workarounds to these problems

I would ...

asked by Thomas Rot https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=227 124 votes

answered by Simon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34 45 votes

2.28.3 Can you answer these questions?

Construct a binary tree where nodes are labeled according to given rule
How to get proper TeX output from splicing the following file?
Application of spatially varying boundary conditions and source term in AceFEM

Construct a binary tree where nodes are labeled according to given rule

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221405

I want to plot a binary tree in Mathematica where the nodes are labeled according to a given rule. In fact, whether a node has a left child or a right child or both, will be determined by a rule. And ...

asked by Mwen Rele https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72568 1 vote

answered by Szabolcs https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12 0 votes

How to get proper TeX output from splicing the following file?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221414

In order to let other users with Mathematica 12.x test this problem for me, I now use FileTemplate instead of Splice.

I want to splice (with FileTemplate) the following file that has been simplified ...

asked by Money Oriented Programmer https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42141 1 vote

Application of spatially varying boundary conditions and source term in AceFEM

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221489

I am trying to model a simple 2D steady state heat conduction problem using automatically generated Q2 elements.

The problem consists of a square domain with prescribed temperatures along the bottom ...

asked by DvanHuyssteen https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=69831 1 vote

2.29 Thursday, May 7, 2020

2.29.1 Top new questions this week
2.29.2 Greatest hits from previous weeks
2.29.3 Can you answer these questions?

2.29.1 Top new questions this week

‘Count‘ for ‘SparseArray‘
What is the best and most efficient way to curry?
Mathematica and Excel
Local variables in sums and tables - best practices?
How can I make Mathematica solve this set of four equations?
obtain properly formatted code from autogenerated package
Why is StreamPlot plotting direction like this?

‘Count‘ for ‘SparseArray‘

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221160

Why does Count not work with SparseArrays, and is there any function I can use to replace it?

What would be an efficient workaround?

Example:

a=ConstantArray[0,{10},SparseArray]; 
Count[a,0] (*  ...

asked by Daniel https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=19534 9 votes

answered by thorimur https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=63584 8 votes

What is the best and most efficient way to curry?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=220972

Suppose I have a function with a signature like g[expr, _?(f), {1}, Heads -> False] 
and I want to access it as an operator by giving the first argument last. 
I see there are various ways of doing  ...

asked by user13892 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=13892 9 votes

Mathematica and Excel

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221155

I have a number of large data sets in Excel and .dat from OMEdit Modelica that then need to import some or all of it to Mathematica for manipulation and plotting. Importing the data is easy enough ...

asked by Chris B https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=58764 8 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 10 votes

Local variables in sums and tables - best practices?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221079

Stumbled on Local variables when defining function in Mathematica in math.SE and decided to ask it here. Apologies if it is a duplicate - the only really relevant question with a detailed answer I ...

asked by https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=35000 8 votes

answered by WReach https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=142 5 votes

How can I make Mathematica solve this set of four equations?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221082

I use Mathematica version 12.1 on Windows 10.

I have four equations in four unknowns.

Is there a trick to make Mathematica solve these?

I tried Solve and NSolve and it is not able to do it. ...

asked by Nasser https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=70 8 votes

answered by J. M.’s technical difficulties https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5 7 votes

obtain properly formatted code from autogenerated package

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=220842

Overview: I have written a few mathematica packages, always using the method of writing my code in a mathematica notebook and letting mathematica autogenerate the .m package file. Currently I do not ...

asked by Wizard https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5033 8 votes

answered by Szabolcs https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12 6 votes

Why is StreamPlot plotting direction like this?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221255

I am doing a StreamPlot and something seems wrong with the output.

  StreamPlot[{0, -(y - x)^3}, {x, -3, 3}, {y, -3, 3}] 
 
The plot is attached and I highlighted the issue in red 
 
Shouldn't the  ...

asked by Moo https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36141 7 votes

answered by user2432923 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=61643 5 votes

2.29.2 Greatest hits from previous weeks

My Girlfriend is going to prison...Save her with Math
Calculate the 2D Fourier transform of an Image
Help find a bright object on Mars!
Are you interested in purchasing David Wagner’s "Power programming with Mathematica"?
Even Fibonacci numbers
What does # mean in Mathematica?
How to ask Mathematica to imitate Andy Warhol’s pop-art painting?

My Girlfriend is going to prison...Save her with Math

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=135937

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,  ...

asked by Prisoners Dilema https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46025 42 votes

answered by bobthechemist https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7167 23 votes

Calculate the 2D Fourier transform of an Image

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=29203

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 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=8727 14 votes

answered by Nasser https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=70 32 votes

Help find a bright object on Mars!

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=11819

In today’s news, scientists found a bright object on one of Curiosity’s photos (it’s near the bottom of the picture below). It’s a bit tricky to find - I actually spent quite some time staring at the ...

asked by Victor K. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1351 197 votes

answered by Niki Estner https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=242 255 votes

Are you interested in purchasing David Wagner’s "Power programming with Mathematica"?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=16485

I recently contacted McGraw-Hill to see if they have a mechanism in place for printing out-of-print books that are still of interest. Specifically, I asked about "Power programming with Mathematica" ...

asked by Todd Allen https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=249 158 votes

answered by Todd Allen https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=249 232 votes

Even Fibonacci numbers

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=37266

Today, I found the Euler Project. Problem #2 is

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:

1, ...

asked by xyz https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9627 34 votes

answered by rcollyer https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=52 46 votes

What does # mean in Mathematica?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=19035

I asked Mathematica to compute the following

Solve[c (1-x)^2-x^(1/4) == 0, x] 
 
 
and it returned this: 
 
  x = Root[#1^8 c^4 - 8 #1^7 c^4 + 28 #1^6 c^4 - 56 #1^5 c^4 + 70 #1^4 c^4 - 56 #1^3 c^4 + 28  ...

asked by ronanymous https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5730 37 votes

answered by Dr. belisarius https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=193 63 votes

How to ask Mathematica to imitate Andy Warhol’s pop-art painting?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=59132

I tried to ask Mathematica to imitate Andy Warhol, let it convert a Marilyn Monroe’s portrait so that it looks like Warhol’s world famous pop-art painting. However, the result shown below is far from ...

asked by Putterboy https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=16069 50 votes

answered by Dr. belisarius https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=193 65 votes

2.29.3 Can you answer these questions?

How to specify AxesOrigin for DateListPlot?
How to create a seek bar with Slider
How can I get a plot of "surface area coverage" of a parametric plot?

How to specify AxesOrigin for DateListPlot?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221222

I would like to generate a plot with the y axis on the graph. In a "normal" numeric plot I do this using the AxesOrigin option. How to I specify the crossing point in a DateListPlot?

Here’s the MWE ...

asked by jmm https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=57731 1 vote

How to create a seek bar with Slider

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=221284

I am trying to create a simple audio player but I am stuck at designing the seek bar. I am using the AudioStream framework.

After loading music in a variable stream, I can access its position using ...

asked by Sâu https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=67944 1 vote

How can I get a plot of "surface area coverage" of a parametric plot?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=220846

I have a parametric function defined by the x and y functions:

 
x = r*Cos[w_0*t - w_L*t] + 
  z*Cos[w_P*t - w_L*t] 
 
y = r*Sin[w_0*t - w_L*t] + 
  z*Sin[w_P*t - w_L*t]

I can change the variables ...

asked by Cameron_3298 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72418 1 vote

answered by MarcoB https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27951 0 votes

2.30 Thursday, April 23, 2020

2.30.1 Top new questions this week
2.30.2 Greatest hits from previous weeks
2.30.3 Can you answer these questions?

2.30.1 Top new questions this week

Wrong function of NotebookDirectory[] in the 12.1 version
How complete is the WL’s string language?
Reusing PARDISO symbolic factorization
How to Improve FEM Solution with NDSolve?
What is the difference between Wolfram Script and Wolfram Engine?
Implicit Riccati Equation Solver (to find the anti-stabilizing solution
Dates not printed in DateListPlot

Wrong function of NotebookDirectory[] in the 12.1 version

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=219700

Bug introduced in 12.1.0

Could anybody help?

NotebookDirectory[] function began working wrong in 12.1 (the bug was not present in 12.0 and earlier versions).

When folder name includes Russian ...

asked by Alexander https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72011 13 votes

answered by ilian https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=145 10 votes

How complete is the WL’s string language?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=220003

Consider the following example:

Suppose I am interested in words that contain all the letter of the list 
characters={"e","t","l","a","b"} at least once. An example would be 
the word "abilities" or a  ...

asked by user13892 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=13892 12 votes

answered by Jason B. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9490 11 votes

Reusing PARDISO symbolic factorization

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=219687

Is there a way to do this natively in Mathematica? I read in several places that this is possible with LibraryLink, but I don’t have a lot of experience with C and so I’m having trouble implementing ...

asked by beets https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72007 8 votes

answered by Henrik Schumacher https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=38178 13 votes

How to Improve FEM Solution with NDSolve?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=219990

First some comments. This same calculation works beautifully in 2D with essentially the same code. I have copied it largely unaltered into 3D as part of a migration to 3D so that I can do more complex ...

asked by Paul Harrison https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=69377 7 votes

answered by Tim Laska https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=61809 8 votes

What is the difference between Wolfram Script and Wolfram Engine?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=219963

I don’t understand the difference between these products:

Wolfram Script

Wolfram Engine

Would someone help me understand what these are? And how it differs from just using Mathematica in the ...

asked by QuantumDot https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2048 6 votes

answered by morbo https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=48686 0 votes

Implicit Riccati Equation Solver (to find the anti-stabilizing solution

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=219758

I’ve found that the latest MATLAB icare() solver includes the possibility to find also the anti-stabilizing solution of the Riccati equation. I haven’t found a similar option on Mathematica. Is there ...

asked by Mirko Aveta https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36621 6 votes

answered by Suba Thomas https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5998 5 votes

Dates not printed in DateListPlot

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=220154

A simple example

Clear["Global`*"]; 
 
data = TimeSeries[{1, 2, 1, 3, 0, 0, 0, 2, 21, 15, 21, 7, 11, 5, 10, 
       18, 73, 38, 103, 21, 35, 31, 46, 31, 35, 94, 71, 48, 78, 71, 74, 
       95, 95, 56,  ...

asked by Vaggelis_Z https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5052 5 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 1 vote

2.30.2 Greatest hits from previous weeks

Mathematica code for Bifurcation Diagram
Drawing a square root spiral
How do I draw a pair of buttocks?
How can I improve Mathematica’s resolution on a macbook retina display?
Using Export[] sends the file where?
How to create effect like Van Gogh’s stroke brush?
Elegant operations on matrix rows and columns

Mathematica code for Bifurcation Diagram

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=13277

At the moment I am trying to construct a bifurcation diagram of the iterative function \(f(x)=\) \(ax-1.1975x^3\). I’ve scoured the internet for pre-made bifurcation diagrams and found many (mostly of the ...

asked by Mel https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=3249 26 votes

answered by Mark McClure https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36 45 votes

Drawing a square root spiral

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=66969

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[#]} &[Pi - (ArcCot[1])]}, 
  Polygon @ {{0,  ...

asked by matrix89 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=5379 24 votes

answered by Bob Hanlon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9362 21 votes

How do I draw a pair of buttocks?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=66538

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

asked by Simpleton Jack https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=22399 287 votes

answered by mikuszefski https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7608 440 votes

How can I improve Mathematica’s resolution on a macbook retina display?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=18419

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

asked by Tom Wellington https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2437 43 votes

answered by canadian_historian https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=19 20 votes

Using Export[] sends the file where?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=8586

I am trying to use the Export command to convert a list of plots into a *.gif file, and the command runs and executes well, but I can’t find the file! Where is it supposed to go? Did it even work?

asked by Patrick Da Silva https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1785 37 votes

answered by Vitaliy Kaurov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=13 49 votes

How to create effect like Van Gogh’s stroke brush?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=39003

I need to apply Van Gogh’s stroke brush effect to a random image

Take the following image as an example:

Thank you so much if you could help!

asked by user10495 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=10495 33 votes

answered by Simon Woods https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=862 51 votes

Elegant operations on matrix rows and columns

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3069 Question

The Mathematica tutorial has a section ’Basic Matrix Operations’, describing operations like transpose, inverse and determinant. These operations all work on entire matrices. I am missing a ...

asked by sjdh https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=515 177 votes

answered by Mr.Wizard https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=121 60 votes

2.30.3 Can you answer these questions?

Can one use .wls (script) files in a simple way, like Matlab scripts?
Introduction to Probability
Do palettes limit the execution time of a user-defined function?

Can one use .wls (script) files in a simple way, like Matlab scripts?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=219919

I have been fighting unsucessfully with the intricacies of creating Mathematica packages (Private, scopes , context) for a long time. I just need a simple version of Matlab scripts, to be able to ...

asked by florin https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=54979 1 vote

Introduction to Probability

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=219883

Is there any newer book or online resource that would be good introductory text to probability with Mathematica? I have Introduction to Probability with Mathematica by Hastings but it is over 10 years ...

asked by grga https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=70392 1 vote

Do palettes limit the execution time of a user-defined function?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=219973

I have defined a function ConvertToMarkdown that does some long processing of a notebook: converts it to markdown, save inputs/outputs as images, generates a word cloud etc., that can take multiple ...

asked by Victor K. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1351 1 vote

2.31 Thursday, April 16, 2020

2.31.1 Top new questions this week
2.31.2 Greatest hits from previous weeks
2.31.3 Can you answer these questions?

2.31.1 Top new questions this week

Raytracing; why so slow?
How use the black mode permanently
DeleteCases depending on all elements
How to download "Epidemic Data for Novel Coronavirus COVID-19"
NIntegrate vs quadGK in Julia
Overflow with NDSolve

Raytracing; why so slow?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=219629

I’m trying to get some rays to bounce in a circle. But I want to be able to control the reflections, i.e. the direction the rays bounce in the circle. I have a MWE below, and it is severely limited by ...

asked by Tomi https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36939 10 votes

answered by MassDefect https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42264 18 votes

How use the black mode permanently

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=219317

Now I can use this functionResourceFunction["DarkMode"][] to use the dark mode, but when I turn on Mathematica again, the black mode will not work. How can I set to use the black mode permanently.

asked by https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=71882 9 votes

answered by M.R. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=403 5 votes

DeleteCases depending on all elements

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=219412

I have a listed of Tupels

list = {{10, 5}, {20, 4}, {20, 3}, {10, 6}}; 
 
If there are two elements a and b for which 
 
a[[1]] <= b[[1]] && a[[2]] <= b[[2]] 
 
then I would like to delete  ...

asked by fravity https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=22275 8 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 7 votes

subsubsectionMathematica is unable to compute the derivative of the function \(\frac {\sin ^2(x)}x\) https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=219273

Consider the function \[f: \mathbb R\to \mathbb R, x\mapsto \begin {cases}\frac {\sin ^2(x)}x, & x\neq 0, \\ 0, & x=0.\end {cases}\]

It is clear that \(f\in \mathcal C^1(\mathbb R)\) and that

asked by Maximilian Janisch https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=68670 8 votes

answered by Bob Hanlon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=9362 12 votes

How to download "Epidemic Data for Novel Coronavirus COVID-19"

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=219282

I am using Mathematica and I would like to download the dataset "Epidemic Data for Novel Coronavirus COVID-19" for basic investigation from Wolfram homepage. Can anyone give me some instructions or ...

asked by Johann Riedler https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=71867 7 votes

answered by morbo https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=48686 6 votes

NIntegrate vs quadGK in Julia

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=219198

I am trying to understand the numerical integration routine by using as a benchmark the function

f[x_] := -x^2 + x^4 
 
 
used to define the following function 
 
g[z_] := NIntegrate[1/Sqrt[-f[x]], {x, z,  ... 

asked by Smerdjakov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=55615 7 votes

answered by MassDefect https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42264 7 votes

Overflow with NDSolve

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=219593

Backslide introduced in 10.0, persisting through 12.1.

I am trying to solve the following differential equation and plot the result:

ClearAll["Global`*"] 
rin = 10^-30; 
sol = NDSolve[{Sqrt[x]  ...

asked by mattiav27 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=8822 6 votes

answered by xzczd https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1871 2 votes

2.31.2 Greatest hits from previous weeks

What are the most common pitfalls awaiting new users?
How to find the position of elements in a list satisfying criteria
How do I draw a pair of buttocks?
How can I plot a graph of an integral?
Make a scatter plot from two lists
Are you interested in purchasing David Wagner’s "Power programming with Mathematica"?
Extract real part of a complex expression better than Re does

What are the most common pitfalls awaiting new users?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=18393

As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...

asked by Dr. belisarius https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=193 459 votes

answered by Michael E2 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=4999 277 votes

How to find the position of elements in a list satisfying criteria

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=180

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, #>7&] gives the elements themselves, and Position[x,8] gives the  ... 

asked by PeterR https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=140 62 votes

answered by J. M.’s technical difficulties https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=50 60 votes

How do I draw a pair of buttocks?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=66538

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

asked by Simpleton Jack https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=22399 287 votes

answered by mikuszefski https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7608 440 votes

How can I plot a graph of an integral?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=78451

I want to plot the following function:

\[\int \left (\frac {\Gamma (x+1)}{2}-\frac {\Gamma (x-1)}{2}\right ) \, dx\]

asked by Anixx https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=651 3 votes

answered by k_v https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=24727 8 votes

Make a scatter plot from two lists

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=21884

I have two lists of values

xx = {0.1, 0.3, 0.35, 0.57, 0.88, 1.0} 
yy = {1.2, 3.5, 4.5, 7.8, 9.0, 12.2}

I want to make a scatter plot (list plot) with xx as x axis and yy as y axis. The help ...

asked by Patrick Li https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2403 27 votes

answered by Eric Thewalt https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=6313 38 votes

Are you interested in purchasing David Wagner’s "Power programming with Mathematica"?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=16485

I recently contacted McGraw-Hill to see if they have a mechanism in place for printing out-of-print books that are still of interest. Specifically, I asked about "Power programming with Mathematica" ...

asked by Todd Allen https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=249 158 votes

answered by Todd Allen https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=249 232 votes

Extract real part of a complex expression better than Re does

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3306

I have a complex expression with real positive variables only.

Mathematica Input Style:

PP = -(( ( Cosh[y1 ] +  Sinh[y1 ])(- Cosh[(-L +  y2) ] +  Sinh[(-L + y2) ])) 
    /(s (2   Cosh[L ]  ...

asked by max https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=796 31 votes

answered by nixeagle https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=814 50 votes

2.31.3 Can you answer these questions?

With a Large output, clicking Show all or Show more freezes Mathematica
MathMF Error, Can’t Import VIdeo
Best parameter for smoothing splines

With a Large output, clicking Show all or Show more freezes Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=219430

Running the following code takes about 30 min on my laptop (everything before the Reduce is instant) and produces a Large output that Mathematica does not display, only shows buttons Show more, Show ...

asked by Sander Heinsalu https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=6211 1 vote

MathMF Error, Can’t Import VIdeo

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=219195

I am getting this error HElP....

asked by Ajit Yadav https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=71840 1 vote

Best parameter for smoothing splines

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=219616

I am trying to implement a module to determine the best value for the smoothing parameter of a smoothing spline interpolation of a given dataset. To calculate the cross-validation score of a given ...

asked by Daniele Binosi https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=25023 1 vote

2.32 Thursday, April 9, 2020

2.32.1 Top new questions this week
2.32.2 Greatest hits from previous weeks
2.32.3 Can you answer these questions?

2.32.1 Top new questions this week

Adding Regularisation to Built-in Interpolation function
How to model diffusion through a membrane?
How to draw a "proper" tree diagram
How can I list all tech note pages?
Generating long binary lists fast?
Control grain size of stipple shading
Extracting COVID AdministrativeDivision data from Wolfram Resource

Adding Regularisation to Built-in Interpolation function

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=218764

tl;tr; How to improve performance of regularised Interpolation?

Context

Since Version 12, Mathematica now incorporates a range of (underrated IMHO) regularisation methods to Fit and FindFit.

asked by chris https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1089 17 votes

answered by chris https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1089 7 votes

How to model diffusion through a membrane?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=218983

This is a follow-up on How to handle discontinuity in diffusion coefficient?

Consider diffusion of \(u(t,x)\) on the domain \(x \in [0,2]\) with some simple boundary conditions such as \(u(0) = 2, u(2) =\)

asked by Szabolcs https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12 13 votes

answered by Tim Laska https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=61809 7 votes

How to draw a "proper" tree diagram

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=218859

TreePlot[{ 
    {0 -> "Mr 1", 1/10}, 
    {0 -> "Mr 2", 2/10}, 
    {0 -> "Mr 3", 3/10}, 
    {0 -> "Mr 4", 4/10}, 
    {"Mr 1" -> "A1",  2/10 }, 
    {"Mr 1" -> "B1",  1/10 }, 
    {"Mr 1"  ...

asked by CasperYC https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=62701 13 votes

answered by Szabolcs https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12 18 votes

How can I list all tech note pages?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=219033

It seems since v12.1 a new doc type, tech note, is included in the documentation.

However, I cannot find an index page for the tech notes. So how can I list all such tech note pages?

asked by sunt05 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=260 10 votes

answered by WReach https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=142 11 votes

Generating long binary lists fast?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=219115

Given list \(L\) consisting only of \(0\)’s and \(1\)’s, we read \(L\) backwards and construct a new list \(O\) such that: (we start with \(O=\{1\}\) and then apply the two rules:)

if we encounter \(n\) ...

asked by Vepir https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=49840 9 votes

answered by Victor K. https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1351 5 votes

Control grain size of stipple shading

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=219020

Mathematica 12.1 introduced a number of amazing shaders such as StippleShading.

Is there a way to control the grain size of StippleShading?

On a standard resolution screen it looks like this:

asked by Szabolcs https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12 9 votes

Extracting COVID AdministrativeDivision data from Wolfram Resource

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=218833

Wolfram makes the COVID-19 case data available in a form that is conveniently formatted for processing in Mathematica.

It can be accessed using:

data2 = ResourceData[ResourceUpdate["Epidemic Data  ...

asked by theorist https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=45215 9 votes

answered by LouisB https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=22158 7 votes

2.32.2 Greatest hits from previous weeks

How to make Jacobian automatically in Mathematica
LaTeXand Mathematica
Where can I find examples of good Mathematica programming practice?
How can I plot the direction field for a differential equation?
Mathematica command that allows it to read my intentions
Parallel and perpendicular symbol from Mathematica to LaTeX
Is there any algorithm that runs faster in Mathematica than in C or Fortran?

How to make Jacobian automatically in Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=5790

If we have two vectors, \(a\) and \(b\), 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(

asked by George Mills https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1012 37 votes

answered by Jens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=245 49 votes

LaTeXand Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=736

I quite often would like to draw graphics in my LaTeXdocuments using Mathematica. I have encountered three problems. I would like to know if there are any workarounds to these problems

I would ...

asked by Thomas Rot https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=227 124 votes answered by Simon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34 45 votes

Where can I find examples of good Mathematica programming practice?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=18

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.’s technical difficulties https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=50 536 votes

answered by faysou https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=66 473 votes

How can I plot the direction field for a differential equation?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=8841

I’d like to plot the graph of the direction field for a differential equation, to get a feel for it. I’m a novice, right now, when it comes to plotting in Mathematica, so I’m hoping that someone can ...

asked by Matt Groff https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1735 29 votes

answered by Peter Breitfeld https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=307 24 votes

Mathematica command that allows it to read my intentions

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=194384

In version 2.0 of Mathematica there was a command, ReadProgrammerIntentions[ ] which allowed it rapidly compose code that could solve problems simple to complex, based on my requirements. Understand ...

asked by MikeY https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=47314 52 votes

answered by MarcoB https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27951 38 votes

Parallel and perpendicular symbol from Mathematica to LaTeX

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=46538

I want to get the following expression from Mathematica to LaTeX:

\[ \begin {bmatrix} E_{\parallel } \\ E_{\perp } \end {bmatrix} \]

I have tried to use inbuilt ’symbol’ character from the special ...

asked by Steve Hatcher https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=13314 18 votes

answered by Sjoerd C. de Vries https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=57 25 votes

Is there any algorithm that runs faster in Mathematica than in C or Fortran?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=208045

I’m just curious. My friend just told me that Mathematica is mostly for symbolic calculation and not efficient for Numerical computations. He told me that’s the reason most of the people don’t use ...

asked by Gummala Navneeth https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=66938 44 votes

answered by Szabolcs https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12 73 votes

2.32.3 Can you answer these questions?

How can I modify the code to speed up the ‘Do‘?
Need help with Limit (DirectedInfinity)
How can i use Butterworth filter written in matlab to Mathematica

How can I modify the code to speed up the ‘Do‘?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=219057

I need to use the following code to do some calculations. But the running speed of this code is too slow. How can I modify this code to improve the running speed?

   Cb = 0.5; 
    Ch = 5./7; 
     =  ...

asked by Please Correct GrammarMistakes https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42417 1 vote

Need help with Limit (DirectedInfinity)

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=219035

I tried to compute the following limit:

Limit[Series[ 
  1/(1/x^2) (Sin[y x]/(x^4))^2 - Sin[y x]/y(x^3) + 1/x^2, {x, 0, 5}], 
 x -> 0, Assumptions -> {y > 0}] 
 
the output :

asked by Johe https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=71663 1 vote

How can i use Butterworth filter written in matlab to Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=218701

i need help to convert this code written in matlab about Butterworth filter:

 %remove high-frequency components by 0.5-h butterworth filter; 
 n =2; 
 Wn =[1/30/0.5];   %30-min low-pass filter (LPF)%

asked by Iman Khaki https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=71671 1 vote

2.33 Thursday, April 2, 2020

2.33.1 Top new questions this week
2.33.2 Can you answer these questions?

2.33.1 Top new questions this week

How to determine if two mutable data structures are the same?
Is there official documentation for official documentation and getting help system of Mathematica?
Mottled appearance of ContourPlot3D with transparency
Dividing by Zero - Unexpected Result
How can I plot a parametric equation with ś?
Mathematica numerical "error" for simple multiplication?
Why can’t I use Inactive[D] in NDSolve?
LaTeX and Mathematica
How to make a spiroglyphic?]
How to graph a sphere with cartesian equations?
Mathematica Minecraft
Code that generates a mandala
Calling Correct Function for Plotting DiracDelta
Solving \(L=\frac {3}{2} \sqrt {4 \pi ^2 A^2+W^2}-\frac {\sqrt {5 W \sqrt {4 \pi ^2 A^2+W^2}+6 \pi ^2 A^2+3 W^2}}{\sqrt {2}}+\frac {3 W}{2}\) for \(W\)

How to determine if two mutable data structures are the same?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=218535

How can I determine if two mutable data structures (DataStructure) are truly the same? I do not mean checking if they have the same value. I mean checking if they are the same data structure, i.e. ...

asked by Szabolcs ( https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12 ) 15 votes

answered by ilian ( https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=145 ) 14 votes

Is there official documentation for official documentation and getting help system of Mathematica?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=217230

Mathematica has very high quality and extensive documentation and good getting help system (? Solve as an example; there maybe are more too). Is there all including official documentation about ...

asked by vasili111 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=11639 14 votes

answered by WReach https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=142 11 votes

Mottled appearance of ContourPlot3D with transparency

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=217226

I’m trying to make a ContourPlot3D that needs to be transparent. With transparency, however, something odd happens.

With PerformanceGoal->"Speed", the colors look fine.

With ...

asked by Peter Todd Williams https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=70508 11 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 9 votes

Dividing by Zero - Unexpected Result

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=218539

When I divide this number by zero I get this for an answer. 
 
ans = 2345900/0 
 
What is surprising is that in taking the square root, Mathematica seems to map the entire universe to some town  ...

asked by MikeY https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=47314 9 votes

How can I plot a parametric equation with ś?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=217227

I want to draw a parametric equation with ś like the figure below: 
 
But I don't get the result I want when I run the following code. What can I do to get it? 
 
ParametricPlot[{x, śx^2}, {x, 0, 1}, 
   ...

asked by Please Correct GrammarMistakes https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=42417 9 votes

answered by Mr.Wizard https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=121 16 votes

Mathematica numerical "error" for simple multiplication?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=217205

In[71]:= 0.6*0.8048780487804877` 
 
Out[71]= 0.482927 
 
In[72]:= 0.3*0.8414634146341463` 
 
Out[72]= 0.252439 
 
In[74]:= (0.6*0.8048780487804877`) + 0.3*0.8414634146341463` 
 
Out[74]= 0.735366 

asked by htam_ujn https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=70502 9 votes

answered by m0nhawk https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2342 8 votes

Why can’t I use Inactive[D] in NDSolve?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=217169

I have a 2D rectangular domain with -L/2 < x < L/2 and 0 < y < D0, which is divided into two parts, 
with a sinusoidal curve y == 1 +  Cos[2 Pi x/L] separating the two. 
 
I want to solve  ...

asked by Physicist https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=41581 8 votes

answered by user21 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=18437 8 votes

LaTeX and Mathematica

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=736

I quite often would like to draw graphics in my LaTeXdocuments using Mathematica. I have encountered three problems. I would like to know if there are any workarounds to these problems

I would ...

asked by Thomas Rot https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=227 124 votes

answered by Simon https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34 45 votes

How to make a spiroglyphic?]

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=188139

Some (older) members of this group might remember playing vinyl LP records. Recently, at the Abbey Road studio there was a spiroglyphics coloring book for sale. It looks like a nice programming ...

asked by TheDoctor https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=2263 13 votes

answered by b3m2a1 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=38205 18 votes

How to graph a sphere with cartesian equations?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=24169

I’m new to Mathematica and I need to ask how to graph a sphere, cylinder, etc.. using cartesian equations.

For example in sphere’s case \(x^2+y^2+z^2=1\)

I tried to use Plot3D but it doesn’t ...

asked by German https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7145 7 votes

answered by Dr. belisarius https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=193 13 votes

Mathematica Minecraft

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=19669

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

asked by faleichik https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=219 163 votes

answered by faleichik https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=219 232 votes

Code that generates a mandala

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=136974

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.

asked by zeros https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=26849 69 votes

answered by Anton Antonov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34008 93 votes

Calling Correct Function for Plotting DiracDelta

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3506

I am wondering what is the correct function in Mathematica to plot the true impulse function, better known as the DiracDelta[] function. When using this inside of a function or just the function ...

asked by night owl https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=116 17 votes

answered by Heike https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=46 19 votes

Solving \(L=\frac {3}{2} \sqrt {4 \pi ^2 A^2+W^2}-\frac {\sqrt {5 W \sqrt {4 \pi ^2 A^2+W^2}+6 \pi ^2 A^2+3 W^2}}{\sqrt {2}}+\frac {3 W}{2}\) for \(W\)

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=57763

When I solve the aforementioned equation for \(W\) or \(A\) on Mathematica I get a long and ugly equation in return, namely one of the solutions for \(W\) is: (attempt to read at your own health)

asked by J.D’Almbert ( https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=19257 ) 8 votes

answered by Alexei Boulbitch ( https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=788 ) 13 votes

2.33.2 Can you answer these questions?

UnitSimplify rules?
How to delete random elements with RandomChoice?
settings elements of matrix of functions

UnitSimplify rules?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=217164

Code as following:

In[1]:= constants = Quantity /@ {"PlanckConstant", "BoltzmannConstant", "MolarGasConstant"}; 
  Print[UnitSimplify[ 
  UnitConvert[Quantity["AvogadroNumber"]*constants[[2]]]] // N];

asked by ( https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=19360 ) 1 vote

How to delete random elements with RandomChoice?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=218431

I have a list of prices and a list of dates, but I have 154 more prices than dates. So I want to delete random prices to match both lists, however, every time I run the block of code I get a different ...

asked by trashparticle https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=71573 1 vote

settings elements of matrix of functions

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=218297

I have a work flow that involves initially specifying a matrix function 
(or a matrix of functions), e.g. 
 
f[x_]:={{Exp[x],Sin[x]},{Cos[x],Log[x]}}

This works well for what I am using it for. I can ...

asked by user3353819 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=34650 1 vote

Chapter 3
Year 2018

3.1 Tuesday, January 16, 2018
3.2 Tuesday, January 9, 2018
3.3 Tuesday, January 2, 2018

3.1 Tuesday, January 16, 2018

3.1.1 Top new questions this week
3.1.2 Greatest hits from previous weeks
3.1.3 Can you answer these?

3.1.1 Top new questions this week

How can I access NASA images and APIs?
Access last variable in a pure function?
Ordered RandomSample
Possible bug in Refresh[x, None] on the very first x = val
How to launch a separate Java VM on each sub-Kernel?
Three differential equations
How can I create an enumeration variable by groups?

How can I access NASA images and APIs?

https://mathematica.stackexchange.com/questions/163638/how-can-i-access-nasa-images-and-apis

I &heartsuit; NASA. You &heartsuit; NASA. We all &heartsuit; NASA.

So how can I use the images and things they expose in their APIs in Mathematica?

- asked by b3m2a1 (23 votes), answered by b3m2a1 (29 votes)

Access last variable in a pure function?

https://mathematica.stackexchange.com/questions/163469/access-last-variable-in-a-pure-function

# is the first argument of a pure function, #n the nth, ## are all 
variables and ##n all beginning with the nth variable.

Now, I would like to access the last argument. In a list, this would be ...

- asked by riddleculous (13 votes), answered by Henrik Schumacher (14 votes)

Ordered RandomSample

https://mathematica.stackexchange.com/questions/163498/ordered-randomsample

This feels like a basic question yet I failed to find an answer.

  (*arbitrary list of unique elements, does not need to be sorted*) 
list = CharacterRange["a", "h"]; 
n = 5; 
 
RandomSample[ list, n]

asked by Kuba (11 votes), answered by Coolwater (13 votes)

Possible bug in Refresh[x, None] on the very first x = val

https://mathematica.stackexchange.com/questions/163559/possible-bug-in-refreshx-none-on-the-very-first-x-val

Bug introduced in 8 or earlier and persisting through 11.2.0

 
>From Refresh docs: 
 
 
  Refresh[expr,None] specifies that the value of expr 
should never automatically be refreshed. 
 
 
ClearAll[z] 
 ...

asked by Kuba (8 votes)

How to launch a separate Java VM on each sub-Kernel?

https://mathematica.stackexchange.com/questions/163387/how-to-launch-a-separate-java-vm-on-each-sub-kernel

I have some code that process very large flat files in to separate HSQL(Standalone) databases using ParallelSubmit and JDBC for each file using the strategy in this post (19542). Lately I keep ...

asked by Edmund (8 votes), answered by Edmund (5 votes)

Three differential equations

https://mathematica.stackexchange.com/questions/163566/three-differential-equations

I have the next figure with inflow and outflow rates:

And I need to calculate the time for which the pollution will be 50% from the initial value. Assuming that all lakes have the same pollution ...

asked by Darius Ionut (8 votes), answered by Henrik Schumacher (8 votes)

How can I create an enumeration variable by groups?

https://mathematica.stackexchange.com/questions/163764/how-can-i-create-an-enumeration-variable-by-groups

I copied the title and concept for this question from here. I have

data = {{"ID", "Value"}, {1, 48}, {1, 45}, {1, 52}, {1, 43}, {1, 
    41}, {2, 50}, {2, 42}, {2, 51}, {2, 52}, {bb, 52}, {bb, 54},  ...

asked by ramesh (7 votes), answered by kglr (8 votes)

3.1.2 Greatest hits from previous weeks

Labeling individual curves in Mathematica
Where can I find examples of good Mathematica programming practice?

Labeling individual curves in Mathematica

https://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 ...

asked by Tianxiang Xiong (53 votes), answered by Artes (41 votes)

Where can I find examples of good Mathematica programming practice?

https://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. (483 votes), answered by faysou (430 votes)

3.1.3 Can you answer these?

Why BoundingRegion does not work well?
Are integrals with coalescing saddles available in the core Mathematica or in standard packages?
Can FindFit be used with units?

Why BoundingRegion does not work well?

https://mathematica.stackexchange.com/questions/163756/why-boundingregion-does-not-work-well

Bug introduced in 10.0 and persisting through 11.2.0

I have a set of data points describing an ellipse in the plane. I want to obtain the best ellipse that fits them.

As a first attempt, I use ...

asked by José Antonio Díaz Navas (5 votes)

Are integrals with coalescing saddles available in the core Mathematica or in standard packages?

https://mathematica.stackexchange.com/questions/163581/are-integrals-with-coalescing-saddles-available-in-the-core-mathematica-or-in-st

I was having a look at the DLMF chapter on integrals with coalescing saddles, and there are a few things that I’d like to try out with the functions it describes, including e.g. the Pearcey integral,

asked by Emilio Pisanty (2 votes)

Can FindFit be used with units?

https://mathematica.stackexchange.com/questions/163391/can-findfit-be-used-with-units

I am trying to use the units capabilities of Mathematica throughout a course that I am teaching, but am finding that it isn’t uniformly implemented across many functions. In particular, I would love ...

asked by Kevin Ausman (1 vote)

3.2 Tuesday, January 9, 2018

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

[Why is Unevaluated[#]& different from Unevaluated?] https://mathematica.stackexchange.com/questions/163291/why-is-unevaluated-different-from-unevaluated

{a, b, c} = {1, 2, 3}; 
Unevaluated /@ Unevaluated@{a, b, c} 
(* {Unevaluated[a], Unevaluated[b], Unevaluated[c]} *) 
Unevaluated[#]&amp; /@ Unevaluated@{a, b, c} 
(* {Unevaluated[1], Unevaluated[2],  ...

- asked by Roman (18 votes), answered by Szabolcs (19 votes)

—————————-

[Building a GitBook with Mathematica] https://mathematica.stackexchange.com/questions/163193/building-a-gitbook-with-mathematica

GitBook is a fun little website that will take Markdown source material and build a little book out of it.

How can I use Mathematica to build a GitBook with a minimum of effort?

- asked by b3m2a1 (14 votes), answered by b3m2a1 (18 votes)

—————————-

[How to create a vertical bullet gauge?] https://mathematica.stackexchange.com/questions/163201/how-to-create-a-vertical-bullet-gauge

Originally posted in MathematicaMeta SE, titled "I can’t understand why Mathematica has an excellent (perhaps the best!) BulletGauge command (with multiple options)", as a reflexion about the ...

- asked by Mika Ike (10 votes), answered by kglr (14 votes)

—————————-

[Specialized form of Outer[f, list, list] for symmetric f] https://mathematica.stackexchange.com/questions/163240/specialized-form-of-outerf-list-list-for-symmetric-f

Consider a function f that is symmetric with regard to its two arguments i.e. f[x,y] == f[y,x]. Using Outer one can for instance build a correspondence matrix that computes some distance measure f ...

- asked by Sascha (9 votes), answered by Henrik Schumacher (5 votes)

—————————-

[How to convert a string having nested parentheses into an expression?] https://mathematica.stackexchange.com/questions/163184/how-to-convert-a-string-having-nested-parentheses-into-an-expression

I am a Wolfram Language/Mathematica beginner and trying to convert STEP ISO10303 commands into geometrical regions. A simple command looks like

(vector(a,(b,c)),line(d,(e,f))

I tried with String ...

- asked by Markus Sonderegger (9 votes), answered by John Doty (9 votes)

—————————-

[Is there any way to speed up this code that’s Maximizing a function got from numerical integration?] https://mathematica.stackexchange.com/questions/163204/is-there-any-way-to-speed-up-this-code-thats-maximizing-a-function-got-from-num

I have this code below, which is calculating the Binding energy of an electron in a Quantum Well Wire with a hydrogenic impurity in it. Well you don’t have to care much about what kind of calculation ...

- asked by tyler_house (7 votes), answered by Michael E2 (7 votes)

—————————-

[Joining all the keys of a list of rules that point to matching values] https://mathematica.stackexchange.com/questions/163068/joining-all-the-keys-of-a-list-of-rules-that-point-to-matching-values

Suppose I have a list of rules whose keys are not of identical structure (in my case, the keys are either lists of at least one symbol or symbols alone):

rules = {{a} -&gt; 1, {b, c} -&gt; 1, d -&gt;  ...

- asked by user170231 (7 votes), answered by Kuba (10 votes)

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

[How to calculate scalar curvature Ricci tensor and Christoffel symbols in Mathematica?] https://mathematica.stackexchange.com/questions/8895/how-to-calculate-scalar-curvature-ricci-tensor-and-christoffel-symbols-in-mathem

I am seeking a convenient and effective way to calculate such geometric quantities. I’ve used packages like TensoriaCalc, but they don’t work at all time. Sometimes, I run into the following error: ...

- asked by Zoe Rowa (29 votes), answered by Yi-Zen Chu (12 votes)

—————————-

[xkcd-style Plots] https://mathematica.stackexchange.com/questions/11350/xkcd-style-plots

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

- asked by Amatya (554 votes), answered by Simon Woods (409 votes)

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

[Is ClearAttributes built-in functon work in current cell only?] https://mathematica.stackexchange.com/questions/163223/is-clearattributes-built-in-functon-work-in-current-cell-only

I have a question. Is ClearAttributes the built-in functon work in current cell only? This is my code:

In first cell: 
 
Set[a, 6] 
 
 
In second cell: 
 
ClearAttributes[Set, HoldFirst] 
Attributes[Set] 
 ...

- asked by SIJA (1 vote)

—————————-

[How to convert Piecewise into KroneckerDelta form by FullSimplify?] https://mathematica.stackexchange.com/questions/163274/how-to-convert-piecewise-into-kroneckerdelta-form-by-fullsimplify

The question comes from the last example of this topic in the Wolfram documentation.

SeriesCoefficient[E^x^2, {x, 0, n}] 
 
However, my (v11.1) output is 
 
$\begin{cases} 
\frac1{{\sf  ...

- asked by ooo (1 vote)

—————————-

[Code behind these Video Playback demos?] https://mathematica.stackexchange.com/questions/163008/code-behind-these-video-playback-demos

There are only two known examples of video playback (from a file) within a (non-cloud) notebook:

Visualizations in Graph Theory with the Wolfram Language (at time 3:32) Mathematica and CUDA, ...

- asked by user5601 (3 votes)

3.3 Tuesday, January 2, 2018

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

[What’s the default colormap (or color scheme) used in mathematica?] https://mathematica.stackexchange.com/questions/162883/whats-the-default-colormap-or-color-scheme-used-in-mathematica

For example, the colors used on this page: http://reference.wolfram.com/language/ref/ContourStyle.html

or here: https://www.wolfram.com/mathematica/new-in-10/plot-themes/default.html

or here: ...

- asked by Alex (8 votes), answered by kglr (7 votes)

—————————-

[\({\frac {\partial ^{2} u}{\partial {x}^{2}}} +{\frac {\partial ^{2} u}{\partial {y}^{2}}} =0\) with one boundary at infinity] https://mathematica.stackexchange.com/questions/162691/frac-partial2-u-partial-x2-frac-partial-2-u-partial

Is there a trick to make Mathematica solve

\[{\frac {\partial ^{2} u}{\partial {x}^{2}}} +{\frac {\partial ^{2} u}{\partial {y}^{2}}} =0\] with one boundary condition at \(\infty \)?

Boundary ...

- asked by Nasser (8 votes), answered by ZufolgeWeierstrass (13 votes)

—————————-

[How to make simple closed curve that can be smoothly morphed using locators] https://mathematica.stackexchange.com/questions/162711/how-to-make-simple-closed-curve-that-can-be-smoothly-morphed-using-locators

Given a simple closed curve in 2D with some locators on it, I would like to have be able to stretch and squish parts of the curve by moving the locators to morph the curve into another simple closed ...

- asked by Michael McCain (8 votes), answered by halirutan (12 votes)

—————————-

[Approximation with radial basis functions] https://mathematica.stackexchange.com/questions/162768/approximation-with-radial-basis-functions

I want to approximate some functions with basisfunctions, which can be easy Fourier-transformed. So I got the idea to approximate my function with Gaussian normal-distribution curves. This led me to ...

- asked by pcalc (7 votes), answered by Anton Antonov (7 votes)

—————————-

[How to Discretize the Following Region Using Reasonable Bounds?] https://mathematica.stackexchange.com/questions/162674/how-to-discretize-the-following-region-using-reasonable-bounds

I want to accurately discretize the implicit equation \(x^2+x+y^2+\sin (4xy)+\sin (3xy)=3.9\).

To get the whole discretized shape, I’m forced to use oversized bounds x,-70,80 and y,-70,80

curve = ...

- asked by Arbuja (7 votes), answered by Carl Woll (5 votes)

—————————-

[Replacement for GraphJoin] https://mathematica.stackexchange.com/questions/162900/replacement-for-graphjoin

According to MathWorld » GraphJoin, Mathematica could compute the join of two graphs with the GraphJoin command, part of Combinatorica. This command no longer works as of v10, and I cannot find a ...

- asked by Bryan Clair (5 votes), answered by kglr (6 votes)

—————————-

[How can I make a DensityPlot3D over a triangle?] https://mathematica.stackexchange.com/questions/162852/how-can-i-make-a-densityplot3d-over-a-triangle

I know that I can plot over 3D-regions like balls via

DensityPlot3D[(x^2 + y^2 + z^2)^2, {x, y, z}  Ball[{0, 0, 0}, 1]]

But, not surprisingly, this breaks down for 2D-regions like triangles.

How ...

- asked by java4ever (5 votes), answered by rcollyer (7 votes)

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

[How do I clear all user defined symbols?] https://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?

- asked by niklasfi (66 votes), answered by Artes (63 votes)

—————————-

[How to calculate contour integrals with Mathematica?] https://mathematica.stackexchange.com/questions/34073/how-to-calculate-contour-integrals-with-mathematica

How to calculate the integral of \(\frac {1}{\sqrt {4 z^2 + 4 z + 3}}\) over the unit circle counterclockwise for each branch of the integrand?

- asked by user64494 (31 votes), answered by Artes (54 votes)

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

[Apply a classifier to a column in excel and export side by side result?] https://mathematica.stackexchange.com/questions/162901/apply-a-classifier-to-a-column-in-excel-and-export-side-by-side-result

I’m relatively new to using Mathematica, and I was able to create a Classifier from a training set of about 3,000 pairs of non-numerical text strings.

I have my test set of about 20,000 records in an ...

- asked by M0RPH0RX (2 votes)

—————————-

[Solving a cumulative distribution from a first order condition] https://mathematica.stackexchange.com/questions/162825/solving-a-cumulative-distribution-from-a-first-order-condition

I could use some guidance in using Mathematica’s NDSolve. I’m attempting to numerically uncover a cumulative distribution function (CDF), \(F(p)\), with density \(f(p)\) from a first order condition, ...

- asked by J.R. (1 vote)

—————————-

[Fourier | Examples | Applications | Frequency Identification: high resolution: what trick is this?] https://mathematica.stackexchange.com/questions/162661/fourier-examples-applications-frequency-identification-high-resolution-w

My question is regarding one of the examples in the Documentation Center for the built-in symbol Fourier:

Fourier | Examples | Applications | Frequency Identification

Fourier is used to find the ...

- asked by Jack (1 vote)

Chapter 4
Year 2017

4.1 Tuesday, December 26, 2017
4.2 Tuesday, December 12, 2017
4.3 Tuesday, December 5, 2017
4.4 Tuesday, November 28, 2017
4.5 Tuesday, November 21, 2017
4.6 Tuesday, November 14, 2017
4.7 Tuesday, November 7, 2017
4.8 Tuesday, October 31, 2017
4.9 Tuesday, October 24, 2017
4.10 Tuesday, October 17, 2017
4.11 Tuesday, October 10, 2017
4.12 Tuesday, October 3, 2017
4.13 Tuesday, September 26, 2017
4.14 Tuesday, September 19, 2017
4.15 Tuesday, September 12, 2017
4.16 Tuesday, September 5, 2017
4.17 Tuesday, August 29, 2017
4.18 Tuesday, August 22, 2017
4.19 Tuesday, August 15, 2017
4.20 Tuesday, August 8, 2017
4.21 Tuesday, August 1, 2017
4.22 Tuesday, July 25, 2017
4.23 Tuesday, July 18, 2017
4.24 Tuesday, July 11, 2017
4.25 Tuesday, July 4, 2017
4.26 Tuesday, June 27, 2017
4.27 Tuesday, June 20, 2017
4.28 Tuesday, June 13, 2017
4.29 Tuesday, June 6, 2017
4.30 Tuesday, May 30, 2017
4.31 Tuesday, May 23, 2017
4.32 Tuesday, May 16, 2017
4.33 Tuesday, May 2, 2017
4.34 Tuesday, April 25, 2017
4.35 Tuesday, April 18, 2017
4.36 Tuesday, April 11, 2017
4.37 Tuesday, April 4, 2017
4.38 Tuesday, March 28, 2017
4.39 Tuesday, March 21, 2017
4.40 Tuesday, March 14, 2017
4.41 Tuesday, March 7, 2017
4.42 Tuesday, February 28, 2017
4.43 Tuesday, February 21, 2017
4.44 Tuesday, February 14, 2017
4.45 Tuesday, February 7, 2017
4.46 Tuesday, January 31, 2017
4.47 Tuesday, January 24, 2017
4.48 Tuesday, January 17, 2017
4.49 Tuesday, January 10, 2017
4.50 Tuesday, January 3, 2017

4.1 Tuesday, December 26, 2017

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

[How fast is my fidget spinner spinning? A sound experiment!] https://mathematica.stackexchange.com/questions/162303/how-fast-is-my-fidget-spinner-spinning-a-sound-experiment

I would like to measure how fast my 6-bladed fidget spinner spins. To do so, after giving it a hard spin, I gently touch the spinner with a wooden stirring stick to create a buzzing sound which ...

- asked by Miladiouss (17 votes), answered by Miladiouss (10 votes)

—————————-

[Sub-packages and auto-completion] https://mathematica.stackexchange.com/questions/162386/sub-packages-and-auto-completion

Cross-posted on Wolfram Community

I have a Mathematica application that consists of two sub-packages, corresponding to the contexts foo‘ (foo.m) and foo‘b‘ (b.m). Some of the definitions in foo.m ...

- asked by Szabolcs (11 votes), answered by b3m2a1 (2 votes)

—————————-

[Why does Cases not find a match to the pattern using nˆ  _. when n is a number other than 1?] https://mathematica.stackexchange.com/questions/162559/why-does-cases-not-find-a-match-to-the-pattern-using-n-when-n-is-a-number-oth

I am not good in patterns in Mathematica, and so can’t figure what I am doing wrong.

This example works, when the exponent is 1

ClearAll[y,x,n] 
Cases[{( y[x]/x)^1}, (y[x]/x )^(n_.) :&gt; n]

But ...

- asked by Nasser (10 votes), answered by m_goldberg (9 votes)

—————————-

[How to make an Epilog moveable with drag and drop] https://mathematica.stackexchange.com/questions/162572/how-to-make-an-epilog-moveable-with-drag-and-drop

I would like to make an Epilog moveable. For example, the following code generates a Manipulate with a framed pane containing some notes. I would like the user to be able to move those notes anywhere ...

- asked by Michael McCain (8 votes), answered by Mike Honeychurch (9 votes)

—————————-

[Map every second element of a list] https://mathematica.stackexchange.com/questions/162334/map-every-second-element-of-a-list

I’ve loaded a CSV:

Colors = Import[ 
  "d:\\bitbucket\\diversity\\data\\nlcd\\nlcd-colors.csv", "CSV"] 
{{0., " 0.00000000000 0.00000000000 0.00000000000"}, {11., 
  " 0.27843137255 0.41960784314  ...

- asked by pnz (8 votes), answered by Kuba (13 votes)

—————————-

[Table of precedence values for all System‘ symbols] https://mathematica.stackexchange.com/questions/162474/table-of-precedence-values-for-all-system-symbols

Has anyone created a table listing the precedences for all symbols? Also, it would be nice if there were a function that for a given precedence value or interval, returned all the symbols with that ...

- asked by Carl Woll (7 votes), answered by Carl Woll (8 votes)

—————————-

[How to make a custom DynamicImage which support mouse wheel and show pixel value?] https://mathematica.stackexchange.com/questions/162311/how-to-make-a-custom-dynamicimage-which-support-mouse-wheel-and-show-pixel-value

The built-in DynamicImage just click the plus sign or minus sign to rescale the image. I have to say click is a not very good operation. Could we make the custom DynamicImage which support the mouse ...

- asked by yode (7 votes), answered by M.R. (3 votes)

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

[xkcd-style Plots] https://mathematica.stackexchange.com/questions/11350/xkcd-style-plots

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

- asked by Amatya (553 votes), answered by Simon Woods (409 votes)

—————————-

[Why round to even integers?] https://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 ...

- asked by wxffles (69 votes), answered by Per Alexandersson (43 votes)

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

[How can I check that a graph is edge weighted, fast?] https://mathematica.stackexchange.com/questions/162391/how-can-i-check-that-a-graph-is-edge-weighted-fast

I need to check if a graph is edge-weighted while maintaining good performance.

This should be an easy task, but it is not. It is a good example of why it is so terribly frustrating to work with ...

- asked by Szabolcs (5 votes)

—————————-

[contour of inside of a volume] https://mathematica.stackexchange.com/questions/162306/contour-of-inside-of-a-volume

I have the following volume:

RegionPlot3D[-j^2*y^2 + j*l &lt; 11, {l, 0, 10}, {j, 0, 10}, {y, 0, 1}]

However, I am not able to obtain a 2D graph from it (contour), which shows the region inside the ...

- asked by Darrin Cope (1 vote)

—————————-

[Finsler or Lagrange geometry package?] https://mathematica.stackexchange.com/questions/162489/finsler-or-lagrange-geometry-package

I was wondering if there exist any packages or examples of work on Finsler-Lagrange geometry. I need it to do symbolic calculations, as for example calculations of non-linear connection coefficients, ...

- asked by Athis Startis (1 vote)

4.2 Tuesday, December 12, 2017

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

[Why does Mathematica results differ from C++ results within machine precision?] https://mathematica.stackexchange.com/questions/161716/why-does-mathematica-results-differ-from-c-results-within-machine-precision

I am trying to wrap my head around floating-point precision. Performing the following numeric operation:

275./6.*1.03692775514337

in Mathematica and C++ and taking the difference of the two results ...

- asked by Knowledge (22 votes), answered by ilian (44 votes)

—————————-

[Bug with Block & Lookup: Scope Variable Leak] https://mathematica.stackexchange.com/questions/161616/bug-with-block-lookup-scope-variable-leak

After debugging a large chunk of code, I could identify this MWE.

ClearAll@test 
test[var_String]:= Block[{association}, 
    association = &lt;|"x"-&gt; &lt;|"key01"-&gt; "ok"|&gt;|&gt;[var]; 
     ...

- asked by Murta (22 votes), answered by Albert Retey (15 votes)

—————————-

[Why is "k" in the output of Sum[Log[k]/k^k, {k,1,Infinity}]?] https://mathematica.stackexchange.com/questions/161704/why-is-k-in-the-output-of-sumlogk-kk-k-1-infinity

NSum[Log[k]/k^k, {k,1,Infinity}, WorkingPrecision-&gt;50] 
(* 0.219947267975228664843531307905860703797097130 *) 
 
 
But 
 
Sum[Log[k]/k^k, {k,1,Infinity}] 
(* -(PolyLog^(1,0))[0,1/k] *) 
 
 
What does "k" in  ...

- asked by Vaclav Kotesovec (13 votes)

—————————-

[Simulating molecular dynamics efficiently] https://mathematica.stackexchange.com/questions/161471/simulating-molecular-dynamics-efficiently

The following website offers a very nice molecular dynamics simulation: http://physics.weber.edu/schroeder/md/. It is pretty neat and quite a few physical phenomena can be described from that small ...

- asked by anderstood (13 votes), answered by Henrik Schumacher (16 votes)

—————————-

[Why is listable not an attribute of the Set function?] https://mathematica.stackexchange.com/questions/161428/why-is-listable-not-an-attribute-of-the-set-function

The following is a list of attributes for the Set function:

Attributes[Set]

HoldFirst, Protected, SequenceHold

Why is Listable not included?

- asked by S.V (13 votes), answered by Kuba (16 votes)

—————————-

[How to improve quality of this Plot3D] https://mathematica.stackexchange.com/questions/161771/how-to-improve-quality-of-this-plot3d

I tried driving up PlotPoints and MaxRecursion but the intersections look weird, is there some other trick I can do?

plot = Plot3D @@ {Abs[Sqrt[x] + Sqrt[y]] /. {x -&gt; Sin[2 x], 
     y -&gt; Cos[2  ... 

- asked by Yaroslav Bulatov (10 votes), answered by Nasser (11 votes)

—————————-

[How can I tell Mathematica to interpret 0xffff as a hexadecimal number?] https://mathematica.stackexchange.com/questions/161646/how-can-i-tell-mathematica-to-interpret-0xffff-as-a-hexadecimal-number

I am stuck. I would like Mathematica simply accept 0x as a prefix Operator for Hexadecimal Numbers. I know that 0x is interpreted as 0*x, so maybe this is just not possible. I am a programmer and am ...

- asked by Mark (9 votes), answered by Carl Woll (16 votes)

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

[Image processing: Floor plan - detecting rooms’ borders (area) and room names’ texts] https://mathematica.stackexchange.com/questions/19546/image-processing-floor-plan-detecting-rooms-borders-area-and-room-names-t

Here is a simple building floor plan. I would like to derive the rooms as (rectangular) components and the names of the rooms. This is very common representation of building floor plans.

The ...

- asked by s.s.o (52 votes), answered by nikie (52 votes)

—————————-

[How to create effect like Van Gogh’s stroke brush?] https://mathematica.stackexchange.com/questions/39003/how-to-create-effect-like-van-goghs-stroke-brush

I need to apply Van Gogh’s stroke brush effect to a random image

Take the following image as an example:

Thank you so much if you could help!

- asked by user10495 (30 votes), answered by Simon Woods (42 votes)

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

[How to export graphics to SVG in script executed through cron?] https://mathematica.stackexchange.com/questions/161756/how-to-export-graphics-to-svg-in-script-executed-through-cron

I have a Wolfram script that generates plots, and exports them by evaluating expressions of the form

Export["/path/to/some.svg", myPlot];

The script works as intended when I run it from the [Unix] ...

- asked by kjo (3 votes)

—————————-

[Is it possible to prevent LUDecompositon from pivoting?] https://mathematica.stackexchange.com/questions/161552/is-it-possible-to-prevent-ludecompositon-from-pivoting

By construction LUDecomposition performs LU-decomposition with pivoting, i.e. with row permutations (otherwise the decomposition may not exist). Is it possible to tell Mathematica not to use pivoting ...

- asked by faleichik (1 vote)

—————————-

[How Many of R’s Functionalities Are Available From Inside Mathematica?] https://mathematica.stackexchange.com/questions/161664/how-many-of-rs-functionalities-are-available-from-inside-mathematica

When R is linked to Mathematica, how many of its functionalities are available from inside of Mathematica?

- asked by Glenford Mc Ewen (2 votes)

4.3 Tuesday, December 5, 2017

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

[Sharing small code snippets] https://mathematica.stackexchange.com/questions/161269/sharing-small-code-snippets

As part of my never-ending goal of getting Mathematica code to be as easily shared as python packages I was recently thinking about how to make code easy to share.

So what’s are some good ways to ...

- asked by b3m2a1 (19 votes), answered by b3m2a1 (13 votes)

—————————-

[InverseTotient[ ]?] https://mathematica.stackexchange.com/questions/160949/inversetotient

Maple has a function InverseTotient( c ), which returns all those natural numbers \(n\) whose Euler totient function \(\phi ( n ) = c\). Is there an equivalent inverse of EulerPhi[ ] in Mathematica? If ...

- asked by Joseph O’Rourke (11 votes), answered by Michael E2 (18 votes)

—————————-

[What are the counterparts in Wolfram to left and right division of a matrix in other programming language, e.g. Julia and MATLAB?] https://mathematica.stackexchange.com/questions/161301/what-are-the-counterparts-in-wolfram-to-left-and-right-division-of-a-matrix-in-o

Sometimes, to find the inverse of a matrix is a labor-consuming task or even "disgusting", especially when the matrix is "ill". It is said, e.g. in Julia, that the left/right division operation is ...

- asked by Alexander Zeng (10 votes), answered by C. E. (12 votes)

—————————-

[How to perform Loop subdivision on a triangle mesh with Mathematica?] https://mathematica.stackexchange.com/questions/161331/how-to-perform-loop-subdivision-on-a-triangle-mesh-with-mathematica

Every now and then, the question pops up how a given geometric mesh (e.g. a MeshRegion) can be refined to produce a i.) finer and ii.) smoother mesh. For example, the following triangle mesh from the ...

- asked by Henrik Schumacher (9 votes), answered by Henrik Schumacher (11 votes)

—————————-

[How to speed up ‘RotationMatrix‘?] https://mathematica.stackexchange.com/questions/161230/how-to-speed-up-rotationmatrix

I frequently run into the situation that I have to apply RotationMatrix to a huge bunch of 3D vectors and angles for numerical computations. On the one hand, the syntax of RotationMatrix forces me to ...

- asked by Henrik Schumacher (9 votes), answered by Henrik Schumacher (15 votes)

—————————-

[How to create (Header + Main area + Settings pane) notebook layout] https://mathematica.stackexchange.com/questions/161203/how-to-create-header-main-area-settings-pane-notebook-layout

cross-posted in community.wolfram.com

The goal is something like in the picture below.

Basic? I dare you to try to implement it in a manageable, scalable and flexible way.

Requirements:

The ...

- asked by Kuba (7 votes), answered by Mike Honeychurch (1 vote)

—————————-

[MaTeX and https://mathematica.stackexchange.com/questions/161219/matex-and-phantom

My understanding of the irective is that it should preserve the sizes of all elements in the expression. But when I try this:

m1 = Inset[MaTeX["\\sqrt{\\phantom{a^2}b}", Magnification -&gt;  ...

- asked by Wynne (7 votes), answered by Nasser (12 votes)

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

[Elegant operations on matrix rows and columns] https://mathematica.stackexchange.com/questions/3069/elegant-operations-on-matrix-rows-and-columns

Question

The Mathematica tutorial has a section ’Basic Matrix Operations’, describing operations like transpose, inverse and determinant. These operations all work on entire matrices. I am missing a ...

- asked by sjdh (148 votes), answered by Mr.Wizard (50 votes)

—————————-

[How to create effect like Van Gogh’s stroke brush?] https://mathematica.stackexchange.com/questions/39003/how-to-create-effect-like-van-goghs-stroke-brush

I need to apply Van Gogh’s stroke brush effect to a random image

Take the following image as an example:

Thank you so much if you could help!

- asked by user10495 (30 votes), answered by Simon Woods (42 votes)

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

[Is there any code formatting style reference?] https://mathematica.stackexchange.com/questions/161344/is-there-any-code-formatting-style-reference

Is there any code formatting style reference for Wolfram Language similar to https://www.python.org/dev/peps/pep-0008/ and https://google.github.io/styleguide/javaguide.html? I’m teaching some people ...

- asked by qazwsx (4 votes)

—————————-

[Plot spectrum Fourier Transform] https://mathematica.stackexchange.com/questions/161381/plot-spectrum-fourier-transform

i want to plot the spectrum of the following function. I hope that anybody is able to help me. I don’t know how to plot the dirac delta function. I tried it this way but it didnťt work so far. Thanks! ...

- asked by Luke (1 vote)

—————————-

[Wrapper for mathematica code with GUI] https://mathematica.stackexchange.com/questions/160966/wrapper-for-mathematica-code-with-gui

I have a code written in Mathematica. What I am trying to do is to write a wrapper (say using Python) that will take user input for the Mathematica code, run the code, and create output.

I do not ...

- asked by CuriousCoder (2 votes)

4.4 Tuesday, November 28, 2017

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

[The fastest thing since sliced cubes?] https://mathematica.stackexchange.com/questions/160527/the-fastest-thing-since-sliced-cubes

I’ve fallen down a rabbit hole recently, and need a reality check.

Suppose you have an arbitrary unit vector, \(u \in \mathbf {R}^3\), and you cut up the unit cube into slices orthogonal to \(u\) with ...

- asked by aardvark2012 (18 votes), answered by ybeltukov (7 votes)

—————————-

[Mathematica does not respect linearity of integral] https://mathematica.stackexchange.com/questions/160655/mathematica-does-not-respect-linearity-of-integral

I have the following issue, trying to evaluate an integral. Mathematica tells me

Integrate[x^2 (1 + x^2)^(1/2) + y + z, {x, y, z}  Sphere[{0, 0, 0}, 1]] 
 
(* 1/2  (3 Sqrt[2] - Log[2 (2 + Sqrt[2])])  ...

- asked by Simone Melchiorre Chiarello (14 votes), answered by Itai Seggev (8 votes)

—————————-

[How to obtain the cell-adjacency graph of a mesh?] https://mathematica.stackexchange.com/questions/160443/how-to-obtain-the-cell-adjacency-graph-of-a-mesh

Given an arbitrary mesh region, how can I efficiently obtain the graph describing the adjacency structure of mesh cells?

For example, given the following mesh,

SeedRandom[123] 
pts = RandomReal[1,  ...

- asked by Szabolcs (10 votes), answered by Henrik Schumacher (11 votes)

—————————-

[Can a symbol have both OwnValues and DownValues?] https://mathematica.stackexchange.com/questions/160740/can-a-symbol-have-both-ownvalues-and-downvalues

Mathematica Version 11.2 desktop / Windows 10 Pro 64-bit

I am trying to understand if a symbol can have both OwnValues and DownValues.

Is this acceptable or not acceptable?

As an experiment, I ...

- asked by John (10 votes), answered by m_goldberg (11 votes)

—————————-

[Differences between DSolve and NDSolve] https://mathematica.stackexchange.com/questions/160560/differences-between-dsolve-and-ndsolve

I have a question about the difference in the solution between DSolve and NDSolve.

I want to solve the Friedmann equation of

\begin {align} 3\left (\frac {\dot {a}^2}{a^2}+\frac {k}{a^2}\right )=8\pi \end {align}

- asked by user85503 (10 votes), answered by Michael E2 (10 votes)

—————————-

[How to check if a vector is an eigenvector of a matrix using mathematica?] https://mathematica.stackexchange.com/questions/160801/how-to-check-if-a-vector-is-an-eigenvector-of-a-matrix-using-mathematica

Here is a vector

\[\begin {pmatrix}i\\7i\\-2\end {pmatrix}\]

Here is a matrix

$$\begin{pmatrix}2&amp; i&amp;0\\-i&amp;1&amp;1\\0 &amp;1&amp;0\end{pmatrix}$$

Is there a simple way to determine ...

- asked by Conor Cosnett (8 votes), answered by Michael E2 (5 votes)

—————————-

[How do I read values from photocells connected to analog pins of Arduino Uno?] https://mathematica.stackexchange.com/questions/160761/how-do-i-read-values-from-photocells-connected-to-analog-pins-of-arduino-uno

Generally, I need to connect my Arduino Uno to Mathematica and read 3 analog values from A0, A1, A2 in real-time.

As I understand, I have 2 ways of connecting Arduino to Mathematica:

First: I have a ...

- asked by Aleksandr Berezutskii (8 votes), answered by Suba Thomas (2 votes)

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

[How to manipulate 2D plots?] https://mathematica.stackexchange.com/questions/7142/how-to-manipulate-2d-plots

When it comes to visual analysis, large datasets or data with intricate internal details often makes plotting in 2D useless, as the outcome is either just a fraction of the full dataset, or no details ...

- asked by István Zachar (124 votes), answered by István Zachar (142 votes)

—————————-

[How to find the position of elements in a list satisfying criteria] https://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  ...

- asked by PeterR (47 votes), answered by J. M. (46 votes)

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

[Default options of LinearSolve] https://mathematica.stackexchange.com/questions/160693/default-options-of-linearsolve

I would like to know what is the default options of LinearSolve when using LinearSolve[A,b], where A is a sparse matrix. There are several methods available such as Cholesky and Krysol etc., see here. ...

- asked by Wilhelm (1 vote)

—————————-

[Prevent Semi-Transparent Pixels in Export] https://mathematica.stackexchange.com/questions/160578/prevent-semi-transparent-pixels-in-export

I’ve noticed that when I export plots in Mathematica without a background, a lot of the text ends being made of semi-transparent pixels. For example:

myplot = ContourPlot[Cos[x] + Cos[y], x, 0, 4 ...

- asked by ereHsaWyhsipS (1 vote)

—————————-

[Identifying the range of the voice] https://mathematica.stackexchange.com/questions/160731/identifying-the-range-of-the-voice

I’m trying to do an equalization in an audio program called Audition.

To have a good voice equalization, I need to have a frequency range of my voice.

A minimum value and a maximum frequency value.

...

- asked by LCarvalho (2 votes)

4.5 Tuesday, November 21, 2017

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

[Is it possible to construct a fullform trace function] https://mathematica.stackexchange.com/questions/160184/is-it-possible-to-construct-a-fullform-trace-function

Is it possible to construct a FullFormTrace function that takes an arbitrary expression and prints a sequence (or returns a list) of the evaluation steps in full form. For instance

...

- asked by Bob Ueland (13 votes), answered by Edmund (15 votes)

—————————-

[Integrate gives wrong result for simple function] https://mathematica.stackexchange.com/questions/160278/integrate-gives-wrong-result-for-simple-function

(probably) Bug introduced in 9.0 or earlier and persisting through 11.2

It looks like this.

NIntegrate[1/(2 + Sin[x + y]), {x, 0, 2 Pi}, {y, 0, 2 Pi}] 
22.7929 
Integrate[1/(2 + Sin[x + y]), {x, 0,  ...

- asked by huotuichang (10 votes), answered by Nasser (8 votes)

—————————-

[Select the same elements from lists] https://mathematica.stackexchange.com/questions/160222/select-the-same-elements-from-lists

I need a special intersectant operation for List other than Set.

There maybe some duplicate elements, also need to count instead of merging as Intersection.

For example:

...

- asked by GalAster (10 votes), answered by jjc385 (11 votes)

—————————-

[Building a convenient package distribution system] https://mathematica.stackexchange.com/questions/160330/building-a-convenient-package-distribution-system

The PacletManager is nice, but it’s not really a low-effort system to work with.

Installing a package can be made pretty easy, but only if the location from which it is to be installed makes it so.

...

- asked by b3m2a1 (8 votes)

—————————-

[How to merge two lists with different dimensions] https://mathematica.stackexchange.com/questions/160159/how-to-merge-two-lists-with-different-dimensions

I have two list, just like

a={a1,a2,a3,a4}; 
b={b1,b2,b3,b4,b5};

I want merge them and save to excel, as they have different dimention, so I want it have the following format.

...

- asked by zongxian (7 votes), answered by Carl Woll (12 votes)

—————————-

[What is the elegant way of applying function to two lists?] https://mathematica.stackexchange.com/questions/160028/what-is-the-elegant-way-of-applying-function-to-two-lists

I am interested in finding the most concise elegant way of doing the following: We have a function fun[x1,x2] and two lists:

ls1={a1,a2,a3,a4,......} 
 
and 
 
ls2={b1,b2,b3,b4,......}

I ...

- asked by qahtah (7 votes), answered by halirutan (11 votes)

—————————-

[Legend displaying the expected number of points per unit area next to density plot] https://mathematica.stackexchange.com/questions/160193/legend-displaying-the-expected-number-of-points-per-unit-area-next-to-density-pl

I have 2d points and want to show a colored density plot of them. I also want to display a legend showing which point density (number of points per unit area) the colors in the plot represent.

Let’s ...

- asked by mrz (6 votes), answered by C. E. (7 votes)

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

[Creating legends for plots with multiple lines?] https://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  ...

- asked by Eiyrioü von Kauyf (63 votes), answered by Jens (92 votes)

—————————-

[What does # mean in Mathematica?] https://mathematica.stackexchange.com/questions/19035/what-does-mean-in-mathematica

I asked Mathematica to compute the following

Solve[c (1-x)^2-x^(1/4) == 0, x] 
 
and it returned this: 
 
  x = Root[#1^8 c^4 - 8 #1^7 c^4 + 28 #1^6 c^4 - 56 #1^5 c^4 + 70 #1^4 c^4 - 56 #1^3 c^4 + 28  ...

- asked by ronanymous (21 votes), answered by Dr. belisarius (46 votes)

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

[Convergent infinite sum fails to converge in Sum[...]] https://mathematica.stackexchange.com/questions/160280/convergent-infinite-sum-fails-to-converge-in-sum

It looks like this.

Limit[Sum[1/((2 n + 1) Pi I - x), {n, -m, m}], m -&gt; ] 
= -(1/2) Tanh[x/2] 
 
Sum[1/((2 n + 1) Pi I - x), {n, -, }] 
Sum::div: Sum does not converge.

Turning on Regularization ...

- asked by huotuichang (1 vote)

—————————-

[Stacked BarChart with Callout] https://mathematica.stackexchange.com/questions/159945/stacked-barchart-with-callout

BarChart examples include this code :

BarChart[Table[Callout[RandomReal[{0, 1}], Unique["text"]], 2, 8], 
   BarSpacing -&gt; 2, ChartLayout -&gt; "Stacked"]

Its result should be :

But I can’t ...

- asked by qwerty (2 votes)

—————————-

[Possible to add a Heading for the columns in HDF5 format?] https://mathematica.stackexchange.com/questions/159978/possible-to-add-a-heading-for-the-columns-in-hdf5-format

A similar post was found here, but it’s not using MMA.

A small test to export HDF5 file,

Export["test.h5", { "summary_Shoe" -&gt; anssummary, "summary_Tie" -&gt; anssummaryTie}]

Woks fine.

But ...

- asked by Chen Stats Yu (3 votes)

4.6 Tuesday, November 14, 2017

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

[Drawing Clifford Attractors in Mathematica] https://mathematica.stackexchange.com/questions/159668/drawing-clifford-attractors-in-mathematica

I came upon the "Clifford Attractor" today, which are equations of the form: \[x_{n+1}=\sin (a\ y_n) + c \cos (x_n)\] \[y_{n+1}=\sin (b\ x_n) + d \cos (y_n)\]

They create some incredible images by ...

- asked by TreFox (24 votes), answered by Szabolcs (32 votes)

—————————-

[Mismatch between Mathematica and COMSOL in 3D FEM problem] https://mathematica.stackexchange.com/questions/159506/mismatch-between-mathematica-and-comsol-in-3d-fem-problem

I would like to solve an advection-diffusion problem on a torus domain. There are three Dirichlet conditions: One at the inlet (concentration \(c=0\)), one at the outlet (\(c=0.5\)) and one at the wall ...

- asked by Alexander Erlich (16 votes)

—————————-

[Unexpected behaviors in built-in functions] https://mathematica.stackexchange.com/questions/159895/unexpected-behaviors-in-built-in-functions

Existence of this topic is discussed in this mathematica.meta post.

I’m sure I am not the only non-beginner in WL who from time to time finds themselves not being able to predict an outcome of a ...

- asked by Kuba (14 votes), answered by Kuba (6 votes)

—————————-

[How to create a faded image using an existing image file] https://mathematica.stackexchange.com/questions/159662/how-to-create-a-faded-image-using-an-existing-image-file

The question is simple:

How can I take an image of a perfect stamp (load an image file) such as

and make it look old, worn, and faded, with missing arbitrary small bits, like the following stamp

...

- asked by Vaggelis_Z (12 votes), answered by nikie (27 votes)

—————————-

[Building a Noisy Function] https://mathematica.stackexchange.com/questions/159614/building-a-noisy-function

Here’s a nice function with a nice plot:

f[t_] := Exp[-Abs[t]] Sin[t]; 
Plot[f[t], {t, -10, 10}, PlotRange -&gt; All]

What I would like to do is to make it noisy... to add something to f[t] so ...

- asked by bill s (10 votes), answered by David G. Stork (9 votes)

—————————-

[Inaccurate (non-smooth) boundary of the mesh generated by ToElementMesh] https://mathematica.stackexchange.com/questions/159775/inaccurate-non-smooth-boundary-of-the-mesh-generated-by-toelementmesh

I try to generate a mesh over a region, which has a wavy boundary at its bottom and needs very fine mesh around the bottom.

However, the generated mesh boundary is not as smooth as the specified one. ...

- asked by Wilhelm (8 votes), answered by user21 (4 votes)

—————————-

[remove transparency of background Image] https://mathematica.stackexchange.com/questions/159837/remove-transparency-of-background-image

I have the following image:

As you can see the background is kind of white-ish. Now my question is: How can I remove this transperancy of the background image ?

- asked by totyped (8 votes), answered by Coolwater (10 votes)

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

[Creating Mathematica packages] https://mathematica.stackexchange.com/questions/29324/creating-mathematica-packages

I’m building a package to help me write packages and their documentation. In this post I explained how to make a package and its documentation. In the answer I provided I describe how to build a very ...

- asked by jmlopez (91 votes), answered by Leonid Shifrin (122 votes)

—————————-

[Difference between != and =!=] https://mathematica.stackexchange.com/questions/153694/difference-between-and

I (think I) understand the difference between == (semantic) and === (syntactic). So when comparing != and =!= I was expecting a similar difference. So can anyone explain why the third line in this ...

- asked by GambitSquared (6 votes), answered by John Joseph M. Carrasco (12 votes)

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

[On comparable hardware, is Mathematica known to perform better in one operating system over the others?] https://mathematica.stackexchange.com/questions/159699/on-comparable-hardware-is-mathematica-known-to-perform-better-in-one-operating

Have any benchmarks been published by Wolfram Research to compare the performance of Mathematica in the major operating systems (Windows 10, Linux, MacOS)? If not, has anyone here performed such ...

- asked by Shredderroy (7 votes)

—————————-

[Adjusting opacity in map overlays] https://mathematica.stackexchange.com/questions/159843/adjusting-opacity-in-map-overlays

I am currently working with rainfall data from hurricane Harvey in order to better understand how to allocate resources in the event of another disaster. I want to accomplish a few things given this ...

- asked by Harrison Whorf (3 votes)

—————————-

[how to count or extract Cases out of list of association that matches pattern] https://mathematica.stackexchange.com/questions/159783/how-to-count-or-extract-cases-out-of-list-of-association-that-matches-pattern

I have list of associations

lr1 = {&lt;|a -&gt; {0,0}, b -&gt; "TRUE"|&gt;, &lt;|b -&gt; "FALSE", a -&gt; {0,1}|&gt;, &lt;|a -&gt; {1,0}, b -&gt; "FALSE"|&gt;, &lt;|b -&gt; "TRUE", a -&gt;  ...

- asked by Dragutin (4 votes)

4.7 Tuesday, November 7, 2017

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

[Automatic edX Pdf Handout creator] https://mathematica.stackexchange.com/questions/159065/automatic-edx-pdf-handout-creator

I am trying to make an automatic handout creator for my courses on edX. It took me a long time to do it...

(If you don’t know edX: https://www.edx.org/

I wrote a program that adds to each slide ...

- asked by totyped (14 votes), answered by M. Stern (4 votes)

—————————-

[The area of a unit disk is \(2\pi \)? (NIntegrate over a numerical region)] https://mathematica.stackexchange.com/questions/159194/the-area-of-a-unit-disk-is-2-pi-nintegrate-over-a-numerical-region

EDIT: The example below concerns the construction of a numerical region from a general boolean-valued function. The question of how to properly construct such a region has been answered below (by M. ...

- asked by Will.Mo (13 votes), answered by m_goldberg (12 votes)

—————————-

[How many Capitals are closer to me than my own?] https://mathematica.stackexchange.com/questions/159041/how-many-capitals-are-closer-to-me-than-my-own

A recent question in chat about "When you are in Aachen, Germany, five other countries capitals are closer than Berlin." triggered me to try to write something to find the cities automatically for ...

- asked by pH13 - Yet another Philipp (9 votes), answered by J. M. (4 votes)

—————————-

[How to SortBy Last and in Reverse order?] https://mathematica.stackexchange.com/questions/159295/how-to-sortby-last-and-in-reverse-order

I am looking at the two functions SortBy and ReverseSort.

SortBy[{{1, 2, 3}, {2, 3, 1}, {3, 1, 2}, {2, 2}}, Last] 
 
    {{2, 3, 1}, {2, 2}, {3, 1, 2}, {1, 2, 3}} 

How do I sort this by the ...

- asked by Chen Stats Yu (7 votes), answered by J. M. (7 votes)

—————————-

[CatalanNumber[-1] formula on functions.wolfram.com unequals result from Mathematica] https://mathematica.stackexchange.com/questions/159143/catalannumber-1-formula-on-functions-wolfram-com-unequals-result-from-mathemat

The formula for CatalanNumber[-1] on this functions.wolfram.com page gives: 
 
-(1/2) 
 
whereas CatalanNumber[-1] directly evaluated gives? 
 
-1

- asked by axelclk (7 votes), answered by J. M. (8 votes)

—————————-

[DiscretizeGraphics issues with transformations] https://mathematica.stackexchange.com/questions/159035/discretizegraphics-issues-with-transformations

I noticed DiscretizeGraphics does not work correctly with transformed Graphics such as

Graphics[Rotate[Rectangle[], 30ř]]

Both using Rotate and GeometricTransformation together with ...

- asked by Sascha (7 votes), answered by aardvark2012 (5 votes)

—————————-

[How to locate a stream line starting from a saddle point?] https://mathematica.stackexchange.com/questions/159093/how-to-locate-a-stream-line-starting-from-a-saddle-point

I read in a table of gradient vectors and plot using the ListStreamPlot. I want to locate and color the line that represents the "boundary" of the flux. A flux line that 1)starts from a saddle point ...

- asked by Jun Liu (6 votes)

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

[What are the most common pitfalls awaiting new users?] https://mathematica.stackexchange.com/questions/18393/what-are-the-most-common-pitfalls-awaiting-new-users

As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...

- asked by Dr. belisarius (407 votes), answered by Michael E2 (238 votes)

—————————-

[Image processing: Floor plan - detecting rooms’ borders (area) and room names’ texts] https://mathematica.stackexchange.com/questions/19546/image-processing-floor-plan-detecting-rooms-borders-area-and-room-names-t

Here is a simple building floor plan. I would like to derive the rooms as (rectangular) components and the names of the rooms. This is very common representation of building floor plans.

The ...

- asked by s.s.o (52 votes), answered by nikie (52 votes)

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

[Editing pdf files with Mathematica] https://mathematica.stackexchange.com/questions/159074/editing-pdf-files-with-mathematica

As an example, consider this pdf file.

Would it be possible to edit the pdf, such as removing a logo, the page numbering and even frames, and save the result as a pdf? I would like to keep the pdf ...

- asked by anderstood (4 votes)

—————————-

[A question concerning a generalization of HypergeometricPFQ] https://mathematica.stackexchange.com/questions/159242/a-question-concerning-a-generalization-of-hypergeometricpfq

I have been trying to find explicit formulas for the real and imaginary parts of the Wolfram function EllipticK. An interesting formula for the real part of EllipticK evaluated at a complex number is ...

- asked by John M. Campbell (1 vote)

—————————-

[Export cdf does not work in MathKernel command line] https://mathematica.stackexchange.com/questions/159210/export-cdf-does-not-work-in-mathkernel-command-line

I am using Mathematica through command line MathKernel. I am not trying to draw any graphics in the console. But I should be able to export things a CDF. Why can’t I export a CDF through command line ...

- asked by Neel Basu (2 votes)

4.8 Tuesday, October 31, 2017

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

[Implementing a planetary terrain generation algorithm] https://mathematica.stackexchange.com/questions/158843/implementing-a-planetary-terrain-generation-algorithm

From this (now deleted) question I found this site where the author discusses a simple technique for random terrain generation on a sphere.

The method discussed is as follows:

start with a ...

- asked by b3m2a1 (18 votes), answered by b3m2a1 (19 votes)

—————————-

[Performance of Select] https://mathematica.stackexchange.com/questions/158583/performance-of-select

I have a data set of about 4*10^6 3d-coordinates.

From this volume I am sequentially selecting coordinates along one axis and manipulating this subset.

My question: can the Select function be ...

- asked by mrz (15 votes), answered by kglr (23 votes)

—————————-

[Create a simple split tree] https://mathematica.stackexchange.com/questions/158858/create-a-simple-split-tree

I am trying to create a simple split tree.

The growth should be only upwards, the vertical element length constant (1), the size of the horizontal bars should be halved in each iteration and the ...

- asked by Niki (12 votes), answered by m_goldberg (10 votes)

—————————-

[Easy printing of executable code] https://mathematica.stackexchange.com/questions/158901/easy-printing-of-executable-code

I’m working on a package that has functions that call other existing and packaged functions. I’d like a way to output what some of those key calls are, so users can see what’s happening under the ...

- asked by Chris K (9 votes), answered by Szabolcs (10 votes)

—————————-

[Two bouncing balls in 1 dimension, issues with two different methods?] https://mathematica.stackexchange.com/questions/158857/two-bouncing-balls-in-1-dimension-issues-with-two-different-methods

I’m trying to simulate 2 balls with the same mass and diameter bouncing one on top of another under gravity, see the illustration below (not ideal, but this is the best result I’ve got so far, the ...

- asked by Yuriy S (8 votes), answered by b3m2a1 (7 votes)

—————————-

[Receive macOS notification when evaluation finishes] https://mathematica.stackexchange.com/questions/158898/receive-macos-notification-when-evaluation-finishes

Is Mathematica able to communicate with macOS’s native Notification Center in order to notify me if an evaluation finishes in any of my open notebooks?

I’m looking for a solution similar to this one ...

- asked by Casimir (8 votes), answered by Szabolcs (12 votes)

—————————-

[Why does repeated export of JPG-Images consume all memory?] https://mathematica.stackexchange.com/questions/158690/why-does-repeated-export-of-jpg-images-consume-all-memory

I was looking in the history of asked questions for similar questions, but none of the alike questions answered my problem sufficiently. So I ask nevertheless.

My system memory is leaked by simple ...

- asked by sacratus (8 votes)

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

[Is it possible to draw this figure using Mathematica?] https://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 (62 votes), answered by M.R. (87 votes)

—————————-

[Elegant operations on matrix rows and columns] https://mathematica.stackexchange.com/questions/3069/elegant-operations-on-matrix-rows-and-columns

Question

The Mathematica tutorial has a section ’Basic Matrix Operations’, describing operations like transpose, inverse and determinant. These operations all work on entire matrices. I am missing a ...

- asked by sjdh (147 votes), answered by Mr.Wizard (50 votes)

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

[Number Formatting Functions Do Not Evaluate with ExportString] https://mathematica.stackexchange.com/questions/158694/number-formatting-functions-do-not-evaluate-with-exportstring

I need to export in a particular text file format and tried NumberForm, PaddedForm, AccountingForm, and DecimalForm to see which would work best. To my surprise only NumberForm evaluates when ...

- asked by Edmund (3 votes)

—————————-

[DSolve Throw::nocatch: Uncaught Throw[$Failed,balancefail] returned to top level. error in 11.2] https://mathematica.stackexchange.com/questions/158817/dsolve-thrownocatch-uncaught-throwfailed-balancefail-returned-to-top-level

Reported also to WRI. [CASE:3965533]

I am in the process of updating Kamke differentional equations tests for 11.2 when encountered a new error I have not seen before on one of the Kamke ODE’s ...

- asked by Nasser (3 votes)

—————————-

[Solve for several constants using a set of initial conditions] https://mathematica.stackexchange.com/questions/158783/solve-for-several-constants-using-a-set-of-initial-conditions

I have a set of differential equations that I am trying to solve for chemical reaction rate constants. So far I can get DSolve to solve the ODEs with initial conditions which provides the chemical ...

- asked by razzle_dazzle_84 (1 vote)

4.9 Tuesday, October 24, 2017

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

[Strange behavior of Table] https://mathematica.stackexchange.com/questions/158186/strange-behavior-of-table

Whenever I run the code

a = 0; 
code := (a++); 
Table[code; a, {1000}]

I get a list of 1000 zeros. However, if I replace 1000 with 100, then a get a list equal to Range[100]. Is this a bug or am I ...

- asked by Antonio De Juárez (12 votes), answered by Szabolcs (21 votes)

—————————-

[Large increase in integrate result leaf size after version 9. Looking for common cause] https://mathematica.stackexchange.com/questions/158059/large-increase-in-integrate-result-leaf-size-after-version-9-looking-for-common

reported to WRI. [CASE:3960295]

I run the CAS integration tests which contains 15000 integrals over number of Mathematica versions.

I found that the average leaf size of the anti-derivatives ...

- asked by Nasser (12 votes), answered by Itai Seggev (8 votes)

—————————-

[Convert Real packed array of pairs to Complex packed array] https://mathematica.stackexchange.com/questions/158082/convert-real-packed-array-of-pairs-to-complex-packed-array

I have a Real packed array arr. It may have arbitrary depth but 
Last@Dimensions[arr] == 2.  For example, 
 
arr = N@Partition[Partition[Range[24], {2}], 3]

I want to convert it to a Complex packed ...

- asked by Szabolcs (12 votes), answered by Carl Woll (9 votes)

—————————-

[Conversion of Matrix of Characters to a Matrix of Zeros and Ones based on Column Frequency] https://mathematica.stackexchange.com/questions/158465/conversion-of-matrix-of-characters-to-a-matrix-of-zeros-and-ones-based-on-column

I have a matrix of characters that I wish to convert to a matrix of 0’ s and 1’ s. Although the matrix is large[17, 4301], I subsample this for purposes of my question. The matrix is:

 m = {{"T",  ...

- asked by Stuart Poss (11 votes), answered by Nasser (4 votes)

—————————-

[What’s the fastest way to take Mean of a Tensor in given slot?] https://mathematica.stackexchange.com/questions/158345/whats-the-fastest-way-to-take-mean-of-a-tensor-in-given-slot

One should expect that the implementation of the built-in function Mean was quick. However, as I recently observed, this is not true at all, in particular for matrices. Just compare Mean to the ...

- asked by Henrik Schumacher (9 votes), answered by Carl Woll (6 votes)

—————————-

[Animating a Potential Function (eigenfunctions of Laplace’s equation)] https://mathematica.stackexchange.com/questions/158412/animating-a-potential-function-eigenfunctions-of-laplaces-equation

I have written the following DynamicModule. The idea is that you can change the boundary, calculate the eigenfunctions and then animate them. Here is the code:

DynamicModule[{pts, bdr = {{0, 0}, {1,  ...

- asked by Hugh (9 votes), answered by Kuba (8 votes)

—————————-

[How to implement a free version of WebImageSearch?] https://mathematica.stackexchange.com/questions/158134/how-to-implement-a-free-version-of-webimagesearch

I really don’t like functions that I have to pay for, if they can be implemented for free.

Is there a way to get around this pay-wall for WebImageSearch? Perhaps using some other free api or service? ...

- asked by M.R. (9 votes), answered by b3m2a1 (11 votes)

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

[How to express trigonometric equation in terms of of given trigonometric function?] https://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] 
 ...

- asked by Prashant Bhate (27 votes), answered by Simon (34 votes)

—————————-

[Learn Mathematica (Wolfram) Language in one day] https://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 ...

- asked by dimitris (26 votes), answered by masterxilo (11 votes)

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

[How to draw a generic 3D closed shape to be analyzed in AceFEM?] https://mathematica.stackexchange.com/questions/158446/how-to-draw-a-generic-3d-closed-shape-to-be-analyzed-in-acefem

I would like to draw a 3D shape to test my AceGen procedure. I will insert the AceFEM part of my code. In this example, I have performed the analysis on a hexahedron element.

- asked by M.Rock (2 votes)

—————————-

[Kernel crash with KeySelect and repeated keys on list of rules] https://mathematica.stackexchange.com/questions/158421/kernel-crash-with-keyselect-and-repeated-keys-on-list-of-rules

After running

KeySelect[{"a" -&gt; 0, "a" -&gt; 1}, True &amp;]

my kernel either hangs forever (possibly with the eventual warning that "the kernel is not responding to a Dynamic evaluation") or ...

- asked by masterxilo (2 votes)

—————————-

[How to remove circled noise from image] https://mathematica.stackexchange.com/questions/158123/how-to-remove-circled-noise-from-image

Consider a simplified example:

noise

noise = Table[ 
  RandomVariate[ 
    NormalDistribution[1, 0.2]] Sin[Sqrt[x^2 + y^2]]^8, {x, -16, 
   16 - 16/512, 32/512}, {y, -16, 16 - 16/512, 32/512}];

...

- asked by xslittlegrass (3 votes)

4.10 Tuesday, October 17, 2017

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

[Is building an event-based parser possible/reasonable in Mathematica (WL)?] https://mathematica.stackexchange.com/questions/157834/is-building-an-event-based-parser-possible-reasonable-in-mathematica-wl

Too long? Go to Problems section

Background

I like to learn by doing small, sometimes artificial, projects. Among other things I had ’parsers’, and ’stream methods / streams in MMA’ on my to learn ...

- asked by Kuba (11 votes)

—————————-

[Test if a list is a constant integer multiple of another list] https://mathematica.stackexchange.com/questions/157783/test-if-a-list-is-a-constant-integer-multiple-of-another-list

I have a list of lists, and I want to eliminate all the lists that are constant integer multiples of another list. My initial approach was to divide the lists using nested tables.

ex1 = {{1, 1, 1},  ...

- asked by Lokdal (10 votes), answered by Mr.Wizard (9 votes)

—————————-

[Cannot Reproduce Answer to 99576] https://mathematica.stackexchange.com/questions/157889/cannot-reproduce-answer-to-99576

Bug introduced between versions 10.1 and 10.4, and persisting through 11.2. Reported to Wolfram, Inc as CASE:3958778.

Using either 11.2 or 10.4 on Windows 10 (64 bit), I am unable to reproduce the ...

- asked by bbgodfrey (9 votes)

—————————-

[Does ‘SeedRandom‘ give the same set of random numbers across operating systems?] https://mathematica.stackexchange.com/questions/157621/does-seedrandom-give-the-same-set-of-random-numbers-across-operating-systems

If I use

SeedRandom[12345] 
RandomReal[{0,1},100]

I get the same random numbers on two versions of Mathematica: 10.4.1.0 on Windows 10 and 11.1.1.0 on Windows 7.

But does the same seed get the ...

- asked by JimB (9 votes), answered by halirutan (8 votes)

—————————-

[Fill the data of an Association based on a list] https://mathematica.stackexchange.com/questions/157852/fill-the-data-of-an-association-based-on-a-list

Consider the following the list and association.

list1 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; 
asc = &lt;|1 -&gt; a, 4 -&gt; b, 7 -&gt; c, 10 -&gt; d|&gt;;

I would like to create an association which ...

- asked by Anjan Kumar (7 votes), answered by Kuba (5 votes)

—————————-

[How to extract data points from two graphics and find the intersections between them?] https://mathematica.stackexchange.com/questions/157787/how-to-extract-data-points-from-two-graphics-and-find-the-intersections-between

I am working on a mathematical problem called "Buffon’s Needle". Here is the setup I made:

point[v_, u_] := Normalize[v - u] + u 
 
experiment50 = Show[ 
  Graphics[ 
   Table[{ 
     RGBColor[0, 0, 0], 
   ...

- asked by Anna Morales Melgares (7 votes), answered by kglr (7 votes)

—————————-

[How to thread over ragged list while skipping empty sub-lists?] https://mathematica.stackexchange.com/questions/157635/how-to-thread-over-ragged-list-while-skipping-empty-sub-lists

I have a very large ragged list result that is a list of list of pairs where sometimes the sub-list contains the empty list.

res = {{{20, 1}, {200, 2}}, {{}}, {{175, 1}}};

In the above minimal ...

- asked by Edmund (7 votes), answered by kglr (9 votes)

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

[LaTeXand Mathematica] https://mathematica.stackexchange.com/questions/736/latex-and-mathematica

I quite often would like to draw graphics in my LaTeXdocuments using Mathematica. I have encountered three problems. I would like to know if there are any workarounds to these problems

I would ...

- asked by Thomas Rot (108 votes), answered by Simon (40 votes)

—————————-

[Code that generates a mandala] https://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

- asked by zeros (48 votes), answered by Anton Antonov (71 votes)

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

[Export BatchNormalizationLayer as MXNet] https://mathematica.stackexchange.com/questions/157856/export-batchnormalizationlayer-as-mxnet

I just tried to import a net from mathemtica into pythons using MXNet. It works fine with the following manual.

However, as soon as I try to add a BatchNormalizationLayer to my net MXNets bind() ...

- asked by MaxJ (3 votes)

—————————-

[ListPlot point colors by list of colorfunctions] https://mathematica.stackexchange.com/questions/157963/listplot-point-colors-by-list-of-colorfunctions

I would like to display the positions of a collection of particles as a function of time (animated) and color code them based on their velocities. For example, consider 10 particles moving in a 2D ...

- asked by SeanM (1 vote)

—————————-

[Why are Label Pixelated?] https://mathematica.stackexchange.com/questions/157693/why-are-label-pixelated

It seems that Mathematica implements the processing of labels quite different for different plot-functions.

The good -> 
Plot[]: 
 
l1 = GraphPlot[Table[i -&gt; 1, {i, 0, 1}]] 
TPlot = Plot[{Cos[x],  ...

- asked by Freeman (2 votes)

4.11 Tuesday, October 10, 2017

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

[How can I determine the type of a packed array?] https://mathematica.stackexchange.com/questions/157484/how-can-i-determine-the-type-of-a-packed-array

Packed arrays can be of type Integer, Real or Complex. Knowing that an array arr is packed, how can I efficiently determine its type?

- asked by Szabolcs (15 votes), answered by Szabolcs (17 votes)

—————————-

[Deleting sublists from lists] https://mathematica.stackexchange.com/questions/157267/deleting-sublists-from-lists

I have a list consisting of symbols and integers. I would like to delete the integers from the list only if a symbol precedes and follows each integer:

testList={a,b,3,c,4,5,d,e,f,1,g,4}

becomes:

...

- asked by Suite401 (12 votes), answered by jjc385 (13 votes)

—————————-

[Summation bug in 11.2] https://mathematica.stackexchange.com/questions/157290/summation-bug-in-11-2

If I sum all the positive-numbered Fourier coefficients of \(\cos (x)\), I get the correct answer. If I sum the negative-numbered ones, I get a wrong answer. Splitting the sum into two parts somehow ...

- asked by level1807 (10 votes), answered by Michael E2 (14 votes)

—————————-

[Calculating the size of objects in the picture] https://mathematica.stackexchange.com/questions/157374/calculating-the-size-of-objects-in-the-picture

I’m new to Wolfram Mathematica. I have an initial image:

My goal is to find a radius of the water drop, like so:

With that in mind, I’ve changed the initial photo:

resultImage = ...

- asked by Elias (9 votes), answered by b3m2a1 (7 votes)

—————————-

[Overlapping graphic primitives] https://mathematica.stackexchange.com/questions/157489/overlapping-graphic-primitives

I am trying to make a figure in Mathematica using some graphic primitives:

rod[l_, r_] :=   GraphicsGroup[{Opacity[.1], {Disk[{-l/2 + r, 0}, 
 r, {\[Pi]/2 , 3 \[Pi]/2}]}, {Disk[{l/2 - r, 0}, 
 r,  ...

- asked by Ruud3.1415 (7 votes), answered by kglr (3 votes)

—————————-

[How can I implement my own documentation search function?] https://mathematica.stackexchange.com/questions/157303/how-can-i-implement-my-own-documentation-search-function

The current documentation search doesn’t allow for very sophisticate searching, can I write my own function to search through the docs?

- asked by b3m2a1 (7 votes), answered by b3m2a1 (8 votes)

—————————-

[Can I implement something like the old documentation help browser?] https://mathematica.stackexchange.com/questions/157317/can-i-implement-something-like-the-old-documentation-help-browser

Old versions of Mathematica had a help browser that was more click through and structured. How can I reimplement something like that for the new (since v6) docs?

- asked by b3m2a1 (6 votes), answered by b3m2a1 (10 votes)

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

[What are the most common pitfalls awaiting new users?] https://mathematica.stackexchange.com/questions/18393/what-are-the-most-common-pitfalls-awaiting-new-users

As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...

- asked by Dr. belisarius (405 votes), answered by Michael E2 (235 votes)

—————————-

[How do I clear all user defined symbols?] https://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?

- asked by niklasfi (58 votes), answered by Artes (56 votes)

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

[Memoization of built in function] https://mathematica.stackexchange.com/questions/157429/memoization-of-built-in-function

What is the best way to let mathematica memoize built-in function like e.g.

SphericalHarmonicY[l,m,th,ph] 
 
 
One possibility would be for sure: 
 
 sphericalHarmonicY[l_,m_,th_,ph_]:=  ...

- asked by Mr Puh (3 votes)

—————————-

[Can’t import Gluon into mma] https://mathematica.stackexchange.com/questions/157466/cant-import-gluon-into-mma

This is a simple DNN from Fast, portable neural networks with Gluon HybridBlocks:

This is json file and params file of Gluon(MXNet)

import mxnet as mx from mxnet.gluon import nn print("mxnet ...

- asked by partida (4 votes)

—————————-

[NIntegrate and definite Integrate give different results] https://mathematica.stackexchange.com/questions/157300/nintegrate-and-definite-integrate-give-different-results

Suppose the function

f[x_,q_]=(15876 Exp[-0.527076 q^2] (x^2-2 x+2) SphericalBesselJ[1,5 q]^2 (q^2-8100 x^2))/(3425*Pi*q^5*x);

I need to perform the integration over q in the domain ...

- asked by John Taylor (1 vote)

4.12 Tuesday, October 3, 2017

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

[Frown for a sex change, or, how do I unbork the "FacialGender" classifier in 11.2?] https://mathematica.stackexchange.com/questions/156847/frown-for-a-sex-change-or-how-do-i-unbork-the-facialgender-classifier-in-11

The limits of machine learning. I thought the new "FacialGender" option for Classifier would be an amusing thing to explore.

So far, so good. But that’s me with bed-head. So let’s try a picture ...

- asked by Verbeia (17 votes), answered by Searke (2 votes)

—————————-

[Improve the mesh smoothing procedure] https://mathematica.stackexchange.com/questions/156611/improve-the-mesh-smoothing-procedure

My question is inspired by this answer about meshing with quadrilateral elements.

The following functions are my (naive) try of implementing the Laplacian smoothing. I find interior nodes in the mesh ...

- asked by Pinti (11 votes), answered by user21 (10 votes)

—————————-

[Possible bug in RegionUnion or related functions?] https://mathematica.stackexchange.com/questions/157031/possible-bug-in-regionunion-or-related-functions

Functions for derived geometric regions (RegionUnion and related) have been significantly updated in MMA 11.2 and now this simple example doesn’t work any more as expected. Could this be a bug or I am ...

- asked by Pinti (8 votes), answered by Szabolcs (5 votes)

—————————-

[Dataset - append row with a value which depends on two other rows] https://mathematica.stackexchange.com/questions/156980/dataset-append-row-with-a-value-which-depends-on-two-other-rows

I have go through the forum but did not see this question. Hope I don’t miss it.

I want to add a new colum "C" to a dataset with existing columns named "A" and "B". The value of "C" shall be the ...

- asked by Porty (7 votes), answered by WReach (6 votes)

—————————-

[How to tell Mathematica to do this with decimal part of real number?] https://mathematica.stackexchange.com/questions/156823/how-to-tell-mathematica-to-do-this-with-decimal-part-of-real-number

My apologies if this was asked here before.

My friend and I want to do this:

Suppose that we have some real number \(a. a_1 a_2...a_n...\) where \(a_i\) are digits in the set \(\{1,2,3,4,5,6,7,8,9,0\}\) ...

- asked by Antoine de Paladin (7 votes), answered by Edmund (6 votes)

—————————-

[FullForm of b/c and c/b with different order] https://mathematica.stackexchange.com/questions/156757/fullform-of-b-c-and-c-b-with-different-order

I am studying Mathematica myself and doing some exercises for improvement.

  Question: Try to guess the internal forms of b/c and c/b. Verify your 
  answer using FullForm.

Here is what I got by ...

- asked by anhnha (7 votes), answered by Mr.Wizard (6 votes)

—————————-

[Generate random walk on a graph] https://mathematica.stackexchange.com/questions/156626/generate-random-walk-on-a-graph

I have a graph with 100 nodes and 200 edges. How can I generate a random walk in it and animate it?

- asked by nasha amalina (7 votes), answered by rhermans (13 votes)

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

[How to find the position of elements in a list satisfying criteria] https://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  ...

- asked by PeterR (47 votes), answered by J. M. (45 votes)

—————————-

[How to calculate contour integrals with Mathematica?] https://mathematica.stackexchange.com/questions/34073/how-to-calculate-contour-integrals-with-mathematica

How to calculate the integral of \(\frac {1}{\sqrt {4 z^2 + 4 z + 3}}\) over the unit circle counterclockwise for each branch of the integrand?

- asked by user64494 (30 votes), answered by Artes (53 votes)

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

[How to decode Ascii85 format (AKA base85)?] https://mathematica.stackexchange.com/questions/156667/how-to-decode-ascii85-format-aka-base85

The ASCII85 encoding is a binary string encoding where every four bytes are encoded with five ASCII letters, using 85 different types of characters.

Unfortunately, it’s not in $CharacterEncodings:

...

- asked by M.R. (2 votes)

—————————-

[FIR filter and the relation between Sample rate and cut-off frequency] https://mathematica.stackexchange.com/questions/156685/fir-filter-and-the-relation-between-sample-rate-and-cut-off-frequency

I have problem to unterstand the logic of the cut-off frequency of the FIR filter. Suppose my sample rate is 2MHz and I want to design a lowpass filter with a cut-off frequency 100Hz. What will be ...

- asked by shabir barzanjeh (2 votes)

—————————-

[FindCluster only finds cluster "with a little help"] https://mathematica.stackexchange.com/questions/156984/findcluster-only-finds-cluster-with-a-little-help

Currently I made some slides to illustrate clustering. As an example I made a point set of two clusters:

   {clusters, graph} = Block[{c1, c2, cluster1, cluster2}, 
   c1 = {1, 2}; 
   cluster1 = (# +  ...

- asked by mgamer (4 votes)

4.13 Tuesday, September 26, 2017

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

[Finite element mesh not resolving features] https://mathematica.stackexchange.com/questions/156174/finite-element-mesh-not-resolving-features

I am trying to make a finite element mesh in 2D. The features are not found by ToElementMesh. This is a shelf bracket with nails. I build the region using RegionDifference and RegionUnion and the ...

- asked by Hugh (11 votes), answered by Young (9 votes)

—————————-

[Are the mail settings as given in preferences still programmatically accessible in V 11.2] https://mathematica.stackexchange.com/questions/156183/are-the-mail-settings-as-given-in-preferences-still-programmatically-accessible

In versions before 11.2 (and after 9) one could get the 
current settings as defined in the preferences (Internet &amp; Email -> Mail Settings) 
with Options[SendMail]. As the options for SendMail have  ...

- asked by Albert Retey (11 votes), answered by rhermans (9 votes)

—————————-

[Implement fractional Laplacian] https://mathematica.stackexchange.com/questions/156420/implement-fractional-laplacian

What is a way to implement the Fractional Laplacian with Mathematica?

How can we apply such implementation to numerically solve the problem

$$(-\Delta)^su = 1 \text{ in } B_1(0), \\ 
u = 0 \text{ in  ...

- asked by Jay (9 votes), answered by Henrik Schumacher (14 votes)

—————————-

[Blur, GaussianFilter and ImageConvolve doesn’t work on some images] https://mathematica.stackexchange.com/questions/156210/blur-gaussianfilter-and-imageconvolve-doesnt-work-on-some-images

In versions 8.0.4 and 9.0.1 applying Blur to an image gives expected result:

img = Import["http://i.stack.imgur.com/UsJTa.png"] 
 
blurred = Blur[img, 5] 
 
ColorSeparate[blurred]

But ...

- asked by Alexey Popkov (9 votes), answered by Alexey Popkov (11 votes)

—————————-

[Error and uncertainty propagation: Is using Precision/Accuracy a sound strategy?] https://mathematica.stackexchange.com/questions/156481/error-and-uncertainty-propagation-is-using-precision-accuracy-a-sound-strategy

Questions

What are the available resources to deal with experimental error and uncertainty propagation in Mathematica? Given that Mathematica already uses linearized model of error propagation on ...

- asked by rhermans (8 votes)

—————————-

[Unexpected behavior using ‘ReplaceAll[]‘ for nested lists] https://mathematica.stackexchange.com/questions/156538/unexpected-behavior-using-replaceall-for-nested-lists

ReplaceAll[] might lead to unexpected behavior (at least it surprised me). 
I use ReplaceAll[] to convert a list (basically data cleanup). 
 
For the command: 
 
{{1, "2"}, {2, "3"}} /. {x_, _ } :&gt; {x,  ...

- asked by Dennis (7 votes), answered by Szabolcs (9 votes)

—————————-

[What are the possible Method option values for plotting functions?] https://mathematica.stackexchange.com/questions/156475/what-are-the-possible-method-option-values-for-plotting-functions

Many plotting functions have a Method options with descriptions like this:

Plot: "the method to use for refining curves" RegionPlot: "the method to use for refining regions" ContourPlot: "the method ...

- asked by Szabolcs (7 votes)

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

[How to perform a multi-peak fitting?] https://mathematica.stackexchange.com/questions/26336/how-to-perform-a-multi-peak-fitting

I am wondering how to implement the multi-peak detecting 
and fitting in Mathematica. Following is an example of 
fitting the data using three peaks (such that the 
data ~ peak1 + peak2 + peak3).

The ...

- asked by Everett You (46 votes), answered by Silvia (47 votes)

—————————-

[How do I clear all user defined symbols?] https://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?

- asked by niklasfi (55 votes), answered by Artes (54 votes)

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

[Possible Symbolic Integration Bug] https://mathematica.stackexchange.com/questions/156215/possible-symbolic-integration-bug

Bug introduced between 5 and 8 and persisting through 11.2

I think I may have found a bug, and want to verify is this reproducible in other versions and platforms and not a mistake of mine.

I ...

- asked by yyli (5 votes)

—————————-

[Finding the slowest decay to a value for a 2D function] https://mathematica.stackexchange.com/questions/156338/finding-the-slowest-decay-to-a-value-for-a-2d-function

I have a function acf2[x,y] that describes the auto-correlation function of a simulated real surface, with a peak at the origin (acf2[0,0] = 1), and need to find the maximum distance from the origin ...

- asked by L.Todhunter (1 vote)

—————————-

[Can Mathematica run javascript on a website?] https://mathematica.stackexchange.com/questions/156377/can-mathematica-run-javascript-on-a-website

One way of running Javascript on a website is to use for instance Greasemonkey. By any chance, would it be possible to execute Javascript commands from Mathematica?

- asked by anderstood (1 vote)

4.14 Tuesday, September 19, 2017

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

[Pop-up appeared and then disappeared during first documentation search in 11.2] https://mathematica.stackexchange.com/questions/155717/pop-up-appeared-and-then-disappeared-during-first-documentation-search-in-11-2

After installing Mathematica 11.2, the first time I searched for something in the help center a pop-up appeared and then disappeared. It didn’t appear on a subsequent search, even if I restarted ...

- asked by Itai Seggev (23 votes), answered by Itai Seggev (26 votes)

—————————-

[ExternalEvaluate for Python fails with Import::nopythonevals] https://mathematica.stackexchange.com/questions/155821/externalevaluate-for-python-fails-with-importnopythonevals

I tried using ExternalEvaluate on OS X with Anaconda Python, and every ExternalEvaluate call failed with the Import::nopythonevals message. This happened even though an external evaluator was ...

- asked by Szabolcs (15 votes), answered by Szabolcs (12 votes)

—————————-

[Visualizing a holomorphic bijection between the unit disc and a domain] https://mathematica.stackexchange.com/questions/155954/visualizing-a-holomorphic-bijection-between-the-unit-disc-and-a-domain

One can construct a holomorphic bijection between the (open) unit disc \(D=\{z\in {\bf C}: |z|<1\}\), and a domain \(D\setminus \overline {B_{1/2}(-1/2)}\) where \(B_r(z_0)\) denotes the ball of radius \(r\) ...

- asked by Jack (12 votes), answered by Michael E2 (13 votes)

—————————-

[How to create search indices for custom documentation pages?] https://mathematica.stackexchange.com/questions/155932/how-to-create-search-indices-for-custom-documentation-pages

I have a package that uses custom documentation pages that are not generated with Wolfram Workbench.

How can I create search indices for these pages?

Requirements:

Searching should work in ...

- asked by Szabolcs (10 votes), answered by Szabolcs (1 vote)

—————————-

[Compile M11.1-compatible LibraryLink libraries using M11.2] https://mathematica.stackexchange.com/questions/155940/compile-m11-1-compatible-librarylink-libraries-using-m11-2

WolframLibraryVersion, defined in WolframLibrary.h, was bumped from 3 to 4 in Mathematica 11.2. This causes libraries compiled with M11.2 to fail to load in earlier versions.

Is it possible to ...

- asked by Szabolcs (9 votes)

—————————-

[How to insert dimensions in graphics?] https://mathematica.stackexchange.com/questions/155677/how-to-insert-dimensions-in-graphics

I’m creating figures (a T beam section) using the Graphics function. Like this:

a = Graphics[Polygon[{{0, 80}, {0, 85}, {100, 85}, {100, 80}}]]; 
b = Graphics[Polygon[{{47.5, 80}, {52.5, 80}, {52.5,  ...

- asked by Diogo (9 votes), answered by wxffles (10 votes)

—————————-

[Mathematica 11.2 Import Statement Produces Errors & Truncates CSV Data Created in 11.1] https://mathematica.stackexchange.com/questions/155908/mathematica-11-2-import-statement-produces-errors-truncates-csv-data-created-i

Bug introduced in 11.2.0

TL;DR 
 
 
Issue 1 (bug): Import of CSV files with column specification fails 
when "HeaderLines" or "SkipLines" option is used: 
 
Import["ExampleData/financialtimeseries.csv",  ... 

- asked by Joseph Karpinski (8 votes), answered by Itai Seggev (8 votes)

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

[How to tell Mathematica that certain variables are real/imaginary, integer-valued, etc] https://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 (expectation values etc.) by running them through Mathematica. When I say, for example,

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

and then ...

- asked by Matthew Brunetti (17 votes), answered by SquareOne (11 votes)

—————————-

[How do I clear all user defined symbols?] https://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?

- asked by niklasfi (55 votes), answered by Artes (54 votes)

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

[Covariant derivative given Christoffel symbols] https://mathematica.stackexchange.com/questions/155871/covariant-derivative-given-christoffel-symbols

I’ve been trying to take covariant derivative of various quantities along various surfaces in Mathematica, but I keep running into issues, frequently I get a tensor with the wrong dimension. Using the ...

- asked by Noahb32 (1 vote)

—————————-

[How to pass in-memory images through ExternalEvaluate?] https://mathematica.stackexchange.com/questions/156051/how-to-pass-in-memory-images-through-externalevaluate

Version 11.2 has a new import/export format PythonExpression.

Unfortunately, it doesn’t work out-of-the-box with images:

And using the ImageData directly is too slow:

Anyhow, I have some image ...

- asked by M.R. (4 votes)

—————————-

[GeneralizedLinearModelFit IRwLS] https://mathematica.stackexchange.com/questions/155692/generalizedlinearmodelfit-irwls

I’m interested in Mathematica’s capabilities with regard to robust fitting vs. outliers. In the Statistical Model Analysis Tutorial under the Generalized Linear Models section heading, there is this ...

- asked by Chris Chiasson (1 vote)

4.15 Tuesday, September 12, 2017

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

[Framework behind Graph plots. DynamicNamespace and friends] https://mathematica.stackexchange.com/questions/155237/framework-behind-graph-plots-dynamicnamespace-and-friends

As shown in DynamicLocation usage, we can use it to quickly create very nice functionality, that it to refer to graphics’ primitives relative coordinates without calculations of boundary etc.

As ...

- asked by Kuba (15 votes), answered by Kuba (12 votes)

—————————-

[DynamicLocation usage] https://mathematica.stackexchange.com/questions/155157/dynamiclocation-usage

Background

DynamicLocation can be very useful:

LocatorPane[Dynamic@x, 
  Graphics[ 
    { EdgeForm @ Thick, FaceForm @ None, Rectangle[BoxID -&gt; "box"] 
    , Arrow[{Dynamic[x],  ...

- asked by Kuba (14 votes), answered by b3m2a1 (9 votes)

—————————-

[How can I use GitHub as a paclet server?] https://mathematica.stackexchange.com/questions/155123/how-can-i-use-github-as-a-paclet-server

I want to use GitHub as a paclet server, but this fails:

PacletInstall[ 
 "ServiceConnection_StackExchange", 
 "Site" -&gt; "https:/github.com/b3m2a1/PacletServer" 
 ] 
 
PacletSiteUpdate::err: An error  ...

- asked by b3m2a1 (13 votes), answered by b3m2a1 (16 votes)

—————————-

[Permanently extending the behaviour of functions (like decorators)] https://mathematica.stackexchange.com/questions/155567/permanently-extending-the-behaviour-of-functions-like-decorators

Suppose I have a function, e.g.

f[x_] := x^2 
 
 
It works like this: 
 
f[5] 
(* 25 *)

I would like to permanently modify it so that calling f[5] will perform some action before and after the evaluation ...

- asked by Szabolcs (11 votes), answered by Leonid Shifrin (9 votes)

—————————-

[Is Tooltip broken in MMA 11.1.1?] https://mathematica.stackexchange.com/questions/155434/is-tooltip-broken-in-mma-11-1-1

Bug introduced in 11.1.0 and persisting through 11.1.1

I have just discovered that Tooltip works differently from as described in the documentation, at least in my version of MMA (11.1.1.0, Windows ...

- asked by Oleg Soloviev (9 votes)

—————————-

[Install paclets into $BaseDirectory on multi-user system] https://mathematica.stackexchange.com/questions/155122/install-paclets-into-basedirectory-on-multi-user-system

PacletInstall will install paclets into the $UserBaseDirectory by default. How can we install them in $BaseDirectory so that all users on the system will have access? Is this currently possible?

...

- asked by Szabolcs (9 votes), answered by halirutan (5 votes)

—————————-

[How can I reproduce the result of PrincipalComponents] https://mathematica.stackexchange.com/questions/155467/how-can-i-reproduce-the-result-of-principalcomponents

matrix = N[{{1, 2}, {2, 3}, {4, 10}}] 
   {{1., 2.}, {2., 3.}, {4., 10.}} 
 
res1 = PrincipalComponents[matrix, Method -&gt; "Correlation"] 
   {{1.10388, 0.130549}, {0.478746, -0.170139}, {-1.58262,  ...

- asked by HyperGroups (8 votes), answered by J. M. (13 votes)

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

[Labeling individual curves in Mathematica] https://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 ...

- asked by Tianxiang Xiong (52 votes), answered by Artes (40 votes)

—————————-

[What does # mean in Mathematica?] https://mathematica.stackexchange.com/questions/19035/what-does-mean-in-mathematica

I asked Mathematica to compute the following

Solve[c (1-x)^2-x^(1/4) == 0, x] 
 
and it returned this: 
 
  x = Root[#1^8 c^4 - 8 #1^7 c^4 + 28 #1^6 c^4 - 56 #1^5 c^4 + 70 #1^4 c^4 - 56 #1^3 c^4 + 28  ...

- asked by ronanymous (20 votes), answered by Dr. belisarius (43 votes)

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

[Question about RandomSeed option in AdaptiveMonteCarlo NIntegrate method] https://mathematica.stackexchange.com/questions/155249/question-about-randomseed-option-in-adaptivemontecarlo-nintegrate-method

I’ve been familiarising myself with the different options available in the AdaptiveMonteCarlo method for NIntegrate but one of the things that I can’t really understand is what the numbers correspond ...

- asked by user35305 (1 vote)

—————————-

[Delete duplicates in a list compiled of different lists and also delete] https://mathematica.stackexchange.com/questions/155261/delete-duplicates-in-a-list-compiled-of-different-lists-and-also-delete

I've got three lists: Lst1 has 100 different values for "r". 
Lst2 has 100 different values for "a". And Lst3=Pi*Lst1^2*Lst2. 
In Lst3 I've got duplicates and I want to get rid of them, but I also want  ...

- asked by Cornelis (1 vote)

—————————-

[How to implement LinkLaunch-like functionality with timeout?] https://mathematica.stackexchange.com/questions/155493/how-to-implement-linklaunch-like-functionality-with-timeout

tl;dr: What is the best way (and correct sequence of operations) to connect two programs using MathLink while anticipating failures / timeouts?

Launch program and connect, with timeout

I have a ...

- asked by Szabolcs (4 votes)

4.16 Tuesday, September 5, 2017

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

[Finding \(n^{\text {th}}\) largest/smallest element] https://mathematica.stackexchange.com/questions/154944/finding-n-textth-largest-smallest-element

Ordering can quickly find the position of the largest/smallest element in a list, but finding the position of the \(n^{\text {th}}\) largest/smallest element is much slower:

data = RandomReal[10, 10^7];

...

- asked by Carl Woll (13 votes), answered by Carl Woll (12 votes)

—————————-

[Fast pairwise SameQ test of an ordered list] https://mathematica.stackexchange.com/questions/155017/fast-pairwise-sameq-test-of-an-ordered-list

I have an ordered list of \(N\) numbers, and I want to find out whether adjacent numbers are SameQ or not, returning a list of 0s and 1s of length \(N-1\). One approach is something like:

...

- asked by Carl Woll (11 votes), answered by jkuczm (8 votes)

—————————-

[Given an ordered set S, find the points in S corresponding to another list] https://mathematica.stackexchange.com/questions/154893/given-an-ordered-set-s-find-the-points-in-s-corresponding-to-another-list

Given a sorted list of numbers \(S\), I want to create a function that accepts a list of numbers \(L\) and for each number \(l \in L\) it returns the index of the largest number \(s \in S\) such that ...

- asked by Carl Woll (11 votes), answered by nikie (13 votes)

—————————-

[Geolocate multiple IP addresses] https://mathematica.stackexchange.com/questions/155076/geolocate-multiple-ip-addresses

I would like to geolocate a few hundred IP addresses (as part of analysing server logs). What is the best way to do this using Mathematica?

Does Mathematica have any builtin functionality for this?

...

- asked by Szabolcs (9 votes), answered by Szabolcs (9 votes)

—————————-

[How to connect two images] https://mathematica.stackexchange.com/questions/155093/how-to-connect-two-images

I have talk about how to catenate two images whose have same part totally in my this post.

But in this case two images have similar information, not totally same.

img1 = Import @  ...

- asked by yode (9 votes), answered by Kuba (8 votes)

—————————-

[Filter elements in descending order] https://mathematica.stackexchange.com/questions/154761/filter-elements-in-descending-order

I want to solve the following problem efficiently:

Given a list of pairs (value, data), I want to remove all the pairs so that the resulting list has the value property of its elements sorted. That ...

- asked by José D. (9 votes), answered by Mathe172 (9 votes)

—————————-

[Changing numbers inside list to a list] https://mathematica.stackexchange.com/questions/154911/changing-numbers-inside-list-to-a-list

I have a list wich contains numbers and other lists, and what I want is to change every number x to x,0.

So if the function I’m seeking is called f, then

a = {1,Pi,2+3I,{1,2},{3,4},-2} 
 
 
f[a]  ...

- asked by Garmekain (8 votes), answered by John Joseph M. Carrasco (10 votes)

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

[Is it possible to draw this figure using Mathematica?] https://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 (62 votes), answered by M.R. (86 votes)

—————————-

[Can Mathematica do symbolic linear algebra?] https://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 \(m\times n\) and \(k\times m\) matrices, Simplify[Transpose[Transpose[A].Transpose[B]]]" and Mathematica would simplify it to B.A? ...

- asked by nikie (47 votes), answered by helen (25 votes)

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

[Strange result for an improper integral \(\int _{0}^{1}\frac {x^{-1/2}}{e^{x}-1} \sin \left (\frac {1}{x}\right )dx\)] https://mathematica.stackexchange.com/questions/155066/strange-result-for-an-improper-integral-int-01-fracx-1-2ex-1-s

The improper integral \[\int _{0}^{1}\frac {x^{-1/2}}{e^{x}-1} \sin \left (\frac {1}{x}\right )dx\] is convergent conditionally.

(Applying Dirichlet Test, \[\frac {x^{-1/2}}{e^{x}-1}\] ...

- asked by user250236 (1 vote)

—————————-

[Perplexing simplification of RotationMatrix] https://mathematica.stackexchange.com/questions/154793/perplexing-simplification-of-rotationmatrix

The result of

FullSimplify[RotationMatrix[, {Cos[], Sin[], 0}],  &gt; 0].{0, 0, 1}

in Mathematica 11 is

{Sign[Sec[]]^2 Sin[] Sin[], -Cos[] Sin[], Cos[]}

instead of the nicer result ...

- asked by theindigamer (1 vote)

—————————-

[collecting terms with different order] https://mathematica.stackexchange.com/questions/154849/collecting-terms-with-different-order

I am using homotopy perturbation method to solve nonlinear ODE.

The first step is to introduce P parameter and collect different order of P.

The code is like this:

Collect[(1 - 
 p) ((((1 + 
        ...

- asked by sajad.sharhani (1 vote)

4.17 Tuesday, August 29, 2017

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

[Inserting some zeros in a list by a rule of positions] https://mathematica.stackexchange.com/questions/154551/inserting-some-zeros-in-a-list-by-a-rule-of-positions

I have a list:

mainlist={0.23, 0.34, 0.8, 0.0, -0.2, 0.4, -0.1};

I have to extend the above list to another one finalresult with Length=17. But in finalresult the elements of the mainlist must be ...

- asked by Inzo Babaria (12 votes), answered by John Joseph M. Carrasco (14 votes)

—————————-

[How to use Streaming package in v11.1?] https://mathematica.stackexchange.com/questions/154439/how-to-use-streaming-package-in-v11-1

I am trying to use the streaming package for lazy list operations demonstrated in this post. But I found that the package was significantly changed in version 11. After some observations, I found that ...

- asked by happy fish (11 votes), answered by Leonid Shifrin (9 votes)

—————————-

[Interior of discretized region] https://mathematica.stackexchange.com/questions/154544/interior-of-discretized-region

I have some domain of interest:

r = 0.3; 
dom = ImplicitRegion[(x - 1/2)^2 + (y - 1/2)^2 &gt;= r^2, {{x, 0, 1}, {y, 0, 1}}];

Now I can extract mesh of the whole domain or just boundary:

...

- asked by user16320 (9 votes), answered by C. E. (10 votes)

—————————-

[Orientation of boundary domain normals] https://mathematica.stackexchange.com/questions/154656/orientation-of-boundary-domain-normals

I would like to use BoundaryNormals provided by the ElementMesh object. To demonstrate my problem I will take my favorite domain:

dom = ImplicitRegion[(x - 1/2)^2 + (y - 1/2)^2 &gt;= (1/4)^2, {{x, 0,  ...

- asked by user16320 (8 votes), answered by user16320 (4 votes)

—————————-

[Best Practices for Creating CDF e-textbook] https://mathematica.stackexchange.com/questions/154550/best-practices-for-creating-cdf-e-textbook

I attended a talk given by Eric Schulz a few years ago. It was similar to his talk "Sharing Wisdom Gained from Publishing a CDF Ebook" given here. I am Math instructor and have been creating ...

- asked by Michael McCain (8 votes)

—————————-

[Markdown parser in Mathematica] https://mathematica.stackexchange.com/questions/154634/markdown-parser-in-mathematica

Is there already a markdown to XML parser implemented in Mathematica? I wrote a one for my pelican rewrite, but realized I should have asked here first. Mine is almost certainly faulty in a few major ...

- asked by b3m2a1 (7 votes), answered by b3m2a1 (3 votes)

—————————-

[ListContourPlot with hatched regions] https://mathematica.stackexchange.com/questions/154481/listcontourplot-with-hatched-regions

I’m using ListContourPlot on a table of data, and I’d like to hash the regions rather than colour them, so the plot works in black and white.

data = Flatten[Table[{x, y, Cos[x] + Cos[y]}, {x, 0, 3,  ...

- asked by KraZug (7 votes), answered by John Joseph M. Carrasco (8 votes)

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

[Creating legends for plots with multiple lines?] https://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  ...

- asked by Eiyrioü von Kauyf (61 votes), answered by Jens (91 votes)

—————————-

[Learn Mathematica (Wolfram) Language in one day] https://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 ...

- asked by dimitris (26 votes), answered by masterxilo (11 votes)

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

[NetTrain with External GPU?] https://mathematica.stackexchange.com/questions/154380/nettrain-with-external-gpu

I’d like to use the new Neural Networks functionalities in v11 on my Macbook Pro, unfortunately, most macs do not have the supported Nvidia cards. However, there is the option for using an external ...

- asked by M.R. (3 votes)

—————————-

[Solution (numerical or symbolic) of functional equations?] https://mathematica.stackexchange.com/questions/154515/solution-numerical-or-symbolic-of-functional-equations

Can I solve functional equations with Mathematica? How?

For example, I am trying to solve:

\[\frac {F(x)}{F(1)} = 2F\left (\frac {(1+x)^2}{4a}\right )-F(x/a)\]

for specific values of \(a\). Can ...

- asked by becko (1 vote)

—————————-

[Amplitude of a transfer function] https://mathematica.stackexchange.com/questions/154489/amplitude-of-a-transfer-function

I’m looking to calculate the amplitude of a transfer function which is defined in a symbolic way :

T=(1 + 2 I r )/(1 - r^2 + 2 I r ) 
 
 
I try this, i doesn't work 
 
Assuming[{ &gt; 0, r &gt; 0},  ...

- asked by Bendesarts (1 vote)

4.18 Tuesday, August 22, 2017

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

[Mathematica vs. Comsol for finite element analysis?] https://mathematica.stackexchange.com/questions/154254/mathematica-vs-comsol-for-finite-element-analysis

Being relatively new to finite element analysis, I was wondering how expert users assess Mathematica’s capabilities in solving PDEs via the finite element method compared to other commercial tools ...

- asked by Alexander Erlich (13 votes), answered by Alexei Boulbitch (7 votes)

—————————-

[Mathematica Syntax Coloring in GitHub README] https://mathematica.stackexchange.com/questions/153836/mathematica-syntax-coloring-in-github-readme

GitHub doesn’t auto-detect and color Mathematica code in its markdown. Can we make it do so?

This may be trivial, but many README files don’t seem to have it.

- asked by b3m2a1 (10 votes), answered by b3m2a1 (13 votes)

—————————-

[HoldPattern vs Unevaluated] https://mathematica.stackexchange.com/questions/153844/holdpattern-vs-unevaluated

For learning purposes I created this code:

{g, 3*(10 + g)} /. HoldPattern[Plus[t__]] :&gt; (Plus[t] /. g -&gt; h)

I am learning about HoldPattern. As I understand it HoldPattern makes sure that the ...

- asked by GambitSquared (8 votes), answered by Mr.Wizard (9 votes)

—————————-

[Who is to blame: parsing UTF8 encoded JSON HTTPResponse fails] https://mathematica.stackexchange.com/questions/154245/who-is-to-blame-parsing-utf8-encoded-json-httpresponse-fails

Background

V11.1.1 I’m using URLRead to fetch some data,

can’t show everything but headers contain:

"content-type-&gt;application/json; charset=utf-8"

and body (returned from URLRead) contains ...

- asked by Kuba (7 votes), answered by Alexey Popkov (5 votes)

—————————-

[Number elements in a list] https://mathematica.stackexchange.com/questions/153951/number-elements-in-a-list

I’m trying to learn more about list replacement without using Table. I have a list like this:

list = {{{"a", "b", "c"}, {"d", "e", "f"}, {"g", "h", "i"}}}

Now, I want to modify the list elements, ...

- asked by holistic (7 votes), answered by MarcoB (9 votes)

—————————-

[Fill a sphere above an arbitrary curve] https://mathematica.stackexchange.com/questions/153994/fill-a-sphere-above-an-arbitrary-curve

I have a function which generates a curve on the surface of a unit sphere, parameterised by the azimuthal angle. How can I plot a sphere with two different colour above and below this curve?

f[t_] :=  ...

- asked by Tom (6 votes), answered by Kuba (9 votes)

—————————-

[is it possible to change/customize some conversions done by TeXForm?] https://mathematica.stackexchange.com/questions/153876/is-it-possible-to-change-customize-some-conversions-done-by-texform

I use TeXForm to convert output of some computation to Latex. I’d like to ask if there is a way to override/change/customize some of these conversions, related to just the name Mathematica assigns to ...

- asked by Nasser (6 votes), answered by jkuczm (7 votes)

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

[How to manipulate 2D plots?] https://mathematica.stackexchange.com/questions/7142/how-to-manipulate-2d-plots

When it comes to visual analysis, large datasets or data with intricate internal details often makes plotting in 2D useless, as the outcome is either just a fraction of the full dataset, or no details ...

- asked by István Zachar (122 votes), answered by István Zachar (137 votes)

—————————-

[Mathematica erroneously says this integral does not converge] https://mathematica.stackexchange.com/questions/144965/mathematica-erroneously-says-this-integral-does-not-converge

Mathematica (as of v. 11.1.0) does not recognize that this special case of Frullani’s integral converges:

Integrate[(ArcTan[a*x] - ArcTan[b*x])/x, {x, 0, Infinity}] 
(* Integrate::idiv: Integral of  ...

- asked by Pillsy (14 votes), answered by Michael E2 (20 votes)

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

[Is there a good explanation of the output of FeatureExtract anywhere?] https://mathematica.stackexchange.com/questions/154044/is-there-a-good-explanation-of-the-output-of-featureextract-anywhere

I have been looking at the official documentation of FeatureExtract, and I’m having a bit of difficulty interpreting the output–or understanding the reasons for some of the choices that were made. ...

- asked by Shredderroy (1 vote)

—————————-

[How to work out sums symbolically?] https://mathematica.stackexchange.com/questions/153820/how-to-work-out-sums-symbolically

Intro

Consider these two equal expressions of the variance

\[\frac {\sum _{i=1}^n x(i)^2}{n}-\frac {\left (\sum _{i=1}^n x(i)\right ){}^2}{n^2}\]

and

$$\frac{\sum _{i=1}^n \left(x(i)-\frac{\sum  ...

- asked by Remi.b (1 vote)

—————————-

[Expectation value of standard deviation] https://mathematica.stackexchange.com/questions/153848/expectation-value-of-standard-deviation

I was trying to calculate the expectation value of the standard deviation, if I only take two data points into account. My code is the following:

n[x_] = PDF[NormalDistribution[, ], x]; 
2[x1_,  ...

- asked by Glostas (1 vote)

4.19 Tuesday, August 15, 2017

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

[How to remove a paclet downloaded from Wolfram Research Server?] https://mathematica.stackexchange.com/questions/153752/how-to-remove-a-paclet-downloaded-from-wolfram-research-server

How can I remove a paclet that was automatically downloaded when I used a function for the first time (i.e. NetChain)?

I believe the download was faulty, preventing me from using any of the ...

- asked by mpourrah (8 votes), answered by Itai Seggev (10 votes)

—————————-

[Best way to expand vocabulary of Mathematica functions?] https://mathematica.stackexchange.com/questions/153469/best-way-to-expand-vocabulary-of-mathematica-functions

I’m enjoying slowly learning Mathematica but noticing one skill I’m lacking is a comprehensive vocabulary of Mathematica functions. I was wondering if members would mind sharing some strategies they ...

- asked by BBirdsell (8 votes), answered by Nasser (9 votes)

—————————-

[high pass filter without losing detail] https://mathematica.stackexchange.com/questions/153414/high-pass-filter-without-losing-detail

I have troubles doing a simple high pass filtering...

Downloading the test data https://pastebin.com/74J8t2YV as "test.dat", you can see that overimposed on the signal there are some low frequencies ...

- asked by alessandro (8 votes), answered by xzczd (7 votes)

—————————-

[Accesing keys based on position in an association] https://mathematica.stackexchange.com/questions/153689/accesing-keys-based-on-position-in-an-association

I would like to have the following simple function "GetKey[]" on a very large association.

(* The actual Association is very large, this is just small example *) 
assoc = &lt;|{1,1} -&gt; 2, {1,2}  ...

- asked by Iconoclast (7 votes), answered by Carl Woll (9 votes)

—————————-

[How to calculate CellularAutomaton rule numbers in higher dimensions?] https://mathematica.stackexchange.com/questions/153388/how-to-calculate-cellularautomaton-rule-numbers-in-higher-dimensions

Where can I find documentation of the rule number convention for CellularAutomaton for higher than 1 dimension?

I understand the convention for elementary 1D automata, but I don’t understand even ...

- asked by Mark S. (7 votes), answered by Vitaliy Kaurov (6 votes)

—————————-

[Clicking on any Line of Code causes Plotted Points to Vanish] https://mathematica.stackexchange.com/questions/153368/clicking-on-any-line-of-code-causes-plotted-points-to-vanish

Bug detected in 11.1, apparently related but not identical to bug in 10.4. Reported to Worfram, Inc as CASE:3926732

$Version 
(* "11.1.1 for Microsoft Windows (64-bit) (April 18, 2017)" *) 
 
p1 =  ... 

- asked by bbgodfrey (7 votes), answered by John Joseph M. Carrasco (3 votes)

—————————-

[Puzzled about the behavior of NDSolve (ODE’s involving Integrals)] https://mathematica.stackexchange.com/questions/153624/puzzled-about-the-behavior-of-ndsolve-odes-involving-integrals

Any idea why NDSolve can easily handle the first of these examples, but not the 2nd? I have a system of ODE’s involving integrals without closed-form solutions, and keep getting the 2nd error message. ...

- asked by Andrea Wilson (6 votes), answered by Michael E2 (5 votes)

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

[Labeling individual curves in Mathematica] https://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 ...

- asked by Tianxiang Xiong (52 votes), answered by Artes (40 votes)

—————————-

[Is there an open source implementation of Mathematica-the-language?] https://mathematica.stackexchange.com/questions/4454/is-there-an-open-source-implementation-of-mathematica-the-language

I’ve seen questions before such as "What is the best open-source equivalent for Mathematica?", but that specific question (and that line of inquiry in general) cares more about the computer algebra ...

- asked by sblom (88 votes), answered by Simon (68 votes)

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

[Analysis of the periodic data by the maximum entropy method] https://mathematica.stackexchange.com/questions/153487/analysis-of-the-periodic-data-by-the-maximum-entropy-method

I am trying to get the frequency spectrum of a periodic data. Since the data set is short, the outcome of the frequency peaks are not sharp enough, which prevents me for further analysis. I know the ...

- asked by Phyman (1 vote)

—————————-

[Plotting InterpolationFunction over Quantities] https://mathematica.stackexchange.com/questions/153458/plotting-interpolationfunction-over-quantities

What’s the proper syntax to plot Interpolation functions defined over Quantities?

points = {{0, 0}, {1, 1}, {2, 3}, {3, 4}, {4, 3}, {5, 0}}; 
 
 
Change domain to Quantities: 
 
points2 = points //  ...

- asked by alancalvitti (2 votes)

—————————-

[Fastest form of a function] https://mathematica.stackexchange.com/questions/153602/fastest-form-of-a-function

I’m trying to find the fastest form for a function. I have a few approaches with test results.The function I’m working with is the 3rd derivative of the incomplete beta function with respect to its ...

- asked by FalafelPita (1 vote)

4.20 Tuesday, August 8, 2017

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

[Why can’t I inject expressions in Compile using (only) With] https://mathematica.stackexchange.com/questions/153064/why-cant-i-inject-expressions-in-compile-using-only-with

Generally speaking, With can be used to inject into arbitrarily held expressions, for example:

With[{args = 2}, 
  Hold @ Hold @ HoldComplete[args] 
] 
(* Out[1]= Hold[Hold[HoldComplete[2]]] *) 
 ...

- asked by glS (14 votes), answered by Leonid Shifrin (15 votes)

—————————-

[Why Mathematica can not factorize polynomials over algebraic fields?] https://mathematica.stackexchange.com/questions/152949/why-mathematica-can-not-factorize-polynomials-over-algebraic-fields

I noticed that a factorization over algebraic fields is useless in Mathematica. Here is the example over the field containing I*Sqrt[3]:

Pol=4 (3 I Sqrt[3] (-12 + 6 x - 4 x^2 + x^3) y^3 z + 
9 (12 -  ...

- asked by Aus Man (14 votes), answered by chyaong (11 votes)

—————————-

[RegionMeasure is wrong for simple 1D Path] https://mathematica.stackexchange.com/questions/153323/regionmeasure-is-wrong-for-simple-1d-path

Bug introduced in 11.1

Take the simple path defined by a line through a set of points

pts = {{0, 0}, {0, 1.5}, {0.05, 1.5}, {0.05, 0.5}, {0.1, 0.5}, {0.1,  1.5}, 
{0.15, 1.5}, {0.15, 0.5}, {0.2,  ...

- asked by Sascha (13 votes), answered by Michael E2 (8 votes)

—————————-

[Why am I seeing what looks like a violation of operator precedence?] https://mathematica.stackexchange.com/questions/153258/why-am-i-seeing-what-looks-like-a-violation-of-operator-precedence

Why is it that when I evaluate

2*2.848529281693615`+3*-0.5155083247776808` 
 
I get 
 
(* -2.93688 *) 
 
 
which is wrong. 
 
2*2.848529281693615` + (3*-0.5155083247776808`) 
(* 4.15053 *)

Any help would be ...

- asked by An old man in the sea. (9 votes), answered by C. E. (9 votes)

—————————-

[Need a gentle introduction to stylesheet writing] https://mathematica.stackexchange.com/questions/153102/need-a-gentle-introduction-to-stylesheet-writing

I have searched Mathematica.SE for stylesheet and found a lot of useful information on specific issues but no general introduction. There were 746 hits, and it is very time consuming for anyone to ...

- asked by m_goldberg (9 votes), answered by m_goldberg (7 votes)

—————————-

[Unexpected behavior when directly assigning to DownValues] https://mathematica.stackexchange.com/questions/152999/unexpected-behavior-when-directly-assigning-to-downvalues

I’m encountering some unexpected behavior when assigning to DownValues. When I assign two definitions for test[1] as below, Mathematica stores both definitions:

DownValues[test] =  ...

- asked by tom (9 votes), answered by b3m2a1 (6 votes)

—————————-

[Except @ OptionsPattern[] affects OptionValue] https://mathematica.stackexchange.com/questions/152984/except-optionspattern-affects-optionvalue

The background

This example works as expected, small function with a special case rule:

foo // ClearAll 
foo // Options = {"bar" -&gt; 1}; 
 
foo[x_, y : Except[_Rule], patt : OptionsPattern[] 
 ...

- asked by Kuba (9 votes), answered by Mr.Wizard (7 votes)

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

[Mathematica 10.0.x freezes in Initializing kernels] https://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 (73 votes), answered by ilian (95 votes)

—————————-

[Exporting graphics to PDF - huge file] https://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,  ...

- asked by Matthew Leingang (94 votes), answered by Heike (80 votes)

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

[Operator on a multivariable function in a sum] https://mathematica.stackexchange.com/questions/153092/operator-on-a-multivariable-function-in-a-sum

I need to define an operator that does as follow for any function \(h_m\).

$\qquad O[h_m](k,M,b,l_{max})=\sum_{l\neq (0,m)}^{l_{max}}il \left (h_l(k,M,b,l_{max}) b_{m-l}(k)- c_l\partial_k  ...

- asked by Michael_J (1 vote)

—————————-

[Direct input in Chinese, Korean or Japanese] https://mathematica.stackexchange.com/questions/153042/direct-input-in-chinese-korean-or-japanese

Sometimes I need to create a document in Japanese: I know Mathematica supports typing in Japanese. However it doesn’t seem to support direct (inline) input in Japanese.

Whenever I need to convert a ...

- asked by Tadashi Kikuno (5 votes)

—————————-

[Parametric Plot of Faces] https://mathematica.stackexchange.com/questions/152909/parametric-plot-of-faces

In How do I draw a pair of buttocks? there is a discussion how to draw a human backside. It shows an example of Manipulate to ParametricPlot3D this part of a body.

In this discussion they were ...

- asked by Adalbert HanSSen (1 vote)

4.21 Tuesday, August 1, 2017

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

[String operation 1000X slower for special characters] https://mathematica.stackexchange.com/questions/152293/string-operation-1000x-slower-for-special-characters

It seems that the string operation is very slow if we have special characters in the string. Consider this example,

str = 
  StringJoin@ 
   RandomChoice[Join[Alphabet[], ToString /@ Range[0, 9]],  ...

- asked by xslittlegrass (12 votes), answered by Alexey Popkov (12 votes)

—————————-

[Making a website with Mathematica] https://mathematica.stackexchange.com/questions/152663/making-a-website-with-mathematica

I know many people here have various websites associated with them and I’m guessing do at least some of the development of that stuff in Mathematica.

I recently fell down that rabbit hole myself, ...

- asked by b3m2a1 (11 votes), answered by C. E. (9 votes)

—————————-

[Convert association with list key to nested assocations] https://mathematica.stackexchange.com/questions/152676/convert-association-with-list-key-to-nested-assocations

I have an association that maps x, y pairs to values, for example:

 &lt;|{0, 0} -&gt; "a", {-1, -4} -&gt; "b", {-1, 1} -&gt; "c", {-1, 0} -&gt; "d", {1, 0} -&gt; "e"|&gt;

I want to convert this ...

- asked by 2012rcampion (9 votes), answered by MarcoB (8 votes)

—————————-

[Matching (y/x)^u terms wherever the appear in an expression] https://mathematica.stackexchange.com/questions/152559/matching-y-xu-terms-wherever-the-appear-in-an-expression

Mathematica keeps rewriting expressions, so it is hard to figure what pattern to use.

I am trying to replace all occurrences of \(\frac {y}{x}\) by \(t\), but Mathematica re-writes ...

- asked by Nasser (9 votes), answered by aardvark2012 (4 votes)

—————————-

[Bulletproofing packages against SetOptions of built-ins] https://mathematica.stackexchange.com/questions/152472/bulletproofing-packages-against-setoptions-of-built-ins

Packages are (obviously) written in terms of built-in Mathematica functions. But many (if not, most) of these functions have options, like Expand, Solve, Compile

While a package is active, the user ...

- asked by QuantumDot (9 votes), answered by Leonid Shifrin (12 votes)

—————————-

[How can I offset a curve from the given data points?] https://mathematica.stackexchange.com/questions/152298/how-can-i-offset-a-curve-from-the-given-data-points

I am new to Mathematica programming.

I have a question related to my work with this software.

I have the data points below:

{{128.011, 86.7748}, {128.011, 86.7748}, {128.167, 86.7663}, {128.19,  ...

- asked by Mukidi Lee (8 votes), answered by J. M. (12 votes)

—————————-

[Export[..., "tsv"] drops minus signs from Dataset [horrific bug?]] https://mathematica.stackexchange.com/questions/152355/export-tsv-drops-minus-signs-from-dataset-horrific-bug

Toy example:

First, create a Dataset:

data = Dataset[{&lt;|"x" -&gt;  1, "y" -&gt; -2|&gt;, 
                &lt;|"x" -&gt; -3, "y" -&gt;  4|&gt;}] 

Next, export it as a TSV file:

...

- asked by kjo (8 votes), answered by Rolf Mertig (6 votes)

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

[Entering numbers in Scientific Notation?] https://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?

- asked by hhh (32 votes), answered by Rahul (43 votes)

—————————-

[Creating legends for plots with multiple lines?] https://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  ...

- asked by Eiyrioü von Kauyf (60 votes), answered by Jens (90 votes)

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

[Obstacle problem for the heat equation] https://mathematica.stackexchange.com/questions/152491/obstacle-problem-for-the-heat-equation

Consider the problem

$$\begin{cases} 
\max\{\Delta u -\partial_t u, \varphi - u \} = 0 &amp; \text{ in } (0,T)\times \mathbb{R}^n \\ 
u(0,\cdot) = \varphi(0,\cdot) &amp; \text{ in } \mathbb{R}^n. 
 ...

- asked by Hiro (3 votes)

—————————-

[DateListPlot of multiple time series with data values and legend appearing as the cursor moves over ploted lines] https://mathematica.stackexchange.com/questions/152405/datelistplot-of-multiple-time-series-with-data-values-and-legend-appearing-as-th

This is very similar to my previous question. I want to use "DateListPlot" to visualize multiple time series (n) and see data values and legend as I move the cursor over plotted lines. To begin with, ...

- asked by ramesh (2 votes)

—————————-

[Using FindMinimum for a table of functions] https://mathematica.stackexchange.com/questions/152595/using-findminimum-for-a-table-of-functions

I am relatively new to Mathematica and am having trouble with my code running quite slowly. What I am attempting to do is find the minimum value of a function (a chi^2) of one fit variable, but this ...

- asked by nsbd88 (1 vote)

4.22 Tuesday, July 25, 2017

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

[Reduce Code Length] https://mathematica.stackexchange.com/questions/152003/reduce-code-length

I have the following that works good, and computes in one shot,but the code is so long. Can someone please help me to reduce the size of this?

...

- asked by Bill W. (9 votes), answered by Ali Hashmi (7 votes)

—————————-

[Best way to handle nested Maps?] https://mathematica.stackexchange.com/questions/151742/best-way-to-handle-nested-maps

I often find myself working with lists of lists of data, gathering data, performing computations, and producing a variety of different sorts of output. Intuitively, it seems like this should be done ...

- asked by Michael Stern (9 votes), answered by eldo (6 votes)

—————————-

[Color gradient varying in a path] https://mathematica.stackexchange.com/questions/151980/color-gradient-varying-in-a-path

The code below is to create something like a logo. I want to apply a color gradient over the polygons of the pattern, but they vary along the path. The image that I want to approach is this:

ang = ...

- asked by LCarvalho (8 votes), answered by KennyColnago (9 votes)

—————————-

[Offset Partition with only one remainder element] https://mathematica.stackexchange.com/questions/152152/offset-partition-with-only-one-remainder-element

I would like to use a combination of options of Partition in a way that I can’t seem to find in the documentation.

Given example input {a,b,c,d,e,f,g}, I would like output  ...

- asked by George Moore (7 votes), answered by kglr (4 votes)

—————————-

[Slot # corresponding to subset of a list in select] https://mathematica.stackexchange.com/questions/152082/slot-corresponding-to-subset-of-a-list-in-select

Is it possible to use # in the select function preserving the structure of the list? 
 
Here an example of what I mean. Let's say I want to select all the pairs 
where the first element is 1: 
 
data1 =  ...

- asked by Fraccalo (7 votes), answered by kglr (7 votes)

—————————-

[Any faster approach than Outer for my computation] https://mathematica.stackexchange.com/questions/151892/any-faster-approach-than-outer-for-my-computation

Outer is slowing down considerably when the first argument is Abs[#1 - #2]/Max[#1, #2]&amp; 
 
Outer[List, Range[5000], Range[5000]]; // AbsoluteTiming 
(* {0.120091, Null} *) 
 
Outer[Abs[#1 -  ...

- asked by Ali Hashmi (6 votes), answered by nikie (9 votes)

—————————-

[How to generate password] https://mathematica.stackexchange.com/questions/151864/how-to-generate-password

I would like to generate a random password of a defined length which can easily be typed in with a standard keyboard.

As a start I tried the following:

SeedRandom["pass"]; 
 ...

- asked by mrz (6 votes), answered by yohbs (11 votes)

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

[Why should I avoid the For loop in Mathematica?] https://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?

- asked by Szabolcs (52 votes), answered by Szabolcs (62 votes)

—————————-

[Why round to even integers?] https://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} 

- asked by wxffles (64 votes), answered by Per Alexandersson (42 votes)

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

[How can I exclude factors containing a certain symbol form matching my pattern] https://mathematica.stackexchange.com/questions/151971/how-can-i-exclude-factors-containing-a-certain-symbol-form-matching-my-pattern

Ok, I give up. I can’t figure how to tell Mathematica to do replacement using a pattern except for some special case. Easier to explain with small example.

I want to change  pattern Exp[any_. c] to c  ...

- asked by Nasser (3 votes)

—————————-

[Graphics3D with explicit ViewAngle inside Manipulate disappears for a moment when starting rotation] https://mathematica.stackexchange.com/questions/151978/graphics3d-with-explicit-viewangle-inside-manipulate-disappears-for-a-moment-whe

Given the following:

Manipulate[ 
    ContourPlot3D[ 
        x^4 + y^4 + z^4 - (x^2 + y^2 + z^2)^2 + 3 (x^2 + y^2 + z^2) == 3 c, 
        {x, -3, 3}, 
        {y, -3, 3}, 
        {z, -3, 3}, 
         ...

- asked by Mark (1 vote)

—————————-

[MTensor from existing memory?] https://mathematica.stackexchange.com/questions/151780/mtensor-from-existing-memory

I am wondering whether it’s possible to return a tensor from my C++ code using LibraryLink without copying the memory (because it’s large). So, instead of

libData-&gt;MTensor_new(..., &amp;T0); 
 ...

- asked by mrupp (2 votes)

4.23 Tuesday, July 18, 2017

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

[Is there concise code for the list operation I want to perform?] https://mathematica.stackexchange.com/questions/151550/is-there-concise-code-for-the-list-operation-i-want-to-perform

Is there any concise syntax for the following partitioning of a list. Given 1, 2, 3, 4, I want to get the output as shown below. I have tried various function such as Partition and others, but I ...

- asked by vikas (10 votes), answered by kglr (16 votes)

—————————-

[Animate Koch curve generation and include a transition effect] https://mathematica.stackexchange.com/questions/151621/animate-koch-curve-generation-and-include-a-transition-effect

Recently, I saw two kinds of animation of Koch curve iteration generation.

I don’t know how to make this effect, now I can only do this

Clear[koch]; 
koch[{A_, B_}] := 
  Partition[ 
    {A, (2 A  ...

- asked by mathe (10 votes), answered by Kuba (14 votes)

—————————-

[How to find the sum for each individual row in a binary matrix until the first zero is reached from left to right.] https://mathematica.stackexchange.com/questions/151396/how-to-find-the-sum-for-each-individual-row-in-a-binary-matrix-until-the-first-z

I have a 150 by 300 binary matrix. I would like to sum the 1’s for each individual row (from left to right) until the first zero is encountered. For example, if a given row is 1 1 1 1 1 1 0 0 0 1 0 0  ... 

- asked by Tiffany Visgaitis (7 votes), answered by eldo (8 votes)

—————————-

[Replace element in array by checking condition in another list] https://mathematica.stackexchange.com/questions/151293/replace-element-in-array-by-checking-condition-in-another-list

Im trying to escape doing double loops given the large number of items in the arrays.

I have two list with a format like this:

list1={{1,2,0},{1,3,0},{4,6,0},{2,3,0}} (*Third element of each item is  ...

- asked by Giovanni Baez (7 votes), answered by Carl Woll (8 votes)

—————————-

[Geometry computations add-on for Mathematica?] https://mathematica.stackexchange.com/questions/151304/geometry-computations-add-on-for-mathematica

I came across the problem of calculating the circumcenters of triangles symbolically within another algorithm (as well as possibly doing other similar geometry computations). I was hoping Mathematica ...

- asked by Grayscale (7 votes), answered by C. E. (10 votes)

—————————-

[Trace of the points of intersection of two moving curves] https://mathematica.stackexchange.com/questions/151325/trace-of-the-points-of-intersection-of-two-moving-curves

I would like to trace the points of intersection between the polar curves

r == Cos[n  + k t] 
 
 
and 
 
r == t Csc[] 
 
as t goes from -1 to 1. (n and k are constants, and y, r, and  relate in the  ...

- asked by 404UserNotFound (6 votes), answered by Carl Woll (11 votes)

—————————-

[How to delete the parameter of a Neural Network?] https://mathematica.stackexchange.com/questions/151591/how-to-delete-the-parameter-of-a-neural-network

Mathematica Neural Networks based on MXNet. And there is lots of model in MXNet(MXNet Model Zoo).

For example,I follow a tutorial An introduction to the MXNet APIpart 4, It uses Inception v3(net ...

- asked by partida (5 votes), answered by xslittlegrass (3 votes)

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

[Why should I avoid the For loop in Mathematica?] https://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?

- asked by Szabolcs (52 votes), answered by Szabolcs (62 votes)

—————————-

[Image processing: Floor plan - detecting rooms’ borders (area) and room names’ texts] https://mathematica.stackexchange.com/questions/19546/image-processing-floor-plan-detecting-rooms-borders-area-and-room-names-t

Here is a simple building floor plan. I would like to derive the rooms as (rectangular) components and the names of the rooms. This is very common representation of building floor plans.

The ...

- asked by s.s.o (52 votes), answered by nikie (52 votes)

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

[Unexpected Behavior of Parametric Sensitivity in ParametricNDSolveValue] https://mathematica.stackexchange.com/questions/151294/unexpected-behavior-of-parametric-sensitivity-in-parametricndsolvevalue

While exploring alternative methods of solving 33538, I encountered difficulties with the parametric sensitivity capability of ParametricNDSolveValue. (Useful background on parametric sensitivity is ...

- asked by bbgodfrey (2 votes)

—————————-

[FindShortestTour suddenly runs far slower for large numbers of points] https://mathematica.stackexchange.com/questions/151513/findshortesttour-suddenly-runs-far-slower-for-large-numbers-of-points

I was doing a benchmark of FindShortestTour and I noticed something really weird. Around 10000 points, FindShortestTour suddenly takes 6 times as long without explanation:

times = Table[ 
    pts =  ... 

- asked by Jorge Perez (2 votes)

—————————-

[Manual CellGroups: problem with closing nested CellGroupData] https://mathematica.stackexchange.com/questions/151336/manual-cellgroups-problem-with-closing-nested-cellgroupdata

Background

CellGroupData second argument allows to specify which cells are visible. I faced problems though.

This example works well, the second group is not visible:

Notebook[{ 
   Cell @  ... 

- asked by Kuba (1 vote)

4.24 Tuesday, July 11, 2017

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

[Replace elements that do not match a pattern] https://mathematica.stackexchange.com/questions/149736/replace-elements-that-do-not-match-a-pattern

I have the following matrix

mat={{0,a,b},{c,0,d},{0,0,e}}

I would like to replace the zero elements of it with 1 and the remaining with zero. The first step would be

mat/.{0-&gt;1}

However I ...

- asked by Galuoises (12 votes), answered by eldo (7 votes)

—————————-

[Image segmentation by pixel value] https://mathematica.stackexchange.com/questions/149966/image-segmentation-by-pixel-value

I’m looking for a way to segment a grayscale image (or a 2D array) by its pixel values. We look at two neighboring pixels, if their values are close within a certain threshold, then we say they are ...

- asked by xslittlegrass (11 votes), answered by nikie (11 votes)

—————————-

[Can trees be made into graphs?] https://mathematica.stackexchange.com/questions/151155/can-trees-be-made-into-graphs

When one has the output of a function like TreeForm, for instance:

Can this be turned into a Graph object? I would like to be able to apply functions like VertexList, VertexDegree, AdjacencyList, ...

- asked by M. Brandt (8 votes), answered by C. E. (5 votes)

—————————-

[Layout tips to keep UI responsive] https://mathematica.stackexchange.com/questions/149835/layout-tips-to-keep-ui-responsive

Bug introduced in V10.4 or earlier and persisting through V11.1.1

  CASE:3914402 
 
 
Here is an example of a problem I have. Gutted version of something much bigger: 
 
handler2 =  Framed[#,     ...

- asked by Kuba (8 votes), answered by Kuba (1 vote)

—————————-

[How to use LaTeXin Mathematica text] https://mathematica.stackexchange.com/questions/151102/how-to-use-latex-in-mathematica-text

I would like to formulate a question in a notebook for my students using LaTeX(or MathML) to typeset functions and matrices. I specifically want a language other than Mathematica as students ...

- asked by user49947 (7 votes), answered by Nasser (6 votes)

—————————-

[getting zero for special positions in a matrix] https://mathematica.stackexchange.com/questions/149767/getting-zero-for-special-positions-in-a-matrix

There are a list

list={{1, 2, 3, 2, 3}, {3, 1, 1, 2, 3}, {3, 2, 1, 3, 2}, {1, 2, 1, 1, 1}}; 
 
 
I wish to have all elements be zero except the first 
and the fourth in each row: desired: 
 
list={{1, 0,  ...

- asked by Irreversible (7 votes), answered by tomd (7 votes)

—————————-

[To Work with Barchart or DiscretePlot?] https://mathematica.stackexchange.com/questions/149960/to-work-with-barchart-or-discreteplot

I would like to create a graph similar to this below using some slightly dotted bar style like the one shown in the figure ...

And I’m trying to open a space between bars 6 and 8, but I’m failing.

...

- asked by LCarvalho (7 votes), answered by kglr (6 votes)

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

[How to manipulate 2D plots?] https://mathematica.stackexchange.com/questions/7142/how-to-manipulate-2d-plots

When it comes to visual analysis, large datasets or data with intricate internal details often makes plotting in 2D useless, as the outcome is either just a fraction of the full dataset, or no details ...

- asked by István Zachar (117 votes), answered by István Zachar (134 votes)

—————————-

[Learn Mathematica (Wolfram) Language in one day] https://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 ...

- asked by dimitris (25 votes), answered by masterxilo (9 votes)

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

[Sorting a list of rules] https://mathematica.stackexchange.com/questions/149862/sorting-a-list-of-rules

When we give several definitions for a function f, the DownValues of f are automatically sorted with respect to the domain defined by the pattern:

f[x_]:=2; 
f[x_?Positive] := 3; 
f[1]=4; 
 ...

- asked by Fred Simons (3 votes)

—————————-

[Plotting orbits of trajectories of bodies sharing the earth’s orbit in coordinates centered at the barycenter of the solar system] https://mathematica.stackexchange.com/questions/151069/plotting-orbits-of-trajectories-of-bodies-sharing-the-earths-orbit-in-coordinat

I am attempting to try and plot the trajectories of a trio of satellites that are orbiting with the earth-moon system around the solar system’s barycenter. Originally, I had the satellites in orbit ...

- asked by SSoltero (1 vote)

—————————-

[Mathematica not releasing RAM] https://mathematica.stackexchange.com/questions/151127/mathematica-not-releasing-ram

The following code is supposed to sequentially read data from a large CSV file and put it row by row into an SQL server. Although I thought RAM consumption should be constant the system keeps asking ...

- asked by user13892 (2 votes)

4.25 Tuesday, July 4, 2017

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

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

[Is there a simple and fast way to delete dependent lines of a matrix] https://mathematica.stackexchange.com/questions/149281/is-there-a-simple-and-fast-way-to-delete-dependent-lines-of-a-matrix

I am building a matrix, but some of the lines are dependant. I would like to only keep independant lines (so erase all lines that depend from another).

I could compute the nullspace of the transpose ...

- asked by StarBucK (10 votes), answered by george2079 (10 votes)

—————————-

[Vertex coloring for bi-connected graphs] https://mathematica.stackexchange.com/questions/149247/vertex-coloring-for-bi-connected-graphs

In graph theory, a bi-connected component is a maximal bi-connected subgraph of a graph \(g\)–i.e., a connected subgraph that would remain connected if any one of its vertexes were to be removed. An ...

- asked by David G. Stork (10 votes), answered by kglr (9 votes)

—————————-

[Compile and uncompilable function bug?] https://mathematica.stackexchange.com/questions/149343/compile-and-uncompilable-function-bug

I think I found a bug, but I still have MMA version 11.0.1 installed. Can somebody please check if this persists in the latest version?

When I compile this function:

cf = Compile[{{n, _Integer}}, 
   ...

- asked by JEM_Mosig (10 votes), answered by Michael E2 (12 votes)

—————————-

[How to make the result of InputForm balance the bracket] https://mathematica.stackexchange.com/questions/149558/how-to-make-the-result-of-inputform-balance-the-bracket

I always use InputForm to check the result object,such as Dataset or Graphics or other objects.But if you are in the result of InputForm,you cannot use the Front-End function of balance the bracket. ...

- asked by yode (9 votes), answered by Carl Woll (6 votes)

—————————-

[KeyValuePattern in matching and replacement in nested associations] https://mathematica.stackexchange.com/questions/149402/keyvaluepattern-in-matching-and-replacement-in-nested-associations

This case revealed I am missing something in pattern matching and evaluation in case of match, or I can’t grasp it due to the busy week I have. Either way, I find this problem interesting for wider ...

- asked by Kuba (9 votes), answered by Mr.Wizard (5 votes)

—————————-

[Align two images with respect to sperm head] https://mathematica.stackexchange.com/questions/149280/align-two-images-with-respect-to-sperm-head

My biologist friend has to align sperm images according to their heads. He usually does that manually by rotating each image. The problem is that there are so many images and it takes a lot of time. ...

- asked by Anjan Kumar (9 votes), answered by nikie (7 votes)

—————————-

[A more convenient Fourier series] https://mathematica.stackexchange.com/questions/149468/a-more-convenient-fourier-series

Personally, I feel the design of FourierSeries/FourierSinSeries/FourierCosSeries/FourierTrigSeries not convenient enough because:

They can’t give general formula of series as output, one must set a ...

- asked by xzczd (7 votes), answered by xzczd (7 votes)

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

[Why should I avoid the For loop in Mathematica?] https://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?

- asked by Szabolcs (51 votes), answered by Szabolcs (61 votes)

—————————-

[My Girlfriend is going to prison...Save her with Math] https://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,  ...

- asked by Prisoners Dilema (39 votes), answered by bobthechemist (24 votes)

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

[Serious regression in Integrate in 11.1.1? Division by zero generated] https://mathematica.stackexchange.com/questions/149495/serious-regression-in-integrate-in-11-1-1-division-by-zero-generated

What is going on here? In version 11.1.1 on windows 7

Using Version 11.0.1 also on windows 7

Source code

ClearAll[x, n, c, a ,b] 
Integrate[(a + b*(c*x^n)^(2/n))^3, x]

Why does ...

- asked by Nasser (7 votes)

—————————-

[Hiding inputs with specific function] https://mathematica.stackexchange.com/questions/149298/hiding-inputs-with-specific-function

I believe this question could be a duplication, but I did some searches with the term "hide the input cell", but none answered me. Only inputs with this function.

I have several input cells using the ...

- asked by LCarvalho (3 votes)

—————————-

[Gravitational Lensing Simulation, Coordinate and Rendering Issues] https://mathematica.stackexchange.com/questions/149447/gravitational-lensing-simulation-coordinate-and-rendering-issues

I am trying to replicate this gravitational simulation online application called LensToy using Mathematica instead. I have two issues.

First, unlike LensToy, my rendering is extremely slow and drives ...

- asked by mpourrah (2 votes)

4.26 Tuesday, June 27, 2017

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

[Display 10^n as power] https://mathematica.stackexchange.com/questions/148794/display-10n-as-power

How can I tell MMA to display input of the form 10^n as \(10^n\) and not e.g. as 1000 for \(n = 3\) or the rational \(\frac {1}{1000}\) for \(n = -3\).

This would help to keep tables compact when some ...

- asked by Casimir (13 votes), answered by eldo (10 votes)

—————————-

[How to remove unknown zero-width character from string?] https://mathematica.stackexchange.com/questions/148899/how-to-remove-unknown-zero-width-character-from-string

I have text that contains a zero-width character that I am not able to remove. A minimum example is in str below where the character is at the start of the text.

str = "4-6"; 
res = ToExpression /@  ...

- asked by Edmund (12 votes), answered by Carl Woll (10 votes)

—————————-

[Series sum approximation] https://mathematica.stackexchange.com/questions/149090/series-sum-approximation

Since there is no closed formula, as far as I know, to find the sum of

\[\sum _{n=2}^{\infty } \frac {(-1)^n}{\sqrt {\log (n)}}\]

I used //N to find an approximation and Mathematica gave me ...

- asked by Raffaele (11 votes), answered by TeM (18 votes)

—————————-

[How to extract first 9 rows from every block of 22 rows?] https://mathematica.stackexchange.com/questions/149026/how-to-extract-first-9-rows-from-every-block-of-22-rows

I’m working with a list of lists (a large table).

How would I extract the first 9 rows from every 22 rows of this list?

Essentially, I’d like to drop rows 10 to 22, and then 32 to 44, and so on, ...

- asked by musicmaker (11 votes), answered by C. E. (11 votes)

—————————-

[Confusion about HoldFirst attribute of Set] https://mathematica.stackexchange.com/questions/148956/confusion-about-holdfirst-attribute-of-set

Set has the attribute HoldFirst. Expectedly the following does not work, i.e. it does not assign the OwnValue of 3 to x:

In[1]:= {x, y}[[1]] = 3 
 
During evaluation of In[1]:= Set::setps: {x,y} in the  ...

- asked by kalix (8 votes), answered by Kuba (10 votes)

—————————-

[What algorithm is Mathematica using to find the smallest eigenvalue so quickly?] https://mathematica.stackexchange.com/questions/148759/what-algorithm-is-mathematica-using-to-find-the-smallest-eigenvalue-so-quickly

My question is what kind of black magic is Mathematica doing to obtain the correct answer so quickly compared to other programming languages?

Details:

I’ve written a Mathematica notebook to find the ...

- asked by Daniel Walsh (8 votes)

—————————-

[Simplify expression with Sqrt] https://mathematica.stackexchange.com/questions/149186/simplify-expression-with-sqrt

Hi folks I have a simple Simplify[] question

the following expression simplifies nice:

Sqrt[4 (a + b) - 4 c] // Simplify 
2 Sqrt[a + b - c] 
 
 
the next one refuses 
 
Sqrt[4 (a + b) - 4 (c + d)] //  ...

- asked by Robert Nowak (6 votes), answered by Shadowray (5 votes)

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

[Calculate the 2D Fourier transform of an Image] https://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)

—————————-

[Entering numbers in Scientific Notation?] https://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?

- asked by hhh (32 votes), answered by Rahul (43 votes)

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

[Cross-section of graph] https://mathematica.stackexchange.com/questions/148902/cross-section-of-graph

I am trying to use the following code to plot the cross-section 
of the graph z=x^2+y^2 and x=t. I use Manipulate to vary t. 
 
h = z - x^2 - y^2; 
g = x; 
Manipulate[ 
 Show[ 
  ContourPlot3D[{h == 0, g ==  ...

- asked by henryforever14 (1 vote)

—————————-

[How to embed Mathematica or Wolfram Alpha results in a website] https://mathematica.stackexchange.com/questions/149063/how-to-embed-mathematica-or-wolfram-alpha-results-in-a-website

Is it possible to dynamically embed responses into a blog post?

So the user would see:

There are 390900 plant species in the world.

With pseudo code:

There are #{worlfram(number of plant species)}  ...

- asked by Mr. Demetrius Michael (1 vote)

—————————-

[Package MathWorld] https://mathematica.stackexchange.com/questions/148837/package-mathworld

I’m looking for MathWorld packages, but I can not find anywhere. I found an question that came very close but did not help me.

I got lost on the site and did not find anything.

I need to use the ...

- asked by LCarvalho (4 votes)

4.27 Tuesday, June 20, 2017

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

[Good references for parallel programming in Mathematica] https://mathematica.stackexchange.com/questions/148489/good-references-for-parallel-programming-in-mathematica

There are plenty of good references for all sorts of Mathematica programming:

This forum is a great example for specific questions/"getting things done". Books like those by R.Maeder (esp. the now ...

- asked by Gaius (17 votes)

—————————-

[Dot not well-defined: are there better examples?] https://mathematica.stackexchange.com/questions/148465/dot-not-well-defined-are-there-better-examples

Dot is not "well-defined" in Mathematica - we cannot simultaneously have it being associative and working with 1D and 2D arrays. For example, the order we substitute for variables should not change ...

- asked by mikado (10 votes), answered by Shadowray (9 votes)

—————————-

[Internal‘Bag memory usage] https://mathematica.stackexchange.com/questions/148594/internalbag-memory-usage

1. How does Internal‘Bag handle memory inside a compiled function? (examples below)

2. Is there a way to explicitly free up memory used by Internal‘Bag without exiting the function?

Preface: The ...

- asked by aardvark2012 (9 votes)

—————————-

[Preventing an unwanted vertical line from appearing my plot] https://mathematica.stackexchange.com/questions/148502/preventing-an-unwanted-vertical-line-from-appearing-my-plot

How can I eliminate (remove) the unwanted vertical line x = 1 when I make the plot shown below.

p3 = 
  Plot[ 
    {0.5/(-0.1 x + 0.1), 
     0.04/(-0.004 x + 0.004), 
     1.359/(-0.08 x + 0.08), 
    ...

- asked by Irreversible (9 votes), answered by m_goldberg (1 vote)

—————————-

[Integer to Alpha Representation] https://mathematica.stackexchange.com/questions/148446/integer-to-alpha-representation

I wanted a nice way to convert natural numbers to alphabetic representations like:

1-&gt;"A", 
2-&gt;"B", 
... 
26-&gt;"Z", 
27-&gt;"AA, 
... 
26*2-&gt;"AZ", 
26*2+1-&gt;"BA", 
...

And I knew this was ...

- asked by b3m2a1 (8 votes), answered by Carl Woll (6 votes)

—————————-

[How to display numbers as multiples of a square root] https://mathematica.stackexchange.com/questions/148551/how-to-display-numbers-as-multiples-of-a-square-root

The extension field \(\mathbb {Q}(\sqrt {2} + \sqrt {3})\) can be represented by a \(4\) - dimensional vector space over \(\mathbb {Q}\) with basis \(\{1, \sqrt {2}, \sqrt {3}, \sqrt {6}\} \).

I made a matrix ...

- asked by nilo de roock (8 votes), answered by Carl Woll (7 votes)

—————————-

[Visually permute rows of a matrix via mouse dragging] https://mathematica.stackexchange.com/questions/148448/visually-permute-rows-of-a-matrix-via-mouse-dragging

I’m looking for a way to permute the rows of a matrix visually via mouse dragging, for example by clicking and dragging on a row in the MatrixPlot corresponding to the matrix.

What would be the best ...

- asked by glS (8 votes), answered by glS (10 votes)

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

[How to tell Mathematica that certain variables are real/imaginary, integer-valued, etc] https://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 (expectation values etc.) by running them through Mathematica. When I say, for example,

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

and then ...

- asked by Matthew Brunetti (17 votes), answered by SquareOne (11 votes)

—————————-

[Entering numbers in Scientific Notation?] https://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?

- asked by hhh (32 votes), answered by Rahul (43 votes)

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

[Which method should I use for a numerical triple Integration?] https://mathematica.stackexchange.com/questions/148629/which-method-should-i-use-for-a-numerical-triple-integration

Which method should I use for this numerical integration? Does it converge?

My constants are:

P = 10.5; 
m = 48.2; 
c = 1; 
 = 0.01; 
V0 = 10; 
EE = 2.3; 
II = 1.; 
k = 68.9*10^3; 
 
 
My Integration is 
 
    ...

- asked by Edmond Muho (2 votes)

—————————-

[possible memory problem with WatershedComponents] https://mathematica.stackexchange.com/questions/148318/possible-memory-problem-with-watershedcomponents

This could be regarded as a follow-up question to a previous post of mine (link).

When I use the WatershedComponents function on a large image (about 6000 x 10000 pixels) Mathematica comes up with an ...

- asked by Kardashev3 (4 votes)

—————————-

[Swedish characters in Databin] https://mathematica.stackexchange.com/questions/148550/swedish-characters-in-databin

I want to store strings with Swedish characters like å, ä and ö in a Databin, but get the following result:

bin = CreateDatabin[]; 
DatabinUpload[bin, {"a", "ä"}]; 
Values[bin] 
{a,"a""}

Does anyone ...

- asked by Sverker (5 votes)

4.28 Tuesday, June 13, 2017

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

[Same region, different meshes] https://mathematica.stackexchange.com/questions/148210/same-region-different-meshes

I’m playing around with ToElementMesh and I noticed the following behaviour that puzzles me. Consider the two regions

&lt;&lt; NDSolve`FEM` 
 
1 = 
  Polygon[{{-1/2, -1}, {-1/2, 1}, {1/2, 1}, {1/2,  ...

- asked by Massimo Ortolano (11 votes), answered by user21 (9 votes)

—————————-

[Rearrange the list in a specific way] https://mathematica.stackexchange.com/questions/147876/rearrange-the-list-in-a-specific-way

Suppose I have a list like {"e", "c", "a", "d", "b"} and list of 
rules {1 -&gt; 5, 2 -&gt; 3, 3 -&gt; 1, 4 -&gt; 4, 5 -&gt; 2}. The second 
list says that for example element on position 1 shoud be on  ...

- asked by David Baghdasaryan (11 votes), answered by Shadowray (16 votes)

—————————-

[Self contained APIFunction. Collecting definitions] https://mathematica.stackexchange.com/questions/148207/self-contained-apifunction-collecting-definitions

Cross posted on community.wolfram.com

Background

After failed attempt (1) to create a complex API, by nicely linking my APIFunction to a cloud based package, I decided to go with the flow and trust ...

- asked by Kuba (10 votes), answered by Leonid Shifrin (4 votes)

—————————-

[Substitute some 1s with 0s in random list] https://mathematica.stackexchange.com/questions/148134/substitute-some-1s-with-0s-in-random-list

How is it better to substitute list of random combination of 1 and 0 (binary image) so that only first (or central) instance of 1 left in each group.

list = 0,1,1,0,0,1,0,1,1,1,0 should be ...

- asked by io_tuta (9 votes), answered by Carl Woll (10 votes)

—————————-

[Pattern matching Association in rules] https://mathematica.stackexchange.com/questions/148074/pattern-matching-association-in-rules

I would appreciate an explanation of how Associations behave in pattern matching, especially when matching rules, and using HoldPattern.

Consider the following:

assocRuleList = {&lt;||&gt; :&gt;  ...

- asked by ZeitPolizei (9 votes), answered by WReach (7 votes)

—————————-

[How to combine Neural Network and Audio like Classify?] https://mathematica.stackexchange.com/questions/148158/how-to-combine-neural-network-and-audio-like-classify

I want to combine Audio object and Neural Network ,first thing I remember is Classify

windInstrument = ExampleData[{"Sound", #}] &amp; /@ {"AltoFlute", "AltoSaxophone", "BassClarinet", "BassFlute",  ...

- asked by partida (8 votes)

—————————-

[ROT13 and upside-down text (flip text)] https://mathematica.stackexchange.com/questions/147829/rot13-and-upside-down-text-flip-text

How can we transform text in order to achieve ROT13 and flip text using Wolfram Mathematica?

1. ROT13

2. Flip text

- asked by rhermans (8 votes), answered by rhermans (11 votes)

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

[Mathematica 10.0.x freezes in Initializing kernels] https://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 (73 votes), answered by ilian (94 votes)

—————————-

[1 Plot, 2 Scale/Axis] https://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 \(y\) axis. How can I have two different axis?

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

- asked by 500 (115 votes), answered by ArgentoSapiens (110 votes)

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

[How to improve the creation of tables of code and comments] https://mathematica.stackexchange.com/questions/148160/how-to-improve-the-creation-of-tables-of-code-and-comments

While writing a response to a certain MSE question I made a function that tabulates code and comments. (See the definition below.)

Here is an example:

code = " 
  FoldList[(* reduction function *) 
   ...

- asked by Anton Antonov (5 votes)

—————————-

[Export as HTML: Image of text is squished] https://mathematica.stackexchange.com/questions/147819/export-as-html-image-of-text-is-squished

When exporting a notebook to HTML, the notebook’s cells render as images, but the text is often squished. For example, this notebook:

... renders as

If I manually line-break the code, the ...

- asked by ConvexMartian (3 votes)

—————————-

[How to implement the same function use *Layer function?] https://mathematica.stackexchange.com/questions/148181/how-to-implement-the-same-function-use-layer-function

Reading YOLO method to detect object in the image(paper),I want to train this tiny-VOLO v1 on Mathematica,but the special loss function is very difficult to write.

Total loss is:

For brief,I use ...

- asked by partida (5 votes)

4.29 Tuesday, June 6, 2017

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

[List of symbols without built-in meaning] https://mathematica.stackexchange.com/questions/147328/list-of-symbols-without-built-in-meaning

Is there a list of all symbols with special display forms but no built-in meaning? That is, operators that are described in the tutorial Operators without Built-in Meanings?

- asked by Carl Woll (17 votes), answered by Carl Woll (17 votes)

—————————-

[Does Mathematica support deep links?] https://mathematica.stackexchange.com/questions/147374/does-mathematica-support-deep-links

So GitHub sent me on quite the journey, after it opened its desktop app from my browser. Copying the link I found something looking like: "github-mac://...". 

I spent the next like 15 minutes trying ...

- asked by b3m2a1 (12 votes), answered by b3m2a1 (12 votes)

—————————-

[How and why to use monadic programming in Mathematica?] https://mathematica.stackexchange.com/questions/147679/how-and-why-to-use-monadic-programming-in-mathematica

This is a methodological question with two parts:

How to use monadic programming in Mathematica?

and Why use monadic programming in Mathematica?

In my opinion the questions are inter-related – ...

- asked by Anton Antonov (10 votes)

—————————-

[Google Drive API connection: (or how can I build a service connection to an OAuth2 service?)] https://mathematica.stackexchange.com/questions/147451/google-drive-api-connection-or-how-can-i-build-a-service-connection-to-an-oaut

From here I know how to build a a basic service connection.

And that’s fine in simple authentication cases but how do I do this for OAuth services?

Even more specifically, how can I do this for ...

- asked by b3m2a1 (10 votes), answered by b3m2a1 (9 votes)

—————————-

[Performance of Nest vs. Do] https://mathematica.stackexchange.com/questions/147545/performance-of-nest-vs-do

When I am iterating the logistic function using a pure function, comparing Do and Nest:

x = 0.1; Do[x = 3 x (1 - x), 300] // RepeatedTiming 
Nest[3 # (1 - #) &amp;, .1, 300] // RepeatedTiming

- asked by Stitch (9 votes), answered by Karsten 7. (9 votes)

—————————-

[Huge arrows in 3D graphics] https://mathematica.stackexchange.com/questions/147586/huge-arrows-in-3d-graphics

Hi. Consider the following code:

f1 = Plot3D[-Exp[-x^2-y^2],{x,-5,5},{y,-5,5},PlotRange-&gt;All] 
f2 = Graphics3D[Table[{Arrowheads[.01],Arrow[{{2Cos[i],2Sin[i],0},{2.5Cos[i],  ...

- asked by AccidentalFourierTransform (9 votes), answered by Jens (9 votes)

—————————-

[Clean package update for API/FormFunctions on Wolfram Cloud] https://mathematica.stackexchange.com/questions/147330/clean-package-update-for-api-formfunctions-on-wolfram-cloud

Cross posted on community.wolfram.com (new comments)

TLDR

There is a pool of kernels/sessions available for each user, you don’t have control over the pool only over specific kernel you currently ...

- asked by Kuba (7 votes), answered by b3m2a1 (7 votes)

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

[My Girlfriend is going to prison...Save her with Math] https://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,  ...

- asked by Prisoners Dilema (37 votes), answered by bobthechemist (24 votes)

—————————-

[Creating legends for plots with multiple lines?] https://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  ...

- asked by Eiyrioü von Kauyf (60 votes), answered by Jens (89 votes)

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

[URLFetch parameters interfere with POST] https://mathematica.stackexchange.com/questions/147526/urlfetch-parameters-interfere-with-post

(orig: URLFetch Multipart POST fails to post Body?)

Update 2:

So after much weeping and gnashing of teeth our Lord and Savior Mathematica deemed me worthy of figuring out (some of) what the hell was ...

- asked by b3m2a1 (1 vote)

—————————-

[What is the best method for solving \(D(a,b,r,t)\) under a 5-minute computation time?] https://mathematica.stackexchange.com/questions/147520/what-is-the-best-method-for-solving-da-b-r-t-under-a-5-minute-computation-ti

Consider set \(\left \{\left . T(c,d)\right |c,d\in \mathbb {Z}\right \}\), a subset of rational numbers, where \(T(c,d)\) is a function.

I want to compute \(D(a,b,r,t)\)

...

- asked by Arbuja (1 vote)

—————————-

[Loop construction with multiple expressions for solving differential equation] https://mathematica.stackexchange.com/questions/147523/loop-construction-with-multiple-expressions-for-solving-differential-equation

I want to solve the following ODE.

\(H'' + \frac {2}{r}H'-\frac {\partial V_{eff}(H,r)}{\partial H}=0\)

with the following conditions

\(\frac {dH}{dr}(r=0)=0\) and \(H(r= \infty )=0\)

Regardless of the ...

- asked by Konstantinos (2 votes)

4.30 Tuesday, May 30, 2017

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

[Estimate the "Blurry" distribution of an image] https://mathematica.stackexchange.com/questions/146989/estimate-the-blurry-distribution-of-an-image

I’m trying to analyze an image obtained by scanning electron microscope(SEM) where different parts of the same image has has different blurring radius. My goal is to determine how blurry different ...

- asked by Wjx (17 votes), answered by Shadowray (20 votes)

—————————-

[Nest list with two functions] https://mathematica.stackexchange.com/questions/147055/nest-list-with-two-functions

Is it possible to use the NestList command with two functions, one at every even step and apply the other at every odd step. If this is possible could someone share an example ?

- asked by David (12 votes), answered by Shadowray (14 votes)

—————————-

[Exporting structured data to HDF5] https://mathematica.stackexchange.com/questions/146859/exporting-structured-data-to-hdf5

Sadly the documentation is lacking any useful examples on how to Export more complex data in HDF5. There is only

  Export["file.h5",{expr1,...},{"Datasets", {"dataset1",...}}] creates an HDF5 file,  ...

- asked by Sascha (10 votes), answered by Sascha (5 votes)

—————————-

[Using Mathematica to create an H-Tree] https://mathematica.stackexchange.com/questions/146797/using-mathematica-to-create-an-h-tree

Can folks show me several methods I can use to draw the following fractal H-Tree?

I did use Free-Form input, as:

= h-fractal

And got this image, which is three iterations, but no idea how it was ...

- asked by David (10 votes), answered by J. M. (10 votes)

—————————-

[Combining # & pure functions with post-fix notation] https://mathematica.stackexchange.com/questions/147132/combining-pure-functions-with-post-fix-notation

I can’t find the link anymore but there was a talk at a Wolfram conference (referencing v7 I think) where the authors highlight that stringing together functions like this:

Range[100] //  ...

- asked by Joe (9 votes), answered by Szabolcs (7 votes)

—————————-

[Hosting a curated data function / server in Google Drive] https://mathematica.stackexchange.com/questions/146832/hosting-a-curated-data-function-server-in-google-drive

I want to make a curated data function, but I have no good place to store the paclets.

Per the pricing page I only get:

And that’s really not enough to host all of my data plus give me room to do ...

- asked by MB1965 (9 votes), answered by MB1965 (8 votes)

—————————-

[Interpolate the noisy data] https://mathematica.stackexchange.com/questions/146688/interpolate-the-noisy-data

I have some noisy data

data = Uncompress[FromCharacterCode[ 
   Flatten[ImageData[Import["http://i.stack.imgur.com/RZcpj.png"],"Byte"]]]]

Plot looks like this

There is noise in certain region, ...

- asked by Saesun Kim (9 votes), answered by bill s (8 votes)

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

[Creating Mathematica packages] https://mathematica.stackexchange.com/questions/29324/creating-mathematica-packages

I’m building a package to help me write packages and their documentation. In this post I explained how to make a package and its documentation. In the answer I provided I describe how to build a very ...

- asked by jmlopez (89 votes), answered by Leonid Shifrin (114 votes)

—————————-

[How can I plot the direction field for a differential equation?] https://mathematica.stackexchange.com/questions/8841/how-can-i-plot-the-direction-field-for-a-differential-equation

I’d like to plot the graph of the direction field for a differential equation, to get a feel for it. I’m a novice, right now, when it comes to plotting in Mathematica, so I’m hoping that someone can ...

- asked by Matt Groff (20 votes), answered by Peter Breitfeld (17 votes)

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

[How to replace all instances of a number throughout my entire cell] https://mathematica.stackexchange.com/questions/146971/how-to-replace-all-instances-of-a-number-throughout-my-entire-cell

I have a cell where for several instances throughout I label certain functions, strings, and ranges using a similar pattern so as to follow through with integration calculations, list forming, and ...

- asked by yalev (3 votes)

—————————-

[Error occurred while connecting to remote kernel.Can’t use dynamic] https://mathematica.stackexchange.com/questions/146823/error-occurred-while-connecting-to-remote-kernel-cant-use-dynamic

When Open Mathematica using remote kernel,it throws LinkConnect error. 
But normal command can evaluate.Like Range@5,$Version... 
 
But Can't use dynamic.It throws An unknown box name. 
So if I want to  ...

- asked by partida (4 votes)

—————————-

[Partition an Image automatically Based on Borders] https://mathematica.stackexchange.com/questions/146837/partition-an-image-automatically-based-on-borders

I would like to be able to train a model to recognize the borders in a newspaper image and then partition those into separate Images. Images similar to this would be the input Image

And then ...

- asked by Avadhut Bhosarekar (2 votes)

4.31 Tuesday, May 23, 2017

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

[PerformanceGoal option ignored in V11.1] https://mathematica.stackexchange.com/questions/146214/performancegoal-option-ignored-in-v11-1

Bug introduced in 11.1

[CASE:3892079] was created

[...] I have reproduced this problem with PerformanceGoal in version 11.1 and reported the issue to our developers [...]

Take this code:

...

- asked by Kuba (14 votes), answered by Kuba (15 votes)

—————————-

[Can I build my own curated data function?] https://mathematica.stackexchange.com/questions/146220/can-i-build-my-own-curated-data-function

I love the huge curated datasets, but they don’t cover everything. I have my own huge dataset which is too much to distribute as an EntityStore so is there a way to build my own analog of, say, ...

- asked by MB1965 (13 votes), answered by MB1965 (16 votes)

—————————-

[Support for low-complexity (compressible) lists] https://mathematica.stackexchange.com/questions/146244/support-for-low-complexity-compressible-lists

By "low-complexity list" I mean a list like the following:

lcl = {17, 17, 17, 17, 17, 
       21, 21, 21, 21, 21, 21, 21, 21, 
       11, 11, 11, 11, 11, 11, 11}

It contains 20 elements, but only 3 ...

- asked by kjo (10 votes), answered by Mr.Wizard (6 votes)

—————————-

[Automating documentation generation] https://mathematica.stackexchange.com/questions/146670/automating-documentation-generation

Outside of kernel symbols Mathematica provides access to lots of usage info, e.g. DownValues, Options, Messages, etc.

Most languages, if given this sort of info, would be able to provide an automatic ...

- asked by MB1965 (9 votes), answered by MB1965 (10 votes)

—————————-

[Trace of -1 expression] https://mathematica.stackexchange.com/questions/146506/trace-of-1-expression

I’m trying to understand Trace. Usually it doesn’t repeat but it adds -1,-1 for his simple expression after having a correct result.

-{1}//Trace 
 
  {-1, {-1}, {-1, -1}, {-1}} 
 
 
Why -{1}//Trace is  ...

- asked by io_tuta (9 votes), answered by Michael E2 (7 votes)

—————————-

[How to import a Tensorflow model?] https://mathematica.stackexchange.com/questions/146216/how-to-import-a-tensorflow-model

I’ve trained a network in Tensorflow and have the checkpoint files, I’d like to if anyone has written a parser or importer to pull the evaluation graph and/or weights into Mathematica?

- asked by user5601 (9 votes)

—————————-

[intersection between two 2D arrays with labeled data is slow] https://mathematica.stackexchange.com/questions/146558/intersection-between-two-2d-arrays-with-labeled-data-is-slow

Here is how to Generate data

the function is below with two images to generate data

img1 
 
img2 
 
 
segmentImage[binarizedMask_?ImageQ] := 
Module[{seg, areas, indexMaxarea, maxArea}, 
seg =  ...

- asked by Ali Hashmi (8 votes), answered by Carl Woll (6 votes)

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

[Exporting graphics to PDF - huge file] https://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,  ...

- asked by Matthew Leingang (92 votes), answered by Heike (80 votes)

—————————-

[Generating a Sierpinski carpet] https://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 ...

- asked by chyaong (46 votes), answered by Mr.Wizard (75 votes)

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

[Exporting graphics with VertexColors problem] https://mathematica.stackexchange.com/questions/146306/exporting-graphics-with-vertexcolors-problem

I’ve generated a graphics which exhibit gradient color in rectangle and export it as:

SetDirectory[NotebookDirectory[]]; 
Export["./test.pdf", Graphics[{Polygon[{{-4, 5/3}, {-4, 0}, {4, 0}, {4,  ...

- asked by RoderickLee (3 votes)

—————————-

[How to imitate the opacity plot in EditColorFunction] https://mathematica.stackexchange.com/questions/146623/how-to-imitate-the-opacity-plot-in-editcolorfunction

I wish to imitate the opacity plot as shown below:

Edit2: (ref: https://www.wolfram.com/mathematica/new-in-9/3d-volumetric-image-processing/edit-color-function-palette-for-image3d.html)

Here is ...

- asked by Majis (3 votes)

—————————-

[Possible bug in Export with CharacterEncoding -> "PrintableASCII"] https://mathematica.stackexchange.com/questions/146294/possible-bug-in-export-with-characterencoding-printableascii

In the Documentation we read (emphasis is mine):

By default, the Wolfram System uses the character encoding "PrintableASCII" when saving notebooks and packages. This means that when special ...

- asked by Alexey Popkov (4 votes)

4.32 Tuesday, May 16, 2017

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

[Mathematica stuck in "running" for every calculation I attempt, kernel error] https://mathematica.stackexchange.com/questions/146005/mathematica-stuck-in-running-for-every-calculation-i-attempt-kernel-error

Bug caused by paclet update and fixed by paclet update.

I downloaded Mathematica this morning to do an implicit polar plot. I attempt to run the code

Manipulate[ 
ContourPlot[ 
Evaluate@With[{r =  ...

- asked by 0celouvskyopoulo7 (26 votes), answered by ilian (16 votes)

—————————-

[How to split data into clusters based on fitting to function] https://mathematica.stackexchange.com/questions/146079/how-to-split-data-into-clusters-based-on-fitting-to-function

I have data which looks somewhat like this:

On the picture, you can see that the data can be described by 2 linear functions - if you manage to split it into 2 groups, each can easily be fitted ...

- asked by Arsen Zahray (10 votes), answered by rhermans (11 votes)

—————————-

[Inserting cones at intersection points two curves] https://mathematica.stackexchange.com/questions/145874/inserting-cones-at-intersection-points-two-curves

I am plotting the null geodesics for a Schwarzschild surface in Schwarzschild coordinates and would light to insert small future light-cones at the points of intersection to emphasize the tipping over ...

- asked by Soof_fie (9 votes), answered by rhermans (3 votes)

—————————-

[How to define a function inside a Compile?] https://mathematica.stackexchange.com/questions/145931/how-to-define-a-function-inside-a-compile

I want to compile a variety of commands, including a function. I need to map this function, inside the compilation, and I can’t include the function without facing errors such as ...

- asked by user5253864 (9 votes), answered by xzczd (10 votes)

—————————-

[How to automatically do a computation, Quit[], restart and do a new computation] https://mathematica.stackexchange.com/questions/145852/how-to-automatically-do-a-computation-quit-restart-and-do-a-new-computation

Related questions have been asked before (eg Where does a package have to be loaded?, http://stackoverflow.com/questions/6152023/quit-kernel-in-mathematica-by-a-command-not-using-evaluation-menu

- asked by Gaius (9 votes), answered by Shadowray (6 votes)

—————————-

[1D transient heat equation problem with controller] https://mathematica.stackexchange.com/questions/145799/1d-transient-heat-equation-problem-with-controller

I would appreciate some help with following issue:

I am trying to solve a 1D transient heat equation problem with a control loop in order to compensate a time variable boundary condition at one ...

- asked by daklems (9 votes), answered by user21 (6 votes)

—————————-

[Clarify when to use Style vs Directive vs List] https://mathematica.stackexchange.com/questions/145856/clarify-when-to-use-style-vs-directive-vs-list

I am confused about when to use a simple list of style options, the Directive function or the Style function.

As shown below, for simple situations at least, they seem entirely equivalent which ...

- asked by Joe (8 votes)

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

[How to manipulate 2D plots?] https://mathematica.stackexchange.com/questions/7142/how-to-manipulate-2d-plots

When it comes to visual analysis, large datasets or data with intricate internal details often makes plotting in 2D useless, as the outcome is either just a fraction of the full dataset, or no details ...

- asked by István Zachar (115 votes), answered by István Zachar (131 votes)

—————————-

[Where can I find examples of good Mathematica programming practice?] https://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. (463 votes), answered by faysou (411 votes)

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

[Unexpected behavior of a variable] https://mathematica.stackexchange.com/questions/145661/unexpected-behavior-of-a-variable

I am confused with a strange phenomenon that I observe and do not understand.

Look, here is a simple code making a random walk:

Clear[list]; 
list = Accumulate[RandomInteger[{-1, 1}, {10, 2}]]

- asked by Alexei Boulbitch (2 votes)

—————————-

[How can I disable system updates only?] https://mathematica.stackexchange.com/questions/146133/how-can-i-disable-system-updates-only

Suppose I’m quite happy with my current Mathematica installation and wish to keep the system in its current form just reliably working.

Since there were already at least two cases[1,2] when a lot of ...

- asked by Alexey Popkov (7 votes)

—————————-

[Import/export manipulate state in file] https://mathematica.stackexchange.com/questions/146017/import-export-manipulate-state-in-file

Is it possible to export the state of Manipulate with big number of parameters in file and then restore the parameters of Manipulate from this file?

- asked by (3 votes)

4.33 Tuesday, May 2, 2017

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

[Count works differently depending on how an association was created] https://mathematica.stackexchange.com/questions/144813/count-works-differently-depending-on-how-an-association-was-created

Bug introduced in 10.4 and persisting through 11.1.1

I create two associations, that are supposed to be exactly the same. And then I want to count the elements at the second level. And I get ...

- asked by Stitch (19 votes), answered by WReach (12 votes)

—————————-

[Why is Plus so much slower than Total?] https://mathematica.stackexchange.com/questions/145019/why-is-plus-so-much-slower-than-total

Why is Plus so much slower than total for summing lists?

list = RandomReal[1, 10000000]; 
AbsoluteTiming[Plus @@ list] 
AbsoluteTiming[Total[list]] 
 
 
Output: 
 
{1.67408, 5.00073*10^6} 
{0.00570379,  ...

- asked by Jorge Perez (14 votes), answered by Shadowray (17 votes)

—————————-

[Delete duplicates from list of lists as if on a necklace] https://mathematica.stackexchange.com/questions/144696/delete-duplicates-from-list-of-lists-as-if-on-a-necklace

Given a list of lists of integers, all of the same length, I want to regard two elements as equivalent if one is the rotated and/or reflected version of another (that is, if the two lists are the same ...

- asked by rogerl (13 votes), answered by Shadowray (13 votes)

—————————-

[Exchanging numpy arrays between Python and Mathematica?] https://mathematica.stackexchange.com/questions/144770/exchanging-numpy-arrays-between-python-and-mathematica

I've been using np.savetxt(location, result, delimiter=',') 
in Python followed by Import[location,"CSV"] in Mathematica. 
 Some of my files are around 1GB, opening seems a bit slow, what else do people  ...

- asked by Yaroslav Bulatov (12 votes), answered by xslittlegrass (16 votes)

—————————-

[How to plot planar graphs in a visually pleasing way?] https://mathematica.stackexchange.com/questions/144594/how-to-plot-planar-graphs-in-a-visually-pleasing-way

Cross posted to Wolfram Community

Mathematica has a layout algorithm to plot planar graphs without edge crossings. This typically produces an ugly triangular layout where some vertices and edges ...

- asked by Szabolcs (11 votes), answered by Szabolcs (6 votes)

—————————-

[Where are my Cloud Credits going?] https://mathematica.stackexchange.com/questions/144859/where-are-my-cloud-credits-going

In less than a month I've used 5k cloud credits (half of my quota) 
and all I did was deploying a bunch of static notebooks with 
CloudDeploy[CurrentNotebook[],permissions-&gt;Public] (more  ...

- asked by Yaroslav Bulatov (10 votes)

—————————-

[Mathematica erroneously says this integral does not converge] https://mathematica.stackexchange.com/questions/144965/mathematica-erroneously-says-this-integral-does-not-converge

Mathematica (as of v. 11.1.0) does not recognize that this special case of Frullani’s integral converges:

Integrate[(ArcTan[a*x] - ArcTan[b*x])/x, {x, 0, Infinity}] 
(* Integrate::idiv: Integral of  ...

- asked by Pillsy (10 votes), answered by Michael E2 (16 votes)

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

[Generating a Sierpinski carpet] https://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 ...

- asked by chyaong (46 votes), answered by Mr.Wizard (75 votes)

—————————-

[Alternatives to procedural loops and iterating over lists in Mathematica] https://mathematica.stackexchange.com/questions/7924/alternatives-to-procedural-loops-and-iterating-over-lists-in-mathematica

While there are some cases where a For loop might be reasonable, it’s a general mantra one I subscribe to myself that "if you are using a For loop in Mathematica, you are probably doing it wrong". ...

- asked by Mr.Wizard (154 votes), answered by Mr.Wizard (104 votes)

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

[How to get parent key in Query on Association/Dataset?] https://mathematica.stackexchange.com/questions/144995/how-to-get-parent-key-in-query-on-association-dataset

Is there a general and terse method to obtain the parent key of the current "position" in a Query of an Association/Dataset?

Say I have the following Association.

assoc = 
 &lt;|"A" -&gt; 
     ...

- asked by Edmund (3 votes)

—————————-

[Can anyone help me decipher these few lines? Also, converting this code for a 2x2 matrix input to a 3x3 matrix input?] https://mathematica.stackexchange.com/questions/145049/can-anyone-help-me-decipher-these-few-lines-also-converting-this-code-for-a-2x

Here’s the code. I’m completely new to Mathematica so bear with me.

clear[ug]; 
ug[{{a11_, a12_}, {a21_, a22_}}] := 
 Module[{A, f, b1, b2, y1, y2, U, P1, P2, UG}, 
  A = {{a11, a12}, {a21, a22}}; 
   ...

- asked by Pacotacobell (2 votes)

—————————-

[Bifurcation package like AUTO?] https://mathematica.stackexchange.com/questions/144795/bifurcation-package-like-auto

I was wondering if there is any available continuation and bifurcation analysis package for Mathematica. I’m looking for something like AUTO. I’ve seen there is already a Matlab version of the ...

- asked by Mirko Aveta (3 votes)

4.34 Tuesday, April 25, 2017

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

[Fast spherical polygon] https://mathematica.stackexchange.com/questions/144167/fast-spherical-polygon

Cross posted on Wolfram Community

Question

Given a list of points on a sphere and the sphere’s radius, I’d like to plot a spherical polygon with those points as vertices.

And this needs to be fast, ...

- asked by Kuba (20 votes), answered by halirutan (7 votes)

—————————-

[How to uncompress strings safely (without any evaluation)?] https://mathematica.stackexchange.com/questions/144171/how-to-uncompress-strings-safely-without-any-evaluation

Compressed strings are often used to exchange Mathematica expressions on the Internet. It is, however, not easy to see what such expression will do after decompression. Resulting code can perform ...

- asked by Shadowray (15 votes), answered by Itai Seggev (11 votes)

—————————-

[Sharing data via the cloud] https://mathematica.stackexchange.com/questions/144130/sharing-data-via-the-cloud

I’ve got some stuff that I want to be able distribute to my totally real friends, but I don’t want to have to email them every time I change something.

How can I set up sharing via the cloud?

- asked by MB1965 (13 votes), answered by MB1965 (13 votes)

—————————-

[C++ interface to large project] https://mathematica.stackexchange.com/questions/144047/c-interface-to-large-project

We are developing a quite large mathematical software in C++ and would like to have a Mathematica interface. We have our own C++ library and our idea would be, to write a Mathematica wrapper class and ...

- asked by Richard (12 votes), answered by Szabolcs (12 votes)

—————————-

[Why doesn’t FullSimplify return -x working on Abs[x] and x<0?] https://mathematica.stackexchange.com/questions/144310/why-doesnt-fullsimplify-return-x-working-on-absx-and-x0

I am using Mathematica 11.1, and I stumbled upon this strange response using the Abs function.

FullSimplify[Abs[x],x&lt;0] 
(* Abs[x] *) 
 
 
while, for example 
 
FullSimplify[Abs[x],x&gt;0] 
(* x *)

as ...

- asked by mickep (10 votes), answered by Simon Woods (13 votes)

—————————-

[ParallelMap vs Map performance comparsion] https://mathematica.stackexchange.com/questions/144056/parallelmap-vs-map-performance-comparsion

The ParallelMap claims doing map faster than the normal Map, and I checked the demo does as the document describing

but, I try my testing, it seems not exactly while ParallelMap excuting with 8 ...

- asked by Jerry (10 votes), answered by Szabolcs (10 votes)

—————————-

[How to plot a matrix with 3D style] https://mathematica.stackexchange.com/questions/144443/how-to-plot-a-matrix-with-3d-style

I have a list like

SeedRandom[1] 
MatrixForm[list = RandomInteger[5, {5, 5}]] 
 
We can plot it with MatrixPlot directly with 2D style 
 
MatrixPlot[list]

I hope to plot it with 3D style.This is ...

- asked by yode (9 votes), answered by kglr (2 votes)

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

[Where can I find examples of good Mathematica programming practice?] https://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. (463 votes), answered by faysou (410 votes)

—————————-

[How can I plot the direction field for a differential equation?] https://mathematica.stackexchange.com/questions/8841/how-can-i-plot-the-direction-field-for-a-differential-equation

I’d like to plot the graph of the direction field for a differential equation, to get a feel for it. I’m a novice, right now, when it comes to plotting in Mathematica, so I’m hoping that someone can ...

- asked by Matt Groff (20 votes), answered by Peter Breitfeld (16 votes)

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

[Quality of RegionIntersection[]: How to control?] https://mathematica.stackexchange.com/questions/144270/quality-of-regionintersection-how-to-control

This code produces a crude intersection.

a = {-1/2, -1/2, -1/2}; 
b = {1/2, 1/2, 1/2}; 
R = RegionIntersection[Ball[a, 1], Ball[b, 1]]; 
Region[R]

How can I control the quality so that the ...

- asked by Joseph O’Rourke (4 votes)

—————————-

[Why ReadList ignores NullRecords for Number?] https://mathematica.stackexchange.com/questions/144149/why-readlist-ignores-nullrecords-for-number

When thinking on this recent question the immediately obvious 
solution which came to my mind was to use ReadList with options 
RecordLists -&gt; True and NullRecords -&gt; True for reading objects of  ...

- asked by Alexey Popkov (5 votes)

—————————-

[Why does the domain of an interpolating function not match the corresponding ParametricNDSolve solution range?] https://mathematica.stackexchange.com/questions/144355/why-does-the-domain-of-an-interpolating-function-not-match-the-corresponding-par

Question

I had believed - and mostly observed - that when I use ParametricNDSolve the obtained ParametricFunctions given as the solution to some ODE or DAE will be translated into ...

- asked by gwr (3 votes)

4.35 Tuesday, April 18, 2017

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

[Crack CAPTCHA using deep learning] https://mathematica.stackexchange.com/questions/143691/crack-captcha-using-deep-learning

Deep convolutional neural networks are very good at computer vision related tasks. Optical Character Recognition (OCR) is one important branch of computer vision. In fact, the convolution neural ...

- asked by xslittlegrass (50 votes), answered by xslittlegrass (52 votes)

—————————-

[Changes to Series[...] in version 11.1] https://mathematica.stackexchange.com/questions/143414/changes-to-series-in-version-11-1

I have updated to Mathematica 11.1 and I am shocked to see that the Series-function now works differently:

If I enter

Series[x^2+x^3, {x,0,0}] 
 
 
it will return 
 
x^2+O[x]^3

which is just weird. In ...

- asked by Matthias Koenig (16 votes), answered by QuantumDot (3 votes)

—————————-

[WLNet format incompatible between version 11.0 and 11.1] https://mathematica.stackexchange.com/questions/143699/wlnet-format-incompatible-between-version-11-0-and-11-1

It seems that there are some behavior changes of neural network layers from version 11.0 to 11.1 that leads to the incompatibility of WLNet format.

Consider this example:

Network exported in 11.0

...

- asked by xslittlegrass (13 votes), answered by Taliesin Beynon (7 votes)

—————————-

[DSolve solution depends on ordering of equation] https://mathematica.stackexchange.com/questions/143726/dsolve-solution-depends-on-ordering-of-equation

Bug introduced in 8.0 or earlier and persisting through 11.1.0 or later

I am trying to obtain the general solution, \(G(x_1,x_2,x_3,x_4)\) to the very easy system of PDEs:

- asked by Jeremy Upsal (12 votes), answered by Nasser (8 votes)

—————————-

[Why the Callout option makes plotting performance poor] https://mathematica.stackexchange.com/questions/143711/why-the-callout-option-makes-plotting-performance-poor

Bug introduced in 11.0 and fixed in 11.1

The Callout option is a new option for plotting, but the performance is very poor, see bellow testing case.

num = 1000; 
list = N@Sin@Range[num]; 
list2 =  ...

- asked by Jerry (11 votes)

—————————-

[Neural machine translation model using deep learning] https://mathematica.stackexchange.com/questions/143609/neural-machine-translation-model-using-deep-learning

In Mathematica version 11.1, SequenceAttentionLayer is introduced to model attentions in the recurrent neural network. It has been shown that attention mechanism can greatly improve the quality of a ...

- asked by xslittlegrass (11 votes), answered by Sebastian (8 votes)

—————————-

[Backslide in NSolve in V11.1?] https://mathematica.stackexchange.com/questions/143824/backslide-in-nsolve-in-v11-1

In V11.1,

NSolve[BesselJ[0, x] == 0 &amp;&amp; 0 &lt; x &lt; 20, x]

returns no solutions:

But in V11.0 (and earlier), it returns all solutions:

Is there anyway to get NSolve to solve this ...

- asked by Michael E2 (10 votes), answered by Nasser (8 votes)

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

[How to perform a multi-peak fitting?] https://mathematica.stackexchange.com/questions/26336/how-to-perform-a-multi-peak-fitting

I am wondering how to implement the multi-peak detecting and fitting in Mathematica. Following is an example of fitting the data using three peaks (such that the data   peak1 + peak2 + peak3).

The ...

- asked by Everett You (43 votes), answered by Silvia (45 votes)

—————————-

[How to make an inkblot?] https://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___] :=  ...

- asked by István Zachar (84 votes), answered by Sjoerd C. de Vries (47 votes)

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

[How to create an APIFunction that takes a list with constraints on the list elements?] https://mathematica.stackexchange.com/questions/143709/how-to-create-an-apifunction-that-takes-a-list-with-constraints-on-the-list-elem

This APIFunction takes a list as an argument:

func = APIFunction[{"x" -&gt; DelimitedSequence["Integer", ","]}, #x^3 &amp;] 
 
func["x" -&gt; Range[4]]

What I’d like to be able to do is place a ...

- asked by Mike Honeychurch (4 votes)

—————————-

[How to setup FrameTicks for TradingChart] https://mathematica.stackexchange.com/questions/143705/how-to-setup-frameticks-for-tradingchart

I’m trying to setup FrameTicks for TradingChart, but it dosn’t work.

(*take data*) 
data = FinancialData["NASDAQ:AAPL", "OHLCV", {{2017, 1, 1}, {2017, 4, 16}}]; 
 
(*def. of ticks*) 
maxh =  ...

- asked by Jerry (3 votes)

—————————-

[What are the software requirements to train neural networks on GPU?] https://mathematica.stackexchange.com/questions/143795/what-are-the-software-requirements-to-train-neural-networks-on-gpu

It seems that GPU training in Mathematica has some additional requirements on the software. For example, when I run this example on a Linux system, I get the following errors

trainingData = 
   ... 

- asked by xslittlegrass (8 votes)

4.36 Tuesday, April 11, 2017

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

[L-System in Mathematica] http://mathematica.stackexchange.com/questions/143214/l-system-in-mathematica

Here is some Maple code for drawing an L-System:

  with(Fractals:-LSystem) 
  cons := ["A" = "draw:1", "+" = "turn:-90", "B" = "turn:90"] 
  state, rules := "A", ["A" = "AB+BA+B", "B" = "B+AAB"] 
   ...

- asked by vito (21 votes), answered by Szabolcs (21 votes)

—————————-

[What’s purpose of the new function BinarySerialize?] http://mathematica.stackexchange.com/questions/141885/whats-purpose-of-the-new-function-binaryserialize

11.1 introduced a new function BinarySerialize, but I don’t know what it can do better than the traditional method.Its behavior is very similar to Compress,though I cannot find any advantage of it.It ...

- asked by yode (17 votes), answered by Shadowray (14 votes)

—————————-

[Why does SetPrecision not apply to 0?] http://mathematica.stackexchange.com/questions/143296/why-does-setprecision-not-apply-to-0

Is there a rationale why SetPrecision works on integers except for 0?

SetPrecision[1,5] 
 
  1.0000 
 
 
SetPrecision[0,5] 
 
  0

- asked by alancalvitti (11 votes), answered by Shadowray (17 votes)

—————————-

[How to use Mathematica to train a network Using out of core classification?] http://mathematica.stackexchange.com/questions/142135/how-to-use-mathematica-to-train-a-network-using-out-of-core-classification

I see there is doc about how to train a network Using out of core image classification and this question.But the object is only image.

I want to use a binary file as data,for example,this.

data = ...

- asked by partida (10 votes), answered by xslittlegrass (9 votes)

—————————-

[Combining pure functions] http://mathematica.stackexchange.com/questions/142072/combining-pure-functions

Is there an easy way to combine pure functions into a single pure function? For example, say I have

f = #1^2 &amp;; 
g = #1 - 2 &amp;;

and I want to define a new pure function h that is the ...

- asked by tparker (10 votes), answered by Kuba (5 votes)

—————————-

[Question about changes in Documentation Center from version 10 to 11] http://mathematica.stackexchange.com/questions/143335/question-about-changes-in-documentation-center-from-version-10-to-11

The package Exploring Abstract Algebra with Mathematica works fine in Mathematica 10.4.

After installing it in the $UserBaseDirectory it neatly shows up under Add-Ons and Packages in the ...

- asked by nilo de roock (9 votes), answered by Szabolcs (8 votes)

—————————-

[How can I install packages distributed as .paclet files?] http://mathematica.stackexchange.com/questions/141887/how-can-i-install-packages-distributed-as-paclet-files

I downloaded a Mathematica package. It came as a file with the .paclet extension. How can I install or uninstall it?

- asked by Szabolcs (9 votes), answered by Szabolcs (8 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[], r Sin[], r^2}, {r, 0,  ...

- asked by Matthew Leingang (90 votes), answered by Heike (77 votes)

—————————-

[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 (31 votes), answered by user31159 (30 votes)

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

[How to get consistent/predictable results from ‘Alignment‘ specs within a ‘Grid‘ environment?] http://mathematica.stackexchange.com/questions/142047/how-to-get-consistent-predictable-results-from-alignment-specs-within-a-grid

IME, the results of Alignment specifications within a Grid environment are completely unpredictable.

I give several examples below illustrating this unpredictability.

My questions are:

Is there a ...

- asked by kjo (4 votes)

—————————-

[Why Integrate does not work in the first call?] http://mathematica.stackexchange.com/questions/143199/why-integrate-does-not-work-in-the-first-call

Consider an example (calculated in Mathematica 11.0.1.0):

In[1]:= Integrate[(Sin[(\[Pi] xc)/(2 Lc)] Sin[(m \[Pi]  ...

- asked by Shinrei (3 votes)

—————————-

[Geo data load issues: Texas is missing from GeoRegionValuePlot in v11, but only when mapping US states] http://mathematica.stackexchange.com/questions/142079/geo-data-load-issues-texas-is-missing-from-georegionvalueplot-in-v11-but-only

UPDATE: this is not a global Mathematica issue, but a data load issue on a local machine. Does anyone know how to clear Geo cache and reload the data? I’ve also noticed on this machine that ...

- asked by Gregory Klopper (3 votes)

4.37 Tuesday, April 4, 2017

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

[Object detection and localization using neural network] http://mathematica.stackexchange.com/questions/141598/object-detection-and-localization-using-neural-network

Four important computer vision tasks are classification, localization, object detection and instance segmentation (image taken from cs224d course):

These four tasks are all built on top of the deep ...

- asked by xslittlegrass (30 votes), answered by xslittlegrass (33 votes)

—————————-

[Ball Bouncing on Hilly Terrain] http://mathematica.stackexchange.com/questions/141209/ball-bouncing-on-hilly-terrain

There is a maple code for the bouncing ball on the given curve.

I tried to make this animation by using Mathematica

Why does the following code not work?

surf := Sin[x] + (0.2 Cos[4 x + Sin[4  ...

- asked by vito (19 votes), answered by Stitch (15 votes)

—————————-

[Dataset is 20X slow when adding column heads] http://mathematica.stackexchange.com/questions/141223/dataset-is-20x-slow-when-adding-column-heads

I’m trying to use Dataset to explore some large data. I notice that the performance decrease more than 20X by adding heads to the columns. Here is an example:

We generate some data with integers

...

- asked by xslittlegrass (14 votes), answered by Mr.Wizard (3 votes)

—————————-

[Benchmarking: unexplained switching between high and low performance] http://mathematica.stackexchange.com/questions/141350/benchmarking-unexplained-switching-between-high-and-low-performance

tl;dr I am trying to accurately benchmark some vectorized operations, and compare them between systems. But benchmarking is hard to do well, and I am getting inconsistent results: performance is ...

- asked by Szabolcs (13 votes)

—————————-

[How to visualize attention?] http://mathematica.stackexchange.com/questions/141542/how-to-visualize-attention

In the articles about sequence attention we can see images like this:

Here we see that while translating from French to English, the network attends sequentially to each input state, but sometimes ...

- asked by Alexey Golyshev (12 votes), answered by xslittlegrass (4 votes)

—————————-

[Can one create a custom front-end for Mathematica?] http://mathematica.stackexchange.com/questions/141581/can-one-create-a-custom-front-end-for-mathematica

I’d like to create my custom front-end for Mathematica. I know there’s a console interface (launched as math), which mostly works great, but it can’t really provide functionality of e.g. interactive ...

- asked by Ruslan (9 votes)

—————————-

[How to clear Integrate internal memory?] http://mathematica.stackexchange.com/questions/141324/how-to-clear-integrate-internal-memory

I noticed that when I call Integrate for the first time, on an integral that I know will take longer than the time limit I give it, it will abort for the first time, as expected when wrapped by ...

- asked by Nasser (9 votes), answered by J. M. (11 votes)

================================== 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  ... 

- asked by Eiyrioü von Kauyf (60 votes), answered by Jens (89 votes)

—————————-

[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 ...

- asked by Tianxiang Xiong (49 votes), answered by Artes (39 votes)

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

[GraphicsComplex dynamic colors] http://mathematica.stackexchange.com/questions/141489/graphicscomplex-dynamic-colors

I have a fairly large GraphicsComplex (surface mesh with more than several thousand vertices) and I want to visualize a scalar function that is defined on the vertices. I map the function to vertex ...

- asked by Beginner (6 votes)

—————————-

[how to efficiently generate all directed graphs with 6 vertices] http://mathematica.stackexchange.com/questions/141681/how-to-efficiently-generate-all-directed-graphs-with-6-vertices

I am attempting to generate all non-isomorphic directed graphs with 6 vertices using command ListGraphs[6, Directed].But it does not work efficiently and takes a month producing nothing.

Can anyone ...

- asked by Mike (6 votes)

—————————-

[Bug in Limit in version 11.1.0] http://mathematica.stackexchange.com/questions/141233/bug-in-limit-in-version-11-1-0

Bug introduced in version 11.1.0

The infinite limit

Assuming[a&gt;0&amp;&amp;b&gt;0, 
  Limit[((1+a)*b*x)/Sqrt[1+(1+a)*b*x*((1+a)*b*x+Sqrt[1+(1+a)^2*b^2*x^2])], 
    x-&gt;Infinity]]

gives the ...

- asked by Roman (5 votes)

4.38 Tuesday, March 28, 2017

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

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

[Faster derangements?] http://mathematica.stackexchange.com/questions/140794/faster-derangements

I wonder what is the fastest method to generate derangements?

Both the Combinatorica function and Martin Ender’s answer to Permutations of lists of fixed even numbers are based on filtering the ...

- asked by Mr.Wizard (22 votes), answered by jkuczm (21 votes)

—————————-

[Why Except is so slow as compared to equivalent RegularExpression?] http://mathematica.stackexchange.com/questions/140752/why-except-is-so-slow-as-compared-to-equivalent-regularexpression

When comparing performance of the solutions suggested for this question I discovered that StringExpression involving Except is two orders of magnitude slower for large strings as compared to ...

- asked by Alexey Popkov (18 votes), answered by Alexey Popkov (20 votes)

—————————-

[FrameTicks setting for "tick marks on all sides, but labels only on right and top"] http://mathematica.stackexchange.com/questions/140966/frameticks-setting-for-tick-marks-on-all-sides-but-labels-only-on-right-and-to

Short version: Is there a value for the FrameTicks option that retains the default tick marks on all sides, and puts tick labels only on the right and top sides?

I can imagine all manner of ...

- asked by kjo (15 votes), answered by Mr.Wizard (7 votes)

—————————-

[Quickly importing several thousands of jpg files?] http://mathematica.stackexchange.com/questions/140974/quickly-importing-several-thousands-of-jpg-files

I have several thousands of small .jpg files (30kb each) which I need to import into Mathematica. (I plan to use ImageDistance to investigate their differences.) I tried several ways to import these ...

- asked by Kagaratsch (14 votes), answered by Szabolcs (13 votes)

—————————-

[Select seems unusually slow] http://mathematica.stackexchange.com/questions/140861/select-seems-unusually-slow

I haven’t been doing nearly as much Mathematica as I really should for the past few months, and in order to get my head back in the game I’ve been using it to run roughshod over easy Project Euler ...

- asked by Pillsy (13 votes), answered by Bob Hanlon (10 votes)

—————————-

[Permutations of nested parentheses (Dyck words)] http://mathematica.stackexchange.com/questions/141127/permutations-of-nested-parentheses-dyck-words

How would I construct a function that outputs Dyck Words?

e.g. - there are 14 words in \(\mathcal {D}_{8}\):

`[[[[]]]], [[[][]]], [[[]][]], [[][[]]], [[[]]][], [[][][]], [][[[]]], 
 [[][]][], [[]][[]],  ...

- asked by martin (11 votes), answered by Mr.Wizard (13 votes)

—————————-

[Bug: Library functions from older versions of Mathematica may crash in Mathematica 11.1 and conversely] http://mathematica.stackexchange.com/questions/140758/bug-library-functions-from-older-versions-of-mathematica-may-crash-in-mathemati

The following is a confirmed bug [CASE:3846875] that turned up in the prerelease 11.1.0 and is not solved in the official release.

This is a small example. Execute the following commands in ...

- asked by Fred Simons (11 votes)

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

[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 ...

- asked by Sumit (60 votes), answered by andre (69 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 (expectation values etc.) by running them through Mathematica. When I say, for example,

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

and then ...

- asked by Matthew Brunetti (13 votes), answered by SquareOne (10 votes)

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

[Why does LatticeReduce require integral or at least rational inputs?] http://mathematica.stackexchange.com/questions/141002/why-does-latticereduce-require-integral-or-at-least-rational-inputs

The function LatticeReduce in Mathematica implements the LLL algorithm. It requires the lattice basis to be described as integral or at least rational numbers.

Why so?

The LLL algorithm itself is ...

- asked by wdlang (3 votes)

—————————-

[Textual progress in console?] http://mathematica.stackexchange.com/questions/140675/textual-progress-in-console

Is there any way to get a textual progress bar (e.g. like the progressbar module in a python repl) when working in console mode?

Anything would be better than this:

- asked by user5601 (6 votes)

—————————-

[How to trigger an "ErrorBox behavior"?] http://mathematica.stackexchange.com/questions/140979/how-to-trigger-an-errorbox-behavior

Here’s an example of what I mean by an "ErrorBox behavior". In the front end, if one evaluates the expression

Graphics[Circle[], ImageSize -&gt; Tiny, PlotRange -&gt; {All}]

(which includes the ...

- asked by kjo (7 votes)

4.39 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 ...

- asked by happy fish (30 votes), answered by Wjx (14 votes)

—————————-

[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 ...

- asked by Shadowray (28 votes), answered by user6014 (23 votes)

—————————-

[Generative Adversarial Network] http://mathematica.stackexchange.com/questions/140294/generative-adversarial-network

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

- asked by xslittlegrass (17 votes), answered by Taliesin Beynon (8 votes)

—————————-

[Modeling the spread of an infection in networked computers] http://mathematica.stackexchange.com/questions/140099/modeling-the-spread-of-an-infection-in-networked-computers

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

- asked by martin (14 votes), answered by Martin Ender (24 votes)

—————————-

[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 ...

- asked by Nasser (12 votes), answered by Nasser (18 votes)

—————————-

[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 \(n^2+m^2=h^2\) yields \(h\) as an integer (I think they’re also called ...

- asked by Joe (10 votes), answered by kglr (13 votes)

—————————-

[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 ...

- asked by Sjoerd C. de Vries (10 votes)

================================== 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 \(y\) axis. How can I have two different axis?

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

- asked by 500 (114 votes), answered by ArgentoSapiens (110 votes)

—————————-

[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?

- asked by stevenvh (34 votes), answered by Artes (25 votes)

================================== 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[ 
    ...

- asked by rhermans (4 votes)

—————————-

[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 ...

- asked by pbx (7 votes)

—————————-

[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:

...

- asked by RonH (3 votes)

4.40 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 \(kS + B\), where \(k\) is an integer, and \(S\) (the "scale") and \(B\) (the "bias") are ...

- asked by kjo (17 votes), answered by gwr (14 votes)

—————————-

[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,  ...

- asked by Izaak Meckler (17 votes), answered by march (6 votes)

—————————-

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

How to find vampire numbers by using Mathematica?

A number \(v=xy\) with an even number \(n\) of digits formed by multiplying a pair of \(n/2\)-digit numbers (where the digits are taken from the ...

- asked by vito (13 votes), answered by wolfies (8 votes)

—————————-

[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; ...

- asked by Michael E2 (12 votes), answered by Carl Woll (13 votes)

—————————-

[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^(0``10 n)] 
 
 
then it returns 
 
n/2

what is obviously incorrect.

...

- asked by David Bevan (10 votes)

—————————-

[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  ...

- asked by ZeitPolizei (10 votes), answered by Mr.Wizard (5 votes)

—————————-

[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 ...

- asked by mrz (8 votes), answered by mrz (11 votes)

================================== 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 /  ...

- asked by Matthew Brunetti (11 votes), answered by SquareOne (9 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. (460 votes), answered by faysou (404 votes)

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

[Integrating rational functions of several variables over \(\mathbb {H}^4\)] http://mathematica.stackexchange.com/questions/139631/integrating-rational-functions-of-several-variables-over-mathbbh4

Let \(W\) be a rational function of \(8\) variables \(a,b,c,d,e,f,g,h\) 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 +  ...

- asked by Ricardo Buring (4 votes)

—————————-

[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

...

- asked by ConvexMartian (8 votes)

—————————-

[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 ...

- asked by user372003 (4 votes)

4.41 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? ...

- asked by Feyre (20 votes), answered by Feyre (21 votes)

—————————-

[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. ...

- asked by Kuba (14 votes), answered by Kuba (3 votes)

—————————-

[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 ...

- asked by Quantum_Oli (11 votes)

—————————-

[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 ...

- asked by lio (10 votes), answered by Szabolcs (9 votes)

—————————-

[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:

...

- asked by Piquan (10 votes), answered by Mr.Wizard (9 votes)

—————————-

[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,  ...

- asked by yode (10 votes), answered by Mr.Wizard (5 votes)

—————————-

[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` 
 ... 

- asked by Ice0cean (10 votes), answered by Szabolcs (11 votes)

================================== 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] 
 ...

- asked by Prashant Bhate (25 votes), answered by Simon (32 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? ==================================

[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 ...

- asked by Luca Pontiggia (3 votes)

—————————-

[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 \(\Phi \) with density \(\lambda \). The serving transmitter is the one that is ...

- asked by George Harnandez (3 votes)

—————————-

[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 ...

- asked by user5601 (3 votes)

4.42 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].

But what about these ...

- asked by Mher (29 votes), answered by Szabolcs (23 votes)

—————————-

[Can we intelligently control evaluation in Thread?] http://mathematica.stackexchange.com/questions/138661/can-we-intelligently-control-evaluation-in-thread

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

- asked by Mr.Wizard (27 votes), answered by Mr.Wizard (21 votes)

—————————-

[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 ...

- asked by dimitris (23 votes), answered by masterxilo (5 votes)

—————————-

[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 ...

- asked by Jawad_Mansoor (14 votes), answered by Mr.Wizard (18 votes)

—————————-

[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 \(B\), knowing all the other physical properties. To this end, I would like to reproduce the numerical ...

- asked by yketa (12 votes), answered by xzczd (8 votes)

—————————-

[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"]

...

- asked by Lem.ma (11 votes)

—————————-

[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 ...

- asked by halirutan (10 votes)

================================== 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 ...

- asked by wxffles (61 votes), answered by Per Alexandersson (37 votes)

—————————-

[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?

- asked by stevenvh (33 votes), answered by Artes (24 votes)

================================== 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 ...

- asked by Yaroslav Bulatov (2 votes)

—————————-

[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)

4.43 Tuesday, February 21, 2017

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

[How can I adaptively simplify a curved shape?] http://mathematica.stackexchange.com/questions/137937/how-can-i-adaptively-simplify-a-curved-shape

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

- asked by Alexey Popkov (22 votes), answered by Szabolcs (29 votes)

—————————-

[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 ...

- asked by R Hall (12 votes), answered by Simon Woods (10 votes)

—————————-

[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.

I have a function that generates information about a random initial road configuration. A road ...

- asked by jlrawden (11 votes), answered by Ali Hashmi (5 votes)

—————————-

[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 ...

- asked by Andy Stow Away (9 votes)

—————————-

[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`"] 
GeneralUtilities`BenchmarkPlot[{SortBy[#, Identity] &amp;, Sort}, Range, 
 "IncludeFits" -&gt; True, TimeConstraint -&gt; 8]

I want to set ...

- asked by yode (9 votes), answered by Mr.Wizard (11 votes)

—————————-

[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}}}

...

- asked by Andrew Johnson (8 votes), answered by halirutan (11 votes)

—————————-

[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  ...

- asked by masterxilo (8 votes)

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

[How to add a vertical line to a plot] http://mathematica.stackexchange.com/questions/3561/how-to-add-a-vertical-line-to-a-plot

In the plot below I would like to add two vertical lines at \(x = \frac {\pi }{15} \pm \frac {1}{20}\). 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;  ...

- asked by sjdh (33 votes), answered by Ajasja (49 votes)

—————————-

[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 \(m\times n\) and \(k\times m\) matrices,

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

- asked by nikie (42 votes), answered by helen (21 votes)

================================== 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 \(x\) and \(y\) be two independent Gaussian random variables with distribution \(N(0,1)\). ...

- asked by Dr. Wolfgang Hintze (3 votes)

—————————-

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

Context

Six months ago @M.R. asked about an implementation of the 
t-Distributed Stochastic Neighbor Embedding (t-SNE) algorithm by van der 
Maaten and Hinton (2008). (@M.R.'s question) 
 
@Alexey  ...

- asked by SumNeuron (3 votes)

—————————-

[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, ...

- asked by Joe Kissling (2 votes)

4.44 Tuesday, February 14, 2017

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

[How to generate a mesh with quadrilateral elements?] http://mathematica.stackexchange.com/questions/137479/how-to-generate-a-mesh-with-quadrilateral-elements

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

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

- asked by Diogo (13 votes), answered by Young (12 votes)

—————————-

[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 ...

- asked by Felix (11 votes), answered by Szabolcs (12 votes)

—————————-

[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

\(\qquad (x^4 + x^3 + x^2 + x + 1)^n\)

for arbitrary \(n\).

It took some hours to compute the result for \(n=12207\). There are \(16333\) odd ...

- asked by Jenny_mathy (10 votes), answered by Carl Woll (15 votes)

—————————-

[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, ...

- asked by mathe (10 votes), answered by Jason B. (8 votes)

—————————-

[List processing] http://mathematica.stackexchange.com/questions/137306/list-processing

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}, 
   ...

- asked by Tom De Vries (9 votes), answered by Kuba (19 votes)

—————————-

[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 ...

- asked by kjo (8 votes), answered by Bob Hanlon (5 votes)

—————————-

[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?

- asked by Szabolcs (7 votes), answered by rcollyer (9 votes)

================================== 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 ...

- asked by Tianxiang Xiong (47 votes), answered by Artes (38 votes)

—————————-

[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 ...

- asked by Chong Wang (16 votes), answered by bbgodfrey (19 votes)

================================== 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 \(10^i\) 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 ...

- asked by David Ollodart (2 votes)

4.45 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

- asked by zeros (31 votes), answered by Anton Antonov (48 votes)

—————————-

[How to make Mathematica variables declarative instead of just-in-time?] http://mathematica.stackexchange.com/questions/136833/how-to-make-mathematica-variables-declarative-instead-of-just-in-time

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

- asked by Edmund (27 votes), answered by rcollyer (25 votes)

—————————-

[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  ...

- asked by Kvothe (16 votes), answered by Mr.Wizard (19 votes)

—————————-

[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 ...

- asked by flip (15 votes), answered by J. M. (10 votes)

—————————-

[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:

- asked by alancalvitti (11 votes), answered by Edmund (10 votes)

—————————-

[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 ...

- asked by KennyColnago (8 votes), answered by KennyColnago (10 votes)

—————————-

[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 ...

- asked by M.R. (8 votes)

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

[How to add a vertical line to a plot] http://mathematica.stackexchange.com/questions/3561/how-to-add-a-vertical-line-to-a-plot

In the plot below I would like to add two vertical lines at \(x = \frac {\pi }{15} \pm \frac {1}{20}\). 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;  ...

- asked by sjdh (32 votes), answered by Ajasja (48 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? ==================================

[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,  ...

- asked by Coolwater (6 votes)

—————————-

[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, \((x,y,z,\dot {x},\dot {y},\dot {z})\), which AKA phase space ...

- asked by 0x90 (5 votes)

—————————-

[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],  ...

- asked by vito (3 votes)

4.46 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 =  ...

- asked by Ted Ersek (17 votes), answered by Szabolcs (15 votes)

—————————-

[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 ...

- asked by Doug Kimzey (13 votes)

—————————-

[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

where adjacent alphabetic elements ...

- asked by Suite401 (12 votes), answered by Bob Hanlon (8 votes)

—————————-

[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]  ...

- asked by Martin Ender (11 votes)

—————————-

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

I am constructing a dataset like so:

data = Dataset[AssociationThread[Keys[characterCounts], charFrequencies]]

which gives me a dataset that looks like this:

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

- asked by damjandd (10 votes), answered by Kuba (10 votes)

—————————-

[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:  ...

- asked by Mohammed AlQuraishi (10 votes)

—————————-

[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 ...

- asked by user3777022 (10 votes), answered by Julien Kluge (8 votes)

================================== 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?

- asked by stevenvh (30 votes), answered by Artes (22 votes)

—————————-

[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 ...

- asked by Wjx (24 votes), answered by Wjx (19 votes)

================================== 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 \(x = 0^{-}\) from the left side, where \(x = 0\) is unfortunately the right end of the domain (in the reals) so the functions are not ...

- asked by Lee David Chung Lin (3 votes)

—————————-

[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 ...

- asked by Viacheslav Plotnikov (4 votes)

—————————-

[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 \(a_{i}\)

I ...

- asked by kernel_panic (1 vote)

4.47 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,  ...

- asked by Prisoners Dilema (35 votes), answered by bobthechemist (22 votes)

—————————-

[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

GeneralUtilities`ConstantIterator[5]

Key value iterator

...

- asked by yode (15 votes), answered by Michael E2 (15 votes)

—————————-

[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:

$HistoryLength = 0; 
ClearAll["Global`*"]; 
ClearSystemCache[]; 
MemoryInUse[] 
 
AbsoluteTiming[Do[SquaresR[2, i], {i, 1000000}];]

...

- asked by outofmemory (12 votes), answered by Mr.Wizard (18 votes)

—————————-

[SetOptions locally?] http://mathematica.stackexchange.com/questions/136005/setoptions-locally

Is there a way to SetOptions locally? For example, I have a Module and inside it I am doing a lot of Plots with similar options. If I do a SetOptions[Plot, ...] inside the Module, the change ...

- asked by becko (11 votes), answered by J. M. (12 votes)

—————————-

[Understanding simple numerical calculation] http://mathematica.stackexchange.com/questions/135636/understanding-simple-numerical-calculation

I am trying to understand why N[0.1]//FullForm returns 0.1’ (A). Indeed, \(0.1\) in base two is \(0.000110011001100110011...\). If I truncate this number to the first 52 digits and convert it back to base ...

- asked by anderstood (11 votes), answered by Michael E2 (18 votes)

—————————-

[How to work with Date calculations?] http://mathematica.stackexchange.com/questions/135713/how-to-work-with-date-calculations

I have never worked using the DateObject function

But I suspect there must be a (easy) way of doing it.

I want to find out, when in the future, from which point, that the cumulative days of not ...

- asked by Chen Stats Yu (10 votes), answered by Simon Woods (12 votes)

—————————-

[How to riffle matrices] http://mathematica.stackexchange.com/questions/135848/how-to-riffle-matrices

I have four matrices

m = {{M11, M12, M13}, {M21, M22, M23}, {M31, M32, M33}}; 
n = {{N11, N12, N13}, {N21, N22, N23}, {N31, N32, N33}}; 
p = {{P11, P12, P13}, {P21, P22, P23}, {P31, P32, P33}}; 
q =  ...

- asked by Kowalski (8 votes), answered by Carl Woll (11 votes)

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

[Is there an open source implementation of Mathematica-the-language?] http://mathematica.stackexchange.com/questions/4454/is-there-an-open-source-implementation-of-mathematica-the-language

I’ve seen questions before such as "What is the best open-source equivalent for Mathematica?", but that specific question (and that line of inquiry in general) cares more about the computer algebra ...

- asked by sblom (81 votes), answered by Simon (64 votes)

—————————-

[Is it possible to export the equations from Mathematica to MATLAB?] http://mathematica.stackexchange.com/questions/14035/is-it-possible-to-export-the-equations-from-mathematica-to-matlab

Is it possible to export the output expressions from Mathematica computations (e.g., equations) in valid MATLAB syntax?

- asked by Seyhmus Güngören (27 votes), answered by R. M. (35 votes)

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

[Gap in X-axis when using LogLinearPlot] http://mathematica.stackexchange.com/questions/136025/gap-in-x-axis-when-using-loglinearplot

Basically, this is the plot that comes out when I choose

Frame -&gt; True 
 
Due to my need of labeling the axes. Is there a way to get rid off of that annoying gap? 
 
Here is the figure 
 
Here is the  ...

- asked by Alan Turing (1 vote)

—————————-

[When solving a heavy PDE Mathematica falls out: what can be done] http://mathematica.stackexchange.com/questions/135819/when-solving-a-heavy-pde-mathematica-falls-out-what-can-be-done

I am solving a heavy PDE. The mesh is huge, and Mma falls out after few tens of minutes solving: the cell becomes inactive, kernel (pressumably) quits, all variables turn blue.

My question is, what ...

- asked by Alexei Boulbitch (3 votes)

—————————-

[Exporting Cellular Automata Image Sequence] http://mathematica.stackexchange.com/questions/136068/exporting-cellular-automata-image-sequence

I am trying to make an animation in Adobe After Effects utilizing cellular automata. I would like to export each step (say 500 steps) as a high resolution vector image so that I can combine them as an ...

- asked by Ryan Conover (1 vote)

4.48 Tuesday, January 17, 2017

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

[How to rotate the curve but not the axes?] http://mathematica.stackexchange.com/questions/135376/how-to-rotate-the-curve-but-not-the-axes

I have a such graphic:

data = {{0, 5}, {1.9, 7.5}, {0, 12}, {-5, 15.5}, {-1.2, 33.4}}; 
p=Plot[Interpolation[Reverse /@ data, x, InterpolationOrder -&gt; 2], {x, 
  0, 55}, Epilog -&gt; {Red,  ...

- asked by yode (11 votes), answered by kglr (11 votes)

—————————-

[Function to draw densely interconnected layers in graph (e.g., neural net)] http://mathematica.stackexchange.com/questions/135354/function-to-draw-densely-interconnected-layers-in-graph-e-g-neural-net

I can use Graph[] to manually draw the shape of a very simple set of interconnected layers (for instance, a small neural network):

Graph[{1 -&gt; 3, 2 -&gt; 3, 1 -&gt; 5, 2 -&gt; 5, 1 -&gt; 4, 2  ...

- asked by Larry OBrien (11 votes), answered by kglr (12 votes)

—————————-

[An Intersection function on lists that saves intersection positions] http://mathematica.stackexchange.com/questions/135583/an-intersection-function-on-lists-that-saves-intersection-positions

I would like an intersection function on lists like Intersection that also stores the coordinates of the intersections. For instance for a,b,c and b,c,e would give something like ...

- asked by Kvothe (9 votes), answered by ciao (9 votes)

—————————-

[Combining lists of lists with random structure] http://mathematica.stackexchange.com/questions/135238/combining-lists-of-lists-with-random-structure

I have two lists which I would like to combine. One is of a random structure, which might be:

l1={{3, 2, 4, 2}, {2, 3}, {4, 3}, {{2, 2}}, {{3, 3}}, {3, 2}}

where the elements in each sublist may ...

- asked by Jonathan Shock (9 votes), answered by Mr.Wizard (7 votes)

—————————-

[Slicing an Association with named key span without normalizing?] http://mathematica.stackexchange.com/questions/135092/slicing-an-association-with-named-key-span-without-normalizing

Is there way to slice an Association with named key span?

Span currently doesn’t accept named keys:

&lt;|"z" -&gt; 1, "x" -&gt; 2, "b" -&gt; 3, "a" -&gt; 4|&gt;  // Query["x" ;; "a"]

- asked by alancalvitti (9 votes), answered by Mr.Wizard (11 votes)

—————————-

[Finding Ramanujan’s taxicab numbers] http://mathematica.stackexchange.com/questions/135128/finding-ramanujans-taxicab-numbers

How to find Hardy-Ramanujan Numbers by using Mathematica?

Definition: Taxicab number is defined as the smallest number that can be expressed as a sum of two positive cubes in \(n\) distinct ways. ...

- asked by vito (9 votes), answered by vito (6 votes)

—————————-

[Area of surface of revolution] http://mathematica.stackexchange.com/questions/135358/area-of-surface-of-revolution

I am asked to rotate the curve \(y=\sqrt {4-x^2}\) from \(x=-1\) to \(x=1\) about the x-axis and find the area of the surface. I was able to use RevolutionPlot3D to show the surface.

RevolutionPlot3D[Sqrt[4 ...

- asked by David (7 votes), answered by corey979 (10 votes)

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

[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?

- asked by hhh (23 votes), answered by Rahul (32 votes)

—————————-

[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 ...

- asked by Amatya (532 votes), answered by Simon Woods (385 votes)

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

[Amelioration of a Karush-Kuhn-Tucker nice code] http://mathematica.stackexchange.com/questions/135220/amelioration-of-a-karush-kuhn-tucker-nice-code

In what concerns the resolution of a Karush-Kuhn-Tucker condition, this wonderful code borrowed to Parreiras (The Mathematica Journal 16 2014) which is a correction of another code by Kampas (The ...

- asked by cyrille.piatecki (4 votes)

—————————-

[URLDownload aborts prematurely] http://mathematica.stackexchange.com/questions/135355/urldownload-aborts-prematurely

So I’ve been trying to automate the download and build of various large packages for hooking Mathematica into extensions but the downloads continually finish prematurely.

Edit: first example was just ...

- asked by MB1965 (2 votes)

—————————-

[Simplify an integer expression involving Ceiling and Root[] of third degree polynomial] http://mathematica.stackexchange.com/questions/135566/simplify-an-integer-expression-involving-ceiling-and-root-of-third-degree-poly

I would like to simplify the following expression

    Ceiling[ToRadicals[Root[90 - 6 num + 65 #1 + 12 #1^2 + #1^3 &amp;, 1]]]

with num an integer greater than or equal to 16. I tried using ...

- asked by Piruzzolo (1 vote)

4.49 Tuesday, January 10, 2017

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

[Is there any possibility to implement a structure like a ProgressIndicator into NDSolve?] http://mathematica.stackexchange.com/questions/134787/is-there-any-possibility-to-implement-a-structure-like-a-progressindicator-into

It is already formulated in the title. NDSolve takes sometimes a considerable piece of time. It would be very practical to have some information on how long it is still to wait. So, any ideas?

To ...

- asked by Alexei Boulbitch (20 votes), answered by user21 (16 votes)

—————————-

[This integral is divergent. How to use NIntegrate to see how it grows?] http://mathematica.stackexchange.com/questions/135073/this-integral-is-divergent-how-to-use-nintegrate-to-see-how-it-grows

I am trying to get information on the following integral: \[ \int _{\pi -0.3}^{\pi -\epsilon } \frac {1}{(3+\cos {x})\sqrt {(3+\cos {x})^2-4}} \]

The lower limit is somewhat arbitrary; the point is that ...

- asked by Gelasio Salazar (10 votes), answered by Michael E2 (6 votes)

—————————-

[Call a Haskell DLL from Mathematica] http://mathematica.stackexchange.com/questions/134913/call-a-haskell-dll-from-mathematica

Looking for a way to call a Haskell DLL from Mathematica, I’ve stumbled on this, for GNU R:

http://neilmitchell.blogspot.com.br/2011/10/calling-haskell-from-r.html

It is (to me) a beautiful example ...

- asked by Rand (10 votes), answered by WReach (11 votes)

—————————-

[Product of set elements not exceeding a bound] http://mathematica.stackexchange.com/questions/134743/product-of-set-elements-not-exceeding-a-bound

I have a set of distinct positive integers l (if you wish, you may assume it is a list ordered by size), and a bound lim. In general, l has thousands of elements, but all are at most equal to lim. I ...

- asked by rogerl (10 votes), answered by george2079 (4 votes)

—————————-

[How does Mathematica solve a certain differential equation?] http://mathematica.stackexchange.com/questions/135055/how-does-mathematica-solve-a-certain-differential-equation

I was trying to solve a nonlinear differential equation with the following code.

DSolve[3*x^2/D[u[x, y], x] + 3*y^2/D[u[x, y], y] == -1, u, {x, y}] 
 
 
And I got the following output: 
 
{{u -&gt;  ...

- asked by usr109876787 (8 votes), answered by Michael E2 (12 votes)

—————————-

[How to cross-compile LibraryLink code for multi-platform distribution] http://mathematica.stackexchange.com/questions/135022/how-to-cross-compile-librarylink-code-for-multi-platform-distribution

I am running Mathematica on a Windows 10 machine and I would like to develop a package for public distribution. Most of the package will be Mathematica code, but some timing-critical parts should be ...

- asked by Ben Niehoff (8 votes)

—————————-

[Plotting difference between two Half Normal Distributions] http://mathematica.stackexchange.com/questions/134824/plotting-difference-between-two-half-normal-distributions

I am new to Mathematica, and this question may reflect that.

I am trying to plot the probability density function of a random variable which equals the difference between two independent random ...

- asked by user120911 (8 votes), answered by Jim Baldwin (9 votes)

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

[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 ...

- asked by Wjx (24 votes), answered by Wjx (19 votes)

—————————-

[Find the 5566th digit after the decimal point of 7/101] http://mathematica.stackexchange.com/questions/125025/find-the-5566th-digit-after-the-decimal-point-of-7-101

I want to find the 5566th digit after the decimal point of 7/101. I input the following code into Mathematica 11:

Mod[IntegerPart[7/101*10^5566], 10]

The output is 6, which is the correct answer. ...

- asked by Wei-Cheng Liu (17 votes), answered by yarchik (19 votes)

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

[Inset thickness and ImageResolution] http://mathematica.stackexchange.com/questions/134738/inset-thickness-and-imageresolution

I have noticed that when I export something with an Inset objects,

pp[t_] := 
  Plot[Sin[x], {x, -10, 10}, 
    Epilog -&gt; 
      {Inset[ 
         Framed[ 
           Text[Style[HoldForm["t=" t],  ...

- asked by usumdelphini (4 votes)

—————————-

[Find the parameter values for my matrix for it to have imaginary eigenvalues] http://mathematica.stackexchange.com/questions/134909/find-the-parameter-values-for-my-matrix-for-it-to-have-imaginary-eigenvalues

Say I have a matrix that depends on a parameter \(u\). The following may be an example:

a = {{1, u^3 + 2, 1}, {0, 1, u}, {1/u^2, 0, 1}};

My real problem is 12x12 matrix with difficult parametric ...

- asked by Mirko Aveta (1 vote)

—————————-

[NotebookEvaluate breaks notebook’s context] http://mathematica.stackexchange.com/questions/135025/notebookevaluate-breaks-notebooks-context

Here is an example of a notebook with local context:

nb = CreateDocument[{ 
  ExpressionCell[Defer @ CurrentValue[EvaluationNotebook[], CellContext], "Input"], 
  ExpressionCell[Defer @ $Context,  ...

- asked by Kuba (2 votes)

4.50 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?

- asked by Szabolcs (27 votes), answered by Szabolcs (36 votes)

—————————-

[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 ...

- asked by Carl Woll (24 votes), answered by Carl Woll (21 votes)

—————————-

[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; /@  ...

- asked by Maria Regina (16 votes), answered by corey979 (15 votes)

—————————-

[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 ...

- asked by Sumit (8 votes)

—————————-

[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 ...

- asked by theorist (8 votes), answered by Simon Rochester (4 votes)

—————————-

[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 ...

- asked by Michael McCain (7 votes), answered by MB1965 (5 votes)

—————————-

[How to speed up this code about a triple integral?] http://mathematica.stackexchange.com/questions/134477/how-to-speed-up-this-code-about-a-triple-integral

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;  ...

- asked by Mika Ike (7 votes), answered by corey979 (10 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[], r Sin[], r^2}, {r, 0,  ...

- asked by Matthew Leingang (89 votes), answered by Heike (75 votes)

—————————-

[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?

- asked by hhh (21 votes), answered by Rahul (30 votes)

================================== 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 ...

- asked by Lili (4 votes)

—————————-

[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 \(f(x) = C, 1<x<2\) and \(= 0\) and \(= 0\). I can easily get \(\hat {f}\), the Fourier transform of ...

- asked by Rajesh Dachiraju (2 votes)

—————————-

[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)

Chapter 5
Year 2016

5.1 Tuesday, December 27, 2016
5.2 Tuesday, December 20, 2016
5.3 Tuesday, December 13, 2016
5.4 Tuesday, December 6, 2016
5.5 Tuesday, November 29, 2016
5.6 Tuesday, November 22, 2016
5.7 Tuesday, November 15, 2016
5.8 Tuesday, November 8, 2016
5.9 Tuesday, November 1, 2016
5.10 Tuesday, October 25, 2016
5.11 Tuesday, October 18, 2016
5.12 Tuesday, October 11, 2016
5.13 Tuesday, October 4, 2016
5.14 Tuesday, September 27, 2016
5.15 Tuesday, September 20, 2016
5.16 Tuesday, September 13, 2016
5.17 Tuesday, September 6, 2016
5.18 Tuesday, August 30, 2016
5.19 Tuesday, August 23, 2016
5.20 Tuesday, August 16, 2016
5.21 Tuesday, August 9, 2016
5.22 Tuesday, August 2, 2016
5.23 Tuesday, July 26, 2016
5.24 Tuesday, July 19, 2016
5.25 Tuesday, July 12, 2016
5.26 Tuesday, July 5, 2016
5.27 Tuesday, June 28, 2016
5.28 Tuesday, June 21, 2016
5.29 Tuesday, June 14, 2016
5.30 Tuesday, June 7, 2016
5.31 Tuesday, May 31, 2016
5.32 Tuesday, May 24, 2016
5.33 Tuesday, May 17, 2016
5.34 Tuesday, May 10, 2016
5.35 Tuesday, May 3, 2016
5.36 Tuesday, April 26, 2016
5.37 Tuesday, April 19, 2016
5.38 Tuesday, April 12, 2016
5.39 Tuesday, April 5, 2016
5.40 Tuesday, March 29, 2016
5.41 Tuesday, March 22, 2016
5.42 Tuesday, March 15, 2016
5.43 Tuesday, March 8, 2016
5.44 Tuesday, March 1, 2016
5.45 Tuesday, February 23, 2016
5.46 Tuesday, February 16, 2016
5.47 Tuesday, February 9, 2016
5.48 Tuesday, February 2, 2016
5.49 Tuesday, January 26, 2016
5.50 Tuesday, January 19, 2016
5.51 Tuesday, January 12, 2016
5.52 Tuesday, January 5, 2016

5.1 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

\[1+2+3+4+5+6+7+8+9=45\] \[5+6+7+8+9+10=45\] \[7+8+9+10+11=45\] \[14+15+16=45\] \[22+23=45\]

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

- asked by corey979 (17 votes), answered by corey979 (19 votes)

—————————-

[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],  ...

- asked by Jason (13 votes), answered by Sumit (10 votes)

—————————-

[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 replacementsno insertions or deletions. Is it ...

- asked by David Zhang (12 votes)

—————————-

[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 ...

- asked by m. bubu (10 votes), answered by ubpdqn (11 votes)

—————————-

[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}}, 
  ...

- asked by yode (9 votes), answered by Mr.Wizard (9 votes)

—————————-

[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 ...

- asked by MB1965 (8 votes), answered by Bob Hanlon (8 votes)

—————————-

[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 ...

- asked by Liang.X (8 votes), answered by Sumit (8 votes)

================================== 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

\[\lim _{(x,y)\to (0,0)} f(x,y)\] with Mathematica?

When \(f\) is continuous, we can use \[\lim _{(x,y)\to (0,0)} \] ...

- asked by Dominic Michaelis (21 votes), answered by whuber (32 votes)

—————————-

[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 \(m\times n\) and \(k\times m\) 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)

================================== 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 \(f(x,y)=0\).

For instance :

\(\qquad \left (x^2+y^2-1\right )^3-x^2 y^3=0\)

...

- asked by vito (5 votes)

5.2 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)

5.3 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 \(m\times n\) and \(k\times m\) 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)

5.4 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)

—————————-

[Find lane lines] http://mathematica.stackexchange.com/questions/132443/find-lane-lines

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

\(G = M = m = 1\) \(M\) is a point mass at \(z=0\) ...

- 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)

5.5 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 \(m\times n\) and \(k\times m\) 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)

5.6 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:

https://www.youtube.com/watch?v=lvvcRdwNhGM

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)

5.7 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)

5.8 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

Howeverif 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: \(e_1,~ e_2,~e_3\) 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)

5.9 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 TimeSeriesfor 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}  ...

- asked by corey979 (7 votes), answered by Sumit (4 votes)

—————————-

[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 ...

- asked by user123 (7 votes), answered by Feyre (7 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 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 (8 votes), answered by SquareOne (6 votes)

================================== 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 ...

- asked by Edmund (2 votes)

—————————-

[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 ...

- asked by David (3 votes)

—————————-

[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 ...

- asked by vito (3 votes)

5.10 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 ...

- asked by user64494 (11 votes), answered by Simon Woods (16 votes)

—————————-

[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. ...

- asked by s.s.o (10 votes), answered by Alexey Golyshev (8 votes)

—————————-

[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 ...

- asked by andandandand (10 votes), answered by C. E. (5 votes)

—————————-

[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 ...

- asked by Sjoerd C. de Vries (8 votes), answered by Sjoerd C. de Vries (6 votes)

—————————-

[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 ...

- asked by TSwift (8 votes)

—————————-

[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 ...

- asked by nilo de roock (8 votes), answered by rcollyer (7 votes)

—————————-

[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 ...

- asked by Soldalma (7 votes), answered by JHM (6 votes)

================================== 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 \(5 \times 5\) the rule is elementary : if ...

- asked by cyrille.piatecki (12 votes), answered by Mr.Wizard (19 votes)

—————————-

[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___] :=  ...

- asked by István Zachar (83 votes), answered by Sjoerd C. de Vries (46 votes)

================================== 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?

- asked by Alexander Zeng (2 votes)

—————————-

[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}};

...

- asked by yode (3 votes)

5.11 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 ...

- asked by Fernando Saldanha (17 votes), answered by dan7geo (16 votes)

—————————-

[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.

 $\color{red}{\text{You must not repeat a  ...

- asked by mrz (15 votes), answered by Dr. Wolfgang Hintze (9 votes)

—————————-

[how to get cell boundaries in the image] http://mathematica.stackexchange.com/questions/128596/how-to-get-cell-boundaries-in-the-image

I have a microscope image of some animal tissue and wish to get the contours for all the cells that are present in the image. the cells are connected to the neighbouring cells via these contours. At ...

- asked by Ali Hashmi (10 votes), answered by corey979 (13 votes)

—————————-

[Numerically solve the initial value problem for the 1-D wave equation] http://mathematica.stackexchange.com/questions/128516/numerically-solve-the-initial-value-problem-for-the-1-d-wave-equation

I want to solve the standard 1-dimensional wave equation \(y_{xx}=y_{tt}\) using NDSolve (for \(y(x,t)\)) with the following conditions:

cond1 = Piecewise[{{1 - Abs[x - 1], Abs[x - 1] &lt; 1}, {0, Abs[x  ...

- asked by arcbloom (8 votes), answered by xzczd (7 votes)

—————————-

[Dataset Processing: efficient ways to clean and merge sets for Life Sciences] http://mathematica.stackexchange.com/questions/128519/dataset-processing-efficient-ways-to-clean-and-merge-sets-for-life-sciences

Dataset Processing (for Life Sciences)

Note: a related, but distinct task is posted here ID Swapping: Efficient use of a reference table to convert ID values.

A common task, at least for me, ...

- asked by SumNeuron (8 votes), answered by SumNeuron (5 votes)

—————————-

[Rotations of a number] http://mathematica.stackexchange.com/questions/128666/rotations-of-a-number

If we start with a number like 1234 and produce the following sum 1234 + 123 + 12 + 1 = 1370.

If we are given the 1370 can I retrieve the 1234? A similar question was migrated over to the Math.SE ...

- asked by bobbym (8 votes), answered by J. M. (6 votes)

—————————-

[What’s wrong with the Sum function?] http://mathematica.stackexchange.com/questions/128534/whats-wrong-with-the-sum-function

Here are the codes:

f[n_]:=Sum[1,{K,0,n},{M,0,n-K},{La,0,K},{Lb,0,n-K-M},{Lc,0,M}]//Simplify 
 
g[n_]:=Sum[1,{La,0,n},{Lb,0,n-La},{Lc,0,n-La-Lb},{K,La,n-Lb},{M,Lc,n-K-Lb}]//Simplify 
 
f[x]/.x-&gt;5

...

- asked by lamberto (7 votes), answered by Bob Hanlon (3 votes)

================================== 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  ...

- asked by Eiyrioü von Kauyf (59 votes), answered by Jens (88 votes)

—————————-

[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)

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

[Parallelizing code, any tips?] http://mathematica.stackexchange.com/questions/128905/parallelizing-code-any-tips

I have access to a Linux cluster and I’m trying to use Parallelize to run the above bellow faster, but whenever I try to place Parallelize in any other parts, besides the loop, where I think it may ...

- asked by Sergio Parreiras (2 votes)

—————————-

[Does Reduce have problems with greek symbols that lead to wrong results?] http://mathematica.stackexchange.com/questions/128965/does-reduce-have-problems-with-greek-symbols-that-lead-to-wrong-results

I call Reduce on the following simple system of inequalities

e = ((-4 + Sqrt[(-2 + )^2] + 3 ) Log[p] + 4  Log[])/(2 ); 
Reduce[e &gt; 0 &amp;&amp; 1 &gt;  &gt; 0 &amp;&amp; 1 &gt; p &gt; 0  ...

- asked by klm (3 votes)

—————————-

[Full screen image in slideshow?] http://mathematica.stackexchange.com/questions/128875/full-screen-image-in-slideshow

Is it possible to make an image fill up and entire slide in a slideshow notebook so that there are no cell brackets or any white space around it at all (when viewed in presentation mode of course)?

- asked by M.R. (1 vote)

5.12 Tuesday, October 11, 2016

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

[How to programmatically play an Audio object?] http://mathematica.stackexchange.com/questions/128147/how-to-programmatically-play-an-audio-object

A Sound object can be programmatically played using EmitSound. Example:

snd = ExampleData[{"Sound", "AltoFlute"}]; 
 
Button["Play!", EmitSound[snd]]

What about an Audio object?

- asked by Szabolcs (14 votes), answered by Szabolcs (9 votes)

—————————-

[TreePlot does not give a "binary-looking" tree for a binary tree] http://mathematica.stackexchange.com/questions/128323/treeplot-does-not-give-a-binary-looking-tree-for-a-binary-tree

I use the following code to generate a binary tree with root 1.

TreePlot[{1 -&gt; 2, 1 -&gt; 3, 2 -&gt; 4, 2 -&gt; 5, 3 -&gt; 6, 3 -&gt; 7, 4 -&gt; 8, 
  4 -&gt; 9, 5 -&gt; 10, 5 -&gt; 11, 6 -&gt;  ...

- asked by Tony (13 votes), answered by WReach (19 votes)

—————————-

[Partition array without unpacking] http://mathematica.stackexchange.com/questions/128133/partition-array-without-unpacking

What is the simplest way to partition a list into equal-length sublists, allow the last sublist to be shorter of necessary, and avoid unpacking?

Partition doesn’t usually unpack:

arr = RandomReal[1,  ...

- asked by Szabolcs (13 votes), answered by Szabolcs (7 votes)

—————————-

[Creating a simple Dock Cell that Fades In when Cursor Hover Over It] http://mathematica.stackexchange.com/questions/128025/creating-a-simple-dock-cell-that-fades-in-when-cursor-hover-over-it

I like to create dock cells, that enhance the look of my notebooks. Do you know of a simple way to get the functionality in iBooks shown below in the video. I want the dock cell in Mathematica to ...

- asked by Michael McCain (13 votes), answered by Karsten 7. (14 votes)

—————————-

[Why are Exp[3] and 2 treated differently within Complex?] http://mathematica.stackexchange.com/questions/128211/why-are-exp3-and-2-treated-differently-within-complex

Why doesn’t the last command below split the complex number into its real and imaginary parts?

Complex[2,2] 
(* 2 + 2 I *) 
Complex[N[Exp[3]], N[Exp[3]]] 
(* 20.0855 + 20.0855 I *) 
 ...

- asked by Fernando Saldanha (12 votes), answered by Szabolcs (18 votes)

—————————-

[KeyDrop does not respect Key in V11] http://mathematica.stackexchange.com/questions/128171/keydrop-does-not-respect-key-in-v11

KeyDrop[&lt;|a -&gt; 1|&gt;, Key[a]] 
 
&lt;|a -&gt; 1|&gt; 
 
KeyTake[&lt;|a -&gt; 1|&gt;, Key[a]] 
 
&lt;||&gt; 

closely related but not the same: Unexpected behavior of KeyTake

Are there any ...

- asked by Kuba (11 votes), answered by Xavier (5 votes)

—————————-

[Strategies for creating 3D text] http://mathematica.stackexchange.com/questions/128412/strategies-for-creating-3d-text

I am interested in using Mathematica to create 3D text for printing. I stumbled upon this answer which works very well in a slightly modified form:

text3D[text_String, mult_] := ListPlot3D[ 
   ...

- asked by bobthechemist (10 votes), answered by J. M. (14 votes)

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

[Is it possible to export the equations from Mathematica to MATLAB?] http://mathematica.stackexchange.com/questions/14035/is-it-possible-to-export-the-equations-from-mathematica-to-matlab

Is it possible to export the output expressions from Mathematica computations (e.g., equations) in valid MATLAB syntax?

- asked by Seyhmus Güngören (24 votes), answered by R. M. (32 votes)

—————————-

[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 ...

- asked by Tianxiang Xiong (47 votes), answered by Artes (37 votes)

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

[Help: Reclassify] http://mathematica.stackexchange.com/questions/128194/help-reclassify

Is it possible to improve the current ClassifierFunction with more training data without running the previous training again?

In this way i will be able to deal with very large datasets in chunks.

- asked by user13892 (5 votes)

—————————-

[Pattern matching problem in version 11.01] http://mathematica.stackexchange.com/questions/128247/pattern-matching-problem-in-version-11-01

Consider this simple example:

p1 = ListPlot3D[ 
   Table[Sin[j^2 + i], {i, 0, Pi, Pi/5}, {j, 0, Pi, Pi/5}], 
   Mesh -&gt; None, Axes -&gt; False, Boxed -&gt; False, ColorFunction -&gt; Hue]; 
p2 =  ...

- asked by xslittlegrass (8 votes)

—————————-

[CUDADot runs slowly and writes "CUDALink experienced a kernel launch failure" with matrix size > 3300] http://mathematica.stackexchange.com/questions/128124/cudadot-runs-slowly-and-writes-cudalink-experienced-a-kernel-launch-failure-wi

I am trying to learn CUDA and start from the help examples. 
It turnes out that CPU calculation is much faster for 
matrix sizes &lt; 3200 than CUDA, while CUDADot gives the error for sizes > 3300. I  ...

- asked by luu (4 votes)

5.13 Tuesday, October 4, 2016

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

[UI performance with large image data] http://mathematica.stackexchange.com/questions/127523/ui-performance-with-large-image-data

Some days ago, I built a small program for some of my colleagues to analyse cell images. One minor part of the user interface was the selection of the region of interest. The images are large and need ...

- asked by halirutan (25 votes), answered by Kuba (21 votes)

—————————-

[Transform sphere to an ellipse in \(R^2\)] http://mathematica.stackexchange.com/questions/127645/transform-sphere-to-an-ellipse-in-r2

In Lay’s Linear Algebra and Its Applications textbook, he defines the matrix \[A=\begin {bmatrix} 4 &amp; 11 &amp; 14\\8 &amp; 7 &amp; -2 \end {bmatrix}\] and claims that the transformation \(T(x)=A x\) ...

- asked by David (15 votes), answered by yarchik (17 votes)

—————————-

[Did Fibonacci slow down?] http://mathematica.stackexchange.com/questions/127876/did-fibonacci-slow-down

For Fibonacci numbers we have a nice formula:

\[ \frac {\left (1+\sqrt {5}\right )^n-\left (1-\sqrt {5}\right )^n}{2^{n} \sqrt {5}} \]

We can implement that in Mathematica:

a[n_]:=  ...

- asked by Fred Simons (13 votes), answered by Szabolcs (20 votes)

—————————-

[I would like to create a fractal by copying, scaling and rotating the initial element] http://mathematica.stackexchange.com/questions/127458/i-would-like-to-create-a-fractal-by-copying-scaling-and-rotating-the-initial-el

I want to create a fractal, which looks like this:

This is rule 150R, which can be found in NKS, page 439.

However, instead of using a cellular automaton, I want to create this fractal from a ...

- asked by Yuriy S (13 votes), answered by wxffles (13 votes)

—————————-

[Mathematica + Pythonika on the Raspberry pi] http://mathematica.stackexchange.com/questions/127802/mathematica-pythonika-on-the-raspberry-pi

Due to the high availability of python code for the rpi, I’m trying to call python functions from Mathematica. I know that pythonika works well on OS X, but I can’t compile it on the Raspberry pi.

...

- asked by elbOlita (12 votes), answered by elbOlita (13 votes)

—————————-

[How to map and sum a list fast?] http://mathematica.stackexchange.com/questions/127658/how-to-map-and-sum-a-list-fast

The following takes a lot of memory and is slow:

Timing[Total[Map[#^2 &amp;, Range[1, 100000000]]]]

I suspect this is because it first calculates and stores the whole list of squared numbers and ...

- asked by Yrogirg (12 votes), answered by BlacKow (19 votes)

—————————-

[Implementing the BihamMiddletonLevine traffic model as CellularAutomaton] http://mathematica.stackexchange.com/questions/127821/implementing-the-biham-middleton-levine-traffic-model-as-cellularautomaton

In an attempt to understand how to make rules for CellularAutomaton[], I set out to try to implement the BihamMiddletonLevine traffic model.

It is a 2D, k=3 model with a 3x3 neighborhood, so the ...

- asked by HJensen (10 votes), answered by C. E. (5 votes)

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

[What are the most common pitfalls awaiting new users?] http://mathematica.stackexchange.com/questions/18393/what-are-the-most-common-pitfalls-awaiting-new-users

As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...

- asked by Dr. belisarius (341 votes), answered by Michael E2 (197 votes)

—————————-

[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 = ...

- asked by vito (47 votes), answered by C. E. (50 votes)

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

[VectorPlot3D broken in Mathematica 11.0.1?] http://mathematica.stackexchange.com/questions/127724/vectorplot3d-broken-in-mathematica-11-0-1

Here is what I get when simply evaluating the example in the documentation:

This is on Win7 x64. I can see some vectors if I do something like

VectorPlot3D[{1, 1, 1}, {x, -1, 1}, {y, -1, 1}, {z,  ...

- asked by Pirx (5 votes)

—————————-

[Least squares approximation] http://mathematica.stackexchange.com/questions/127806/least-squares-approximation

I have data points which is mydata = 0, 0, 1, 1, 2, 0;

From this data, I need to do the least squares approximation by using Bernstein polynomials to produce a set of Bezier points. Before ...

- asked by NKamaru (2 votes)

—————————-

[Matching key-value pair without converting to List in KeyValueMap] http://mathematica.stackexchange.com/questions/127860/matching-key-value-pair-without-converting-to-list-in-keyvaluemap

I frequently use this method with KeyValueMap in order to match and refer to named parts (ie, "myKey", "myValue")

EDIT: to refer to named parts in the function f without an external function ...

- asked by alancalvitti (1 vote)

5.14 Tuesday, September 27, 2016

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

[Should I always be using Module in functions unless I explicitly want global variables?] http://mathematica.stackexchange.com/questions/126877/should-i-always-be-using-module-in-functions-unless-i-explicitly-want-global-var

I define functions a ton. In the past, I’ve mostly just defined my functions like:

myFunc[var1_]:=( 
  var2=var1^2; 
  Return@var2; 
)

And I haven’t run into too much trouble. If I wanted to be really ...

- asked by YungHummmma (15 votes), answered by WReach (18 votes)

—————————-

[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 ...

- asked by Chong Wang (12 votes), answered by bbgodfrey (12 votes)

—————————-

[Would it be a good idea to use Failure and FailureQ in own code] http://mathematica.stackexchange.com/questions/126908/would-it-be-a-good-idea-to-use-failure-and-failureq-in-own-code

Since version 10 (at least 10.0.2 but I think 10.0.0) there is Failure and since version 10.2 there is also FailureQ. As often the documentation is somewhat vague and says "Failure is generated by ...

- asked by Albert Retey (12 votes), answered by Leonid Shifrin (9 votes)

—————————-

[Display grayscale image as 3d plot] http://mathematica.stackexchange.com/questions/127210/display-grayscale-image-as-3d-plot

How to build 3d plot of grayscale image where x,y - pixel coordinates, z - pixel intensity?

I tried ListPlot3D[ImageData[image]], but ImageData gives just intensities. I suppose a possible solution ...

- asked by red1ynx (10 votes), answered by Kuba (11 votes)

—————————-

[Automatically draw ellipsoids around groups of select points] http://mathematica.stackexchange.com/questions/126899/automatically-draw-ellipsoids-around-groups-of-select-points

Suppose you have a ListPlot, and there are certain points you wish to emphasize belong to particular group. I would like to make a function that automatically draws an ellipsoid around a select group ...

- asked by SumNeuron (10 votes), answered by Szabolcs (11 votes)

—————————-

[Enter colors directly into notebook?] http://mathematica.stackexchange.com/questions/127245/enter-colors-directly-into-notebook

In Mathematica notebook interface, you can evaluate:

In[1]:= Black

and you get a colored squared representing the color. Then I can copy and paste this color square and use it as input, like so:

...

- asked by becko (9 votes), answered by WReach (10 votes)

—————————-

[Large Dataset query fails if column contains Missing] http://mathematica.stackexchange.com/questions/126851/large-dataset-query-fails-if-column-contains-missing

In version 11.0 (Win 8.1 Pro) a query on a large Dataset for a column that contains Missing fails most unceremoniously.

With

dsTest = AssociationThread[{"a", "b"}, 
     If[Last@# == 10000,  ...

- asked by Edmund (9 votes), answered by JasonB (7 votes)

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

[Is there an open source implementation of Mathematica-the-language?] http://mathematica.stackexchange.com/questions/4454/is-there-an-open-source-implementation-of-mathematica-the-language

I’ve seen questions before such as "What is the best open-source equivalent for Mathematica?", but that specific question (and that line of inquiry in general) cares more about the computer algebra ...

- asked by sblom (81 votes), answered by Simon (63 votes)

—————————-

[What are the most common pitfalls awaiting new users?] http://mathematica.stackexchange.com/questions/18393/what-are-the-most-common-pitfalls-awaiting-new-users

As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...

- asked by Dr. belisarius (341 votes), answered by Michael E2 (195 votes)

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

[Enable file completion by default?] http://mathematica.stackexchange.com/questions/127203/enable-file-completion-by-default

File completions work for Import and Get but not with &lt;&lt; syntax as you can see:

Is there some way to enable this?

- asked by M.R. (2 votes)

—————————-

[Trouble with NIntegrate strategy "DoubleExponentialOscillatory" when trying to ListPlot the results] http://mathematica.stackexchange.com/questions/126832/trouble-with-nintegrate-strategy-doubleexponentialoscillatory-when-trying-to-l

Can someone point me in the right direction? I ’ve been puzzling with this for weeks...

I have a huge function (of the form f(y,)sin(x) ) to integrate in in region (0, Infinity) and I use ...

- asked by George13 (1 vote)

—————————-

[Using an umlaut for a keyboard shortcut] http://mathematica.stackexchange.com/questions/126909/using-an-umlaut-for-a-keyboard-shortcut

How can I define a keyboard shortcut based on an umlaut like ü?

KeyEvent in KeyEventTranslations.tr doesn’t seem to register umlaut based keyboard inputs. For example, after adding

...

- asked by Karsten 7. (3 votes)

5.15 Tuesday, September 20, 2016

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

[The paradigm behind Dynamic and related functionality] http://mathematica.stackexchange.com/questions/126471/the-paradigm-behind-dynamic-and-related-functionality

Dynamic and the related functionality strikes me as a very unique way to build quick and dirty personal GUIs which are great for experimentation.

I suspect that this is only because of my lack of ...

- asked by Szabolcs (24 votes), answered by Leonid Shifrin (21 votes)

—————————-

[Bug with iterated With: Referring to function arguments invalidates previous definitions] http://mathematica.stackexchange.com/questions/126425/bug-with-iterated-with-referring-to-function-arguments-invalidates-previous-def

G[x_] := With[{a = 0}, With[{b = x}, a]] 
G @ 0 
F[x_] := With[{a = 0}, {b = x}, a] 
F @ 0 
 
gives 
 
  0 
  a

I would expect both to behave exactly the same.

It seems that referring to the parameter ...

- asked by masterxilo (20 votes), answered by Kuba (20 votes)

—————————-

[How to quickly find all grid cells covered by a geometric region?] http://mathematica.stackexchange.com/questions/126346/how-to-quickly-find-all-grid-cells-covered-by-a-geometric-region

I’m trying to compute a complete set of unit grid cells ("pixels") which a geometric region covers at least partially. I have constructed a method that produces correct results:

With[{reg =  ...

- asked by kirma (14 votes), answered by george2079 (9 votes)

—————————-

[Cone Trees: map a graph onto geometric shape] http://mathematica.stackexchange.com/questions/126657/cone-trees-map-a-graph-onto-geometric-shape

Question

Is it possible to map a Graph onto a geometric object such as a Cone?

Motivation

Visualizing large trees can be tedious, especially when limited to the confines of the printed page. One ...

- asked by SumNeuron (13 votes), answered by Szabolcs (18 votes)

—————————-

[Evaluate expressions within Vim] http://mathematica.stackexchange.com/questions/126449/evaluate-expressions-within-vim

I want to be able to type a quick Mathematica expression, such as

550/3. (e.g. common math), 
Sum[i, {i, 0, n}]//TeXForm//ToString (e.g. writing LaTeX document), or 
{55, 1, 10, 40, 9}//Total (e.g.  ...

- asked by Andrew MacFie (11 votes), answered by Andrew MacFie (11 votes)

—————————-

[Non newtonian calculus] http://mathematica.stackexchange.com/questions/126730/non-newtonian-calculus

I would like to define a new operator say

\(\text {stard}[f[x]] = \lim _{h\rightarrow 0}\left (\frac {f[x+h]}{f[x]}\right )^{\frac {1}{h}}\)

I think it must be done with an upvalue but I do not know how to ...

- asked by cyrille.piatecki (10 votes), answered by Szabolcs (18 votes)

—————————-

[How could I perform Region or Polygon Clipping in mathematica?] http://mathematica.stackexchange.com/questions/126463/how-could-i-perform-region-or-polygon-clipping-in-mathematica

I need to clip several regions reg: like Rectangle, Polygon, Ellipse... My goal isn’t to plot the clipping but to have a representation of each new region.

I searched if there was any package or ...

- asked by A.M. (10 votes), answered by george2079 (4 votes)

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

[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. ...

- asked by ramesh (12 votes), answered by ubpdqn (6 votes)

—————————-

[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 ...

- asked by Mike Honeychurch (53 votes), answered by halirutan (66 votes)

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

[Smart Subscript] http://mathematica.stackexchange.com/questions/126736/smart-subscript

I have a question about subscript policy. For some reason I have some variables called Subscript[q, 1], Subscript[q, 2], Subscript[q, 3] and Subscript[q, 4]. I know that I could have called them in ...

- asked by MaPo (1 vote)

—————————-

[Difficult R installation] http://mathematica.stackexchange.com/questions/126501/difficult-r-installation

In RLink and R v3.0.1?, there is an update which say that the problem of the lack of compatibility between the expected version and the last version of R has been settled for version 10.0.1 of ...

- asked by cyrille.piatecki (2 votes)

—————————-

[Does Overflow[] poison session for N?] http://mathematica.stackexchange.com/questions/126337/does-overflow-poison-session-for-n

Summary: once Mathematica hits an overflow error, N[] appears to break for even simple calculations.

RealDigits[N[Sqrt[2]-1,10^8]];

I was impressed that Mathematica ran the code above (first 100 ...

- asked by barrycarter (9 votes)

5.16 Tuesday, September 13, 2016

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

[Drawing picture with straight line (Petros Vrellis’s Art)] http://mathematica.stackexchange.com/questions/126161/drawing-picture-with-straight-line-petros-vrelliss-art

I am trying to extend Writing a word with straight lines for any picture/image. I guess the basic idea is to find a set of points in the image region and then draw random lines through them. Let’s ...

- asked by Sumit (16 votes), answered by Rahul (6 votes)

—————————-

[How do I count the most used functions across a set of notebooks?] http://mathematica.stackexchange.com/questions/125960/how-do-i-count-the-most-used-functions-across-a-set-of-notebooks

WolframLanguageData allows us to view the most used functions across several code bases like Wolfram Alpha, the documentation, or Stack Exchange. I was curious about the results for my own collection ...

- asked by Michael Hale (15 votes), answered by Michael Hale (11 votes)

—————————-

[How to ReplaceAll except within specified heads] http://mathematica.stackexchange.com/questions/125918/how-to-replaceall-except-within-specified-heads

ReplaceAll[expr, rule] and ReplaceRepeated[expr, rule] search through all subexpressions of expr applying rule where they match.

Are there built-in Mathematica functions that do the same thing, ...

- asked by QuantumDot (15 votes), answered by JHM (15 votes)

—————————-

[Is this a bug in Replace?] http://mathematica.stackexchange.com/questions/125771/is-this-a-bug-in-replace

Consider the following minimal examples. This one works as expected, replacing trees starting from the inside with a numerical value.

ClearAll[tree]; 
x = tree["A", {tree["B", {1, 2}], 3}]; 
Replace[x,  ...

- asked by István Zachar (14 votes), answered by Leonid Shifrin (17 votes)

—————————-

[How do I test if a variable represents a sequence?] http://mathematica.stackexchange.com/questions/126193/how-do-i-test-if-a-variable-represents-a-sequence

I created a variable that represents a sequence:

mySeq = Sequence[1, 2, 3];

I wanted to use that variable as an argument for some functions. But I got in trouble. For example,

FreeQ[mySeq, 1]

...

- asked by Fernando Saldanha (12 votes), answered by Edmund (8 votes)

—————————-

[How to calculate the numerical integral more efficiently?] http://mathematica.stackexchange.com/questions/126001/how-to-calculate-the-numerical-integral-more-efficiently

Rencently, I ecountered the following numerical intergral:

\begin{cases} 
\mathbf I_1=\displaystyle \int_{t}\mathbf N' {\mathbf N'}^{\text T}{\rm d}t\\ 
\mathbf I_2=\displaystyle \int_{t}\mathbf N''

- asked by Shutao Tang (11 votes), answered by Anton Antonov (8 votes)

—————————-

[Optional argument that can be completely omitted?] http://mathematica.stackexchange.com/questions/125929/optional-argument-that-can-be-completely-omitted

I am writing a simple function return similar words.

Clear[similarWords] 
similarWords[string_]:=Nearest[WordList[],string]

I want to add another argument n which is optional. When it presents, it ...

- asked by matheorem (11 votes), answered by Szabolcs (12 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 (71 votes), answered by Anton Antonov (32 votes)

—————————-

[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 (73 votes)

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

[Finding covariation between datasets] http://mathematica.stackexchange.com/questions/125963/finding-covariation-between-datasets

For me this is a very fascinating problem, which I however lack the ability to deal with as well as the nomenclature to describe properly. (Please feel free to edit the title).

The conditions are the ...

- asked by MathLind (2 votes)

—————————-

[Wolfram math on windows using PBSPro cluster] http://mathematica.stackexchange.com/questions/125861/wolfram-math-on-windows-using-pbspro-cluster

A user wishes to use math application running on our PBSPpro cluster.

Our cluster is accessible to linux users, running qsub to submit their jobs.

We have math10.4 for our cluster users, with ...

- asked by Dvory (2 votes)

—————————-

[Unexpected view of a vectorial triad in a combination of a Plot3D with Graphics3D] http://mathematica.stackexchange.com/questions/126168/unexpected-view-of-a-vectorial-triad-in-a-combination-of-a-plot3d-with-graphics3

I am preparing an illustration for the lecture on differential geometry. In this demonstration I am illustrating the Monge parameterization of the surface:

R = {xx, yy, 55 + xx^2 - xx^3 - 2*yy^2}; (*  ...

- asked by Alexei Boulbitch (2 votes)

5.17 Tuesday, September 6, 2016

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

[The Game of Hex in Mathematica] http://mathematica.stackexchange.com/questions/125460/the-game-of-hex-in-mathematica

The Game of Hex is a game originally developed by Nash, and it’s rules are very simple. You start out with a hexagonal tiling of some size:

There are two players. The game is in turns, and every ...

- asked by TreFox (31 votes), answered by C. E. (26 votes)

—————————-

[Visualize fraction] http://mathematica.stackexchange.com/questions/125209/visualize-fraction

I would like to visualize a fraction like the square root of 2 with Mathematica. I found this visualization of Pi in the internet and wonder how this would be done with Mathematica. The image shows ...

- asked by Arjihad (22 votes), answered by Kuba (20 votes)

—————————-

[Monad-like structures in Mathematica] http://mathematica.stackexchange.com/questions/125537/monad-like-structures-in-mathematica

I have been trying to code monad-like structures in Mathematica. However, I am facing some issues and I was wondering if anyone can help. I will give some background in the hope it can be useful to ...

- asked by Diogo Gomes (16 votes), answered by m_goldberg (6 votes)

—————————-

[paclets updating awareness and tracking] http://mathematica.stackexchange.com/questions/125199/paclets-updating-awareness-and-tracking

It turns out that some silent updating may be done in our computers with paclets. See for example here. How are we aware that something has been changed ? Can we track updating/versions of paclets ?

...

- asked by andre (16 votes)

—————————-

[Is it important that the front-end has a built-in parser?] http://mathematica.stackexchange.com/questions/125180/is-it-important-that-the-front-end-has-a-built-in-parser

The Notebook interface has a parser that seems aware of all operator-precedences, allowing us to step through the expressions (rather: Box-) hierarchy with Ctrl+.

This is extremely convenient, saving ...

- asked by masterxilo (15 votes), answered by John Fultz (18 votes)

—————————-

[Package organization] http://mathematica.stackexchange.com/questions/125579/package-organization

When writing a Mathematica package Foo, with functions f1, f2 and f3, one can use the template:

BeginPackage["Foo`"]; 
 
f1::usage = "f1[] ...."; 
 
f2::usage = "f2[] ...."; 
 
Begin["`Private`"]; 
 
f1[]:=  ...

- asked by Pixor (14 votes), answered by Szabolcs (17 votes)

—————————-

[ClearAll::clloc - "Cannot clear local variable x" in Block[x, ...] - why?] http://mathematica.stackexchange.com/questions/125251/clearallclloc-cannot-clear-local-variable-x-in-blockx-why

Block[{x}, ClearAll@x] 
 
  ClearAll::clloc: Cannot clear local variable x.

The documentation just says

An error occurs because ClearAll cannot be used with a local variable in Block:

and

...

- asked by masterxilo (14 votes)

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

[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. ...

- asked by ramesh (11 votes), answered by ubpdqn (6 votes)

—————————-

[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 (41 votes), answered by cormullion (18 votes)

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

[Creating notebooks with specific options being editable but not saveable] http://mathematica.stackexchange.com/questions/125676/creating-notebooks-with-specific-options-being-editable-but-not-saveable

The goal

is to create a notebook whose options, when the notebook is opened, are fixed regardless of edits done to the notebook.

E.g. WindowSize -&gt; Automatic and WindowMargins -&gt; 30 should be  ...

- asked by Kuba (8 votes)

—————————-

[Possible bug with Dataset formatting for incompatible shapes and Missing] http://mathematica.stackexchange.com/questions/125689/possible-bug-with-dataset-formatting-for-incompatible-shapes-and-missing

Bug introduced in 11.0.0

The problem:

{&lt;|"a" -&gt; Range[5]|&gt;, &lt;|"a" -&gt; Missing["KeyAbsent", "a"]|&gt;} // Dataset

More detailed example shows that 5 is the magic number and ...

- asked by Kuba (10 votes)

—————————-

[TensorContract applied twice] http://mathematica.stackexchange.com/questions/125588/tensorcontract-applied-twice

I have a very simple question about TensorContract command: I’m declaring

$Assumptions = {T \[Element] Arrays[{4, 4, 4, 4}], a \[Element] Arrays[{4, 4}], b \[Element] Arrays[{4, 4}]};

so T is a ...

- asked by MaPo (3 votes)

5.18 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 ...

- asked by Sumit (29 votes), answered by andre (41 votes)

—————————-

[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 (26 votes), answered by Xavier (27 votes)

—————————-

[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 ...

- asked by Filipe (23 votes), answered by nikie (22 votes)

—————————-

[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, ...

- asked by SumNeuron (20 votes), answered by Sebastian (12 votes)

—————————-

[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 ...

- asked by C. E. (16 votes), answered by C. E. (7 votes)

—————————-

[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 ...

- asked by Wjx (15 votes), answered by Taliesin Beynon (19 votes)

—————————-

[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 ...

- asked by bharb (14 votes), answered by Wjx (11 votes)

================================== 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 ...

- asked by Tianxiang Xiong (44 votes), answered by Artes (37 votes)

—————————-

[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 = ...

- asked by vito (45 votes), answered by C. E. (48 votes)

================================== 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 ...

- asked by fabio.hipolito (5 votes)

—————————-

[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 ...

- asked by Geon (3 votes)

—————————-

[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, ...

- asked by xslittlegrass (5 votes)

5.19 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 ...

- asked by Romke Bontekoe (12 votes), answered by JasonB (8 votes)

—————————-

[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; NDSolve`FEM` 
 = 
  RegionDifference[Cuboid[{0, -5}, {1, 0}], 
   Cuboid[{0.45,  ...

- asked by tsuresuregusa (12 votes)

—————————-

[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  ...

- asked by Leandro Maciel de Carvalho (11 votes), answered by C. E. (15 votes)

—————————-

[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 ...

- asked by Nasser (11 votes)

—————————-

[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, ...

- asked by Picek (10 votes), answered by Alexey Popkov (4 votes)

—————————-

[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 ...

- asked by Wjx (10 votes), answered by Sascha (5 votes)

—————————-

[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 ...

- asked by mrz (10 votes), answered by Svyatoslav Korneev (12 votes)

================================== 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],  ...

- asked by vito (23 votes), answered by gpap (34 votes)

—————————-

[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. ...

- asked by ramesh (11 votes), answered by ubpdqn (6 votes)

================================== 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 ...

- asked by Quantum_Oli (6 votes)

—————————-

[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 ...

- asked by AlexR (2 votes)

—————————-

[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 ...

- asked by Pirx (6 votes)

5.20 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 ...

- asked by Leandro Maciel de Carvalho (17 votes), answered by kirma (11 votes)

—————————-

[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 ...

- asked by Wjx (17 votes), answered by Taliesin Beynon (13 votes)

—————————-

[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, ...

- asked by Orders (17 votes)

—————————-

[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:

...

- asked by Bruce Crawford (16 votes), answered by Szabolcs (15 votes)

—————————-

[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 ...

- asked by Tyler Durden (16 votes)

—————————-

[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  ...

- asked by happy fish (15 votes), answered by Mr.Wizard (11 votes)

—————————-

[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

...

- asked by bbgodfrey (12 votes), answered by ilian (6 votes)

================================== 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 \[u(t,x)=\frac {1}{2}+\sum _{n\geq 1} \frac {1}{n\pi } ((-1)^n-1)e^{-n^2t}\sin (nx)\] for \(t=0, 0.01, 0.1, 0.5, 1, 10\) on the same axes.

For \(t=0\), I input

Plot[{1/2 +  ...

- asked by Vladimir (2 votes), answered by chris (9 votes)

—————————-

[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 = ...

- asked by vito (45 votes), answered by C. E. (48 votes)

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

[Holidays output] http://mathematica.stackexchange.com/questions/123763/holidays-output

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

- asked by mrz (2 votes)

—————————-

[How to crawl some website needed username and password] http://mathematica.stackexchange.com/questions/123771/how-to-crawl-some-website-needed-username-and-password

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

URLRead["https://en.wikipedia.org/wiki/Wiki", "Body"]

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

- asked by yode (4 votes)

—————————-

[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 ...

- asked by Shiki (3 votes)

5.21 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  ...

- asked by Alan (14 votes), answered by WReach (21 votes)

—————————-

[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}} 
 
 ...

- asked by happy fish (13 votes), answered by Kuba (12 votes)

—————————-

[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 ...

- asked by Hugh (13 votes), answered by user21 (10 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 (12 votes), answered by Searke (13 votes)

—————————-

[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 ...

- asked by M.R. (11 votes), answered by C. E. (9 votes)

—————————-

[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 ...

- asked by Mr.Wizard (11 votes)

—————————-

[Shading under a curve with dots]http://mathematica.stackexchange.com/questions/123422/shading-under-a-curve-with-dots

I plotted the function \(y=x^2\) 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? ...

- asked by James (10 votes), answered by JasonB (14 votes)

================================== 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 ...

- asked by Ali Hashmi (94 votes), answered by Leonid Shifrin (75 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. (430 votes), answered by faysou (388 votes)

================================== 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 =  ...

- asked by Jordy Dickinson (3 votes)

—————————-

[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 ...

- asked by Nikhil Anand (2 votes)

5.22 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 ...

- asked by Mark S. (19 votes), answered by halirutan (2 votes)

—————————-

[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 ...

- asked by Mr.Wizard (16 votes), answered by Mr.Wizard (9 votes)

—————————-

[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 ...

- asked by march (16 votes)

—————————-

[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 ...

- asked by FEARxxx (13 votes), answered by J. M. (2 votes)

—————————-

[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 ...

- asked by Kuba (12 votes), answered by Kuba (13 votes)

—————————-

[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 ...

- asked by Wjx (11 votes), answered by Michael E2 (5 votes)

—————————-

[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 ...

- asked by M.R. (10 votes), answered by C. Woods (2 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 (70 votes), answered by Anton Antonov (32 votes)

—————————-

[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],  ...

- asked by vito (23 votes), answered by gpap (34 votes)

================================== 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" \(f\colon A\to B\) where \(A\) and \(B\) are finite subsets of the set of all possible (inert) expressions.

I need operations like:

Computing \(f(a)\) ...

- asked by masterxilo (3 votes)

—————————-

[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], 
   ...

- asked by Maria (2 votes)

5.23 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 ...

- asked by yode (13 votes), answered by Mr.Wizard (7 votes)

—————————-

[Bad interaction between Join and ListPlot (or Plot)] http://mathematica.stackexchange.com/questions/121289/bad-interaction-between-join-and-listplot-or-plot

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 =  ...

- asked by Francisco (11 votes), answered by C. E. (8 votes)

—————————-

[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 ...

- asked by Sumit (11 votes)

—————————-

[Can one effectively edit a Front End Resource that is already loaded?] http://mathematica.stackexchange.com/questions/121059/can-one-effectively-edit-a-front-end-resource-that-is-already-loaded

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.:

- asked by Mr.Wizard (11 votes)

—————————- [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 ...

- asked by JHM (10 votes), answered by Michael E2 (4 votes)

—————————-

[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 ...

- asked by gpap (10 votes), answered by Mr.Wizard (4 votes)

—————————-

[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 ...

- asked by Mayumi It (10 votes), answered by Alexey Popkov (7 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 (84 votes), answered by Heike (71 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 (2 votes), answered by Nasser (22 votes)

================================== 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 ...

- asked by Taeshin Kim (5 votes)

—————————-

[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 ...

- asked by Emilio Pisanty (5 votes)

—————————-

[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 ->  ...

- asked by Simon (3 votes)

5.24 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.

...

- asked by Jim Baldwin (14 votes), answered by Simon Woods (15 votes)

—————————-

[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 ...

- asked by user41614 (12 votes), answered by Kuba (8 votes)

—————————-

[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 ...

- asked by Posch79 (11 votes), answered by march (6 votes)

—————————-

[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 ...

- asked by bharb (10 votes), answered by C. E. (9 votes)

—————————-

[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.

- asked by Miguel (9 votes), answered by Feyre (9 votes)

—————————-

[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 ...

- asked by Algohi (8 votes), answered by Karsten 7. (9 votes)

—————————-

[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 \(5 \times 5\) the rule is elementary : if ...

- asked by cyrille.piatecki (8 votes), answered by Mr.Wizard (15 votes)

================================== 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.

- asked by vito (13 votes), answered by Martin Ender (21 votes)

—————————-

[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 ...

- asked by Amatya (518 votes), answered by Simon Woods (371 votes)

================================== 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:

...

- asked by Fred (2 votes)

—————————-

[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)

5.25 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 ...

- asked by happy fish (11 votes), answered by yode (6 votes)

—————————-

[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 ...

- asked by happy fish (9 votes), answered by Edmund (12 votes)

—————————-

[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]] 
] 
 ...

- asked by Nick (8 votes), answered by Gerli (5 votes)

—————————-

[Why does this LibraryLink function crash?] http://mathematica.stackexchange.com/questions/120384/why-does-this-librarylink-function-crash

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

LibraryLink Code

#include "WolframLibrary.h" 
 
 ...

- asked by Shutao TANG (8 votes), answered by happy fish (11 votes)

—————————-

[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`}}], 
    ...

- asked by YungHummmma (8 votes), answered by Michael E2 (12 votes)

—————————-

[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_,  ... 

- asked by Miguel (8 votes), answered by Anton Antonov (11 votes)

—————————-

[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 ...

- asked by Szabolcs (8 votes), answered by Szabolcs (5 votes)

================================== 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 ...

- asked by noisy (44 votes), answered by Vitaliy Kaurov (23 votes)

—————————-

[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 ...

- asked by faleichik (140 votes), answered by faleichik (192 votes)

================================== 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,  ...

- asked by Felix (7 votes)

—————————-

[Why FinancialDerivative fails for the Spread case?] http://mathematica.stackexchange.com/questions/120277/why-financialderivative-fails-for-the-spread-case

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

- asked by M.J.2 (2 votes)

—————————-

[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 ...

- asked by Phillip Dukes (5 votes)

5.26 Tuesday, July 5, 2016

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

[Which Object-oriented paradigm approach to use in Mathematica?] http://mathematica.stackexchange.com/questions/119991/which-object-oriented-paradigm-approach-to-use-in-mathematica

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

- asked by Anton Antonov (14 votes)

—————————-

[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 ...

- asked by QuantumDot (13 votes), answered by Emilio Pisanty (6 votes)

—————————-

[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 ...

- asked by István Zachar (13 votes), answered by István Zachar (15 votes)

—————————-

[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 ...

- asked by Wjx (11 votes), answered by Wjx (11 votes)

—————————-

[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 ...

- asked by psimeson (10 votes), answered by Simon Woods (16 votes)

—————————-

[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 ...

- asked by John M. Campbell (9 votes), answered by yarchik (4 votes)

—————————-

[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)

5.27 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]]] 
 ... 

- asked by luyuwuli (21 votes), answered by Leonid Shifrin (22 votes)

—————————-

[How do I increase the readability of this code?] http://mathematica.stackexchange.com/questions/119074/how-do-i-increase-the-readability-of-this-code

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

- asked by Imre Vegh (20 votes), answered by E.Doroskevic (16 votes)

—————————-

[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}*) 
 ... 

- asked by Wjx (18 votes), answered by WReach (25 votes)

—————————-

[How to debug the C code for LibraryLink?] http://mathematica.stackexchange.com/questions/119053/how-to-debug-the-c-code-for-librarylink

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

- asked by Shutao TANG (11 votes), answered by Szabolcs (16 votes)

—————————-

[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 ...

- asked by Shutao TANG (10 votes), answered by user21 (3 votes)

—————————-

[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]*) 
 ...

- asked by faysou (10 votes), answered by Szabolcs (12 votes)

—————————-

[Random walk on a Sierpinski gasket] http://mathematica.stackexchange.com/questions/119036/random-walk-on-a-sierpinski-gasket

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

- asked by FEARxxx (9 votes), answered by Wjx (11 votes)

================================== 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  ... 

- asked by Eiyriou von Kauyf (58 votes), answered by Jens (88 votes)

—————————-

[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 ...

- asked by Mike Honeychurch (51 votes), answered by halirutan (65 votes)

================================== 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, ...

- asked by John Conor Cosnett (3 votes)

—————————-

[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 ...

- asked by jamesson (4 votes)

—————————-

[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:

\[Q[t,n]\equiv P(\sum _{i=1}^{n}Log[f[x_{i}]]=t)\]

Since the sample ...

- asked by Jerry Guern (2 votes)

5.28 Tuesday, June 21, 2016

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

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

How to make a soccer ball \(3D\) graphic?

The following image is from Wikipedia, Spherical polyhedron:

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

...

- asked by vito (23 votes), answered by Michael E2 (23 votes)

—————————-

[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 ...

- asked by Szabolcs (14 votes), answered by Sjoerd C. de Vries (12 votes)

—————————-

[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 ...

- asked by Mr.Wizard (14 votes)

—————————-

[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 ...

- asked by user41147 (12 votes), answered by Thies Heidecke (28 votes)

—————————-

[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 ...

- asked by Alexey Popkov (12 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. The first link shows the desired result created by an artist and the second done with C#.

TRIANGULATION: ANGULAR ...

- asked by R Hall (11 votes), answered by MarcoB (10 votes)

—————————-

[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 ...

- asked by Anton Antonov (10 votes), answered by Anton Antonov (10 votes)

================================== 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 ...

- asked by olliepower (13 votes), answered by Dr. belisarius (14 votes)

—————————-

[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  ... 

- asked by PeterR (32 votes), answered by J. M. (29 votes)

================================== 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 ...

- asked by Frederik Brinck Jensen (4 votes)

—————————-

[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 ...

- asked by S2167 (2 votes)

—————————-

[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)

5.29 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 ...

- asked by Frank Martin (18 votes), answered by Anton Antonov (14 votes)

—————————-

[Is manual adjustment of AccuracyGoal and PrecisionGoal useless?] http://mathematica.stackexchange.com/questions/118249/is-manual-adjustment-of-accuracygoal-and-precisiongoal-useless

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

- asked by xzczd (15 votes)

—————————-

[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 ...

- asked by mattiav27 (15 votes), answered by C. E. (13 votes)

—————————-

[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 ...

- asked by Anton Antonov (14 votes), answered by Anton Antonov (15 votes)

—————————-

[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 ...

- asked by Hector (10 votes), answered by Leonid Shifrin (6 votes)

—————————-

[Why NIntegrate is badly-behaved on \(J_{\frac {9}{2}}(x)\) by default?] http://mathematica.stackexchange.com/questions/117888/why-nintegrate-is-badly-behaved-on-j-frac92x-by-default

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 
(*  ... 

- asked by xzczd (10 votes), answered by Anton Antonov (6 votes)

—————————-

[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 ...

- asked by QuantumDot (9 votes), answered by Kuba (9 votes)

================================== 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 ...

- asked by J. M. (419 votes), answered by faysou (377 votes)

—————————-

[++ 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 ...

- asked by Giovanni Resta (32 votes), answered by Mr.Wizard (24 votes)

================================== 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 ...

- asked by Wjx (5 votes)

—————————-

[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 ...

- asked by YungHummmma (2 votes)

—————————-

[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:

\[\sum _{n=1}^\infty \left (\frac {A_n}{n}\right )^p<\left (\frac {p}{p-1}\right )^p\sum _{n=1}^\infty a_n^p\] ...

- asked by vito (2 votes)

5.30 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 ...

- asked by Mr.Wizard (19 votes)

—————————-

[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 ...

- asked by Crepo (12 votes), answered by george2079 (6 votes)

—————————-

[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,  ...

- asked by Shutao TANG (12 votes), answered by Leonid Shifrin (10 votes)

—————————-

[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?

- asked by vonkohorn (12 votes), answered by jose (8 votes)

—————————-

[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}]; 
 ...

- asked by Dennis (11 votes)

—————————-

[How to learn the LibraryLink technique for the newcomer?] http://mathematica.stackexchange.com/questions/116451/how-to-learn-the-librarylink-technique-for-the-newcomer

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

- asked by Shutao TANG (11 votes), answered by Szabolcs (12 votes)

—————————-

[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", 
     ...

- asked by Kuba (9 votes), answered by Leonid Shifrin (5 votes)

================================== 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 ...

- asked by J. M. (417 votes), answered by faysou (376 votes)

—————————-

[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, ...

- asked by Istvan Zachar (126 votes), answered by Heike (105 votes)

================================== 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 ...

- asked by YungHummmma (4 votes)

—————————-

[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 ...

- asked by user40405 (3 votes)

5.31 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 =  ... 

- asked by ben18785 (18 votes), answered by Daniel Lichtblau (12 votes)

—————————-

[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 ...

- asked by Alexey Popkov (13 votes)

—————————-

[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 ...

- asked by Istvan Zachar (13 votes), answered by John Fultz (6 votes)

—————————-

[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  ...

- asked by Bruno Le Floch (10 votes), answered by Bruno Le Floch (8 votes)

—————————-

[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)]],  ...

- asked by Axel Boldt (9 votes), answered by bbgodfrey (9 votes)

—————————-

[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 
 
Global`a

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

- asked by Smart Humanism (8 votes), answered by Leonid Shifrin (15 votes)

—————————-

[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 ...

- asked by Axel Boldt (8 votes), answered by bbgodfrey (6 votes)

================================== 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 ...

- asked by chyaong (43 votes), answered by Mr.Wizard (67 votes)

—————————-

[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,  ...

- asked by mathe (22 votes), answered by Bob Hanlon (18 votes)

================================== 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 ...

- asked by Algohi (4 votes)

—————————-

[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 \(\exp (\lambda z)/\lambda \)? \[\frac {-\log (-z)+\log (z)}{\sqrt {2\pi }}\] Why the answer does not ...

- asked by Ivan Gankevich (4 votes)

—————————-

[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)

5.32 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 ...

- asked by D. Sessions (13 votes), answered by Jack LaVigne (16 votes)

—————————-

[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 ...

- asked by BlueSky (12 votes), answered by JasonB (23 votes)

—————————-

[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 ...

- asked by Kagaratsch (12 votes), answered by ciao (15 votes)

—————————-

[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. ...

- asked by ramesh (11 votes), answered by ubpdqn (6 votes)

—————————-

[Second argument of BeginPackage with nested package loading] http://mathematica.stackexchange.com/questions/115502/second-argument-of-beginpackage-with-nested-package-loading

I naively thought that the second argument of BeginPackage can simply be used to ensure the loading and availability in the $ContextPath of additional packages.

Example:

(* Pack1.m *) ...

- asked by Szabolcs (11 votes), answered by Leonid Shifrin (7 votes)

—————————-

[How to correctly implement in a new function the scoping behavior of Table, Sum and other commands that use Block to localize iterators?] http://mathematica.stackexchange.com/questions/115722/how-to-correctly-implement-in-a-new-function-the-scoping-behavior-of-table-sum

It is documented that "Block is automatically used to localize values of iterators in iteration constructs such as Do, Sum, and Table." Therefore the dummy index (iterator) in a Sum is shielded ...

- asked by MaTECmatica (9 votes), answered by Leonid Shifrin (6 votes)

—————————-

[Parallelization works, but does not use all CPU power] http://mathematica.stackexchange.com/questions/115436/parallelization-works-but-does-not-use-all-cpu-power

I’ve written code which involves Parallelize@Cases. When I evaluate, I find that all 16 cores are being used, but not fully; in other words all cores are active, but the total CPU usage is only 50

...

- asked by Luther (8 votes), answered by Szabolcs (17 votes)

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

[How was Mathematica built?] http://mathematica.stackexchange.com/questions/106020/how-was-mathematica-built

I’ve been wondering this for a while now: How was Mathematica built?

Is it written in Haskell? C++? I’d love to get a taste of the wizardry behind this incredible software.

- asked by Chet (17 votes), answered by Sjoerd C. de Vries (23 votes)

—————————-

[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?

- asked by niklasfi (42 votes), answered by Artes (36 votes)

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

[How can I define MakeBoxes for Inactive forms user-defined heads?] http://mathematica.stackexchange.com/questions/115638/how-can-i-define-makeboxes-for-inactive-forms-user-defined-heads

Here I define a MakeBoxes for Times:

MakeBoxes[p : Inactive[Times][args___], form_] := 
   MakeBoxes[Interpretation[HoldForm@myHead[args], p], form] 
 
 
And it works as expected: 
 
Inactivate[Times[3,  ...

- asked by QuantumDot (2 votes)

—————————-

[Quits Kernel during evaluation of CreateTopologies] http://mathematica.stackexchange.com/questions/115660/quits-kernel-during-evaluation-of-createtopologies

I am using Feynarts 3.9 and FeynCalc 9.0.1 with Mathematica 10. Every time I load FeynArts with FeynCalc and execute

t = CreateTopologies[1, 1 -&gt; 2];

mathematica quits the kernel after a few ...

- asked by Heerak Banerjee (1 vote)

—————————-

[Inconsistent performance of code] http://mathematica.stackexchange.com/questions/115634/inconsistent-performance-of-code

I’m trying to do some optimizations to my code to make it run faster, but it seems that there are inconsistencies in the performance of the code. Namely, the codes have different performance in ...

- asked by xslittlegrass (5 votes)

5.33 Tuesday, May 17, 2016

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

[Speedup matrix number multiplication] http://mathematica.stackexchange.com/questions/115087/speedup-matrix-number-multiplication

Consider this simple matrix number multiplication:

lth = 200; 
mtx = RandomReal[{0, 1}, {lth, lth}]; 
ls = RandomReal[{0, 1}, {lth}]; 
 
Et = Function[{t}, Sin[(Pi t)/20] Sin[2 t]]; 
Etc = Compile[{{t,  ...

- asked by xslittlegrass (15 votes), answered by xslittlegrass (5 votes)

—————————-

[Fit a function with an unusual side condition] http://mathematica.stackexchange.com/questions/114864/fit-a-function-with-an-unusual-side-condition

I have a set of measurement data and I try to fit there a function (a Exp[b x] + c Exp[d x] - o). I have two problems:

The fit function does not converge nor after \(500\) iterations. The fit function ...

- asked by Lutscher (12 votes), answered by Anton Antonov (15 votes)

—————————-

[Tips to move from functional programming to GUI-based applications] http://mathematica.stackexchange.com/questions/114984/tips-to-move-from-functional-programming-to-gui-based-applications

Even though this forum has some questions related to Mathematica programming tips I think that we still don’t have specific help for those who want to learn to efficiently create GUIs in Mathematica. ...

- asked by Ariel Sepulveda (11 votes), answered by Brian G (0 votes)

—————————-

[Longest common substring for multiple strings?] http://mathematica.stackexchange.com/questions/114979/longest-common-substring-for-multiple-strings

I’m looking for a way to get the longest common substring for multiple strings such as

  {home/dir1/dir2/jmoasd.txt,home/dir1/dir2/ivbnoxcihv.txt,home/dir1/dir2/siuhgiuchv.txt}

should yield

...

- asked by nqduy (10 votes), answered by xslittlegrass (9 votes)

—————————-

[How does a Pringle lose its curvature?] http://mathematica.stackexchange.com/questions/115231/how-does-a-pringle-lose-its-curvature

Nom!

As part of a bigger project, I’ve was writing some code to calculate the scalar curvature of surfaces of the form \(z = f(x,y)\). This uses a general calculation of the scalar curvature to produce ...

- asked by Lucas (9 votes), answered by KraZug (9 votes)

—————————-

[How to make datasets display correctly?] http://mathematica.stackexchange.com/questions/115246/how-to-make-datasets-display-correctly

NB: The problem illustrated below is truly ubiquitous. I hope the examples given below are sufficiently different to demonstrate this fact, and to discourage answers that hinge on the details of the ...

- asked by kjo (9 votes), answered by Stefan R (9 votes)

—————————-

[How do I translate a list of English words into another language using an online translation service with Mathematica?] http://mathematica.stackexchange.com/questions/115141/how-do-i-translate-a-list-of-english-words-into-another-language-using-an-online

As far as I know, there are two posts on this topic: Can I use Mathematica to translate a English word to a Chinese characters? and *How can I use Mathematica to get the translated result from the ...

- asked by matheorem (9 votes), answered by Rashid (11 votes)

================================== 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 ...

- asked by noisy (43 votes), answered by Vitaliy Kaurov (23 votes)

—————————-

[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 (110 votes), answered by Leonid Shifrin (128 votes)

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

[PearsonChiSquareTest for count/frequency data?] http://mathematica.stackexchange.com/questions/114905/pearsonchisquaretest-for-count-frequency-data

I read with interest a previous question on the PearsonChiSquareTest from a few years ago, and one answer was very helpful:

Performing a chi-square goodness of fit test

Have there been any updates ...

- asked by Jim (3 votes)

—————————-

[ParallelDo issue with SQLExecute (SQLite)] http://mathematica.stackexchange.com/questions/115263/paralleldo-issue-with-sqlexecute-sqlite

This code run as expected if I use Do[...], but if I use instead ParallelDo[...], as in the code bellow, the SQL INSERT statements seems to be completely ignored.

In both cases, the filename is ...

- asked by jss (2 votes)

—————————-

[Why does Kernels[] produce this error?] http://mathematica.stackexchange.com/questions/115100/why-does-kernels-produce-this-error

Most of times, on my PC, when Kernel[] is launched for the first time, produces this error:

Executed again returns .

Is it a clue of malfunctioning or is, for reason I’m unaware of, the way it ...

- asked by mitochondrial (3 votes)

5.34 Tuesday, May 10, 2016

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

[Understanding evaluation and typesetting] http://mathematica.stackexchange.com/questions/114305/understanding-evaluation-and-typesetting

Background

So, one could be surprised by the fact that:

Hold @ Grid[{{1, 2}}] 
 (*or*) 
Hold @ Graphics @ Disk[]

This issue and methods of prevention are discussed in Prevent graphics render ...

- asked by Kuba (16 votes), answered by Alexey Popkov (7 votes)

—————————-

[Empty WhenEvent action crashes kernel] http://mathematica.stackexchange.com/questions/114314/empty-whenevent-action-crashes-kernel

Bug introduced in 9.0 and persisting through 10.4.1 WhenEvent is new in 9.0.

This is an example from the docs, slightly modified (action is wrapped in ), working as expected.

NDSolve[x’[t] == ...

- asked by Istvan Zachar (12 votes), answered by Istvan Zachar (3 votes)

—————————-

[Difference between = and Ctrl + =] http://mathematica.stackexchange.com/questions/114357/difference-between-and-ctrl

What is a difference between \(\textbf {=}\), and Ctrl + \(\textbf {=}\)?

For instance

there are some examples, but result is same.

and

- asked by vito (11 votes), answered by WReach (19 votes)

—————————-

[Is there a way to make links to functions in a notebook?] http://mathematica.stackexchange.com/questions/114342/is-there-a-way-to-make-links-to-functions-in-a-notebook

Frequently I’m working on a function that’s at the top of my notebook in a "functions" section, but I’m looking at the output of it in a lower "body" section of the notebook. When I want to edit the ...

- asked by YungHummmma (11 votes), answered by Mr.Wizard (11 votes)

—————————-

[Strategies to compensate for lack of multi-document interface?] http://mathematica.stackexchange.com/questions/114515/strategies-to-compensate-for-lack-of-multi-document-interface

I use Mathematica (Home Edition) to manage notes which live in a large number of different notebooks. In my case the notebooks (hundreds) are just organized using document names and file system ...

- asked by billc (10 votes), answered by Leonid Shifrin (10 votes)

—————————-

[Definition of Mod and Quotient with complex arguments] http://mathematica.stackexchange.com/questions/114361/definition-of-mod-and-quotient-with-complex-arguments

How are Mod and Quotient defined for three real/complex arguments? I wasn’t able to find the definition.

My main surprise so far when investigating their behavior is a discontinuity between real and ...

- asked by Bruno Le Floch (10 votes), answered by Chip Hurst (10 votes)

—————————-

[HighlightGraph Problem] http://mathematica.stackexchange.com/questions/114725/highlightgraph-problem

Bug introduced in 9.0 or earlier and persisting through 10.4.1

HighlightGraph does not work.

HighlightGraph[Graph[{{0, 0}, {0, 1}, {1, 0}, {1, 1}}, {{0, 0} \[UndirectedEdge] {0, 1}}], {{0, 0}, {0,  ...

- asked by ZYX (8 votes), answered by Szabolcs (5 votes)

================================== 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 ...

- asked by Tianxiang Xiong (42 votes), answered by Artes (36 votes)

—————————-

[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,  ...

- asked by mathe (22 votes), answered by Bob Hanlon (17 votes)

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

[FrobeniusSolve: how does it work?] http://mathematica.stackexchange.com/questions/114308/frobeniussolve-how-does-it-work

Can someone suggest any reference to read? I would like to understand how the algorithm works.

- asked by Mirko Aveta (3 votes)

—————————-

[How to delete lines containing specific values from a matrix?] http://mathematica.stackexchange.com/questions/114709/how-to-delete-lines-containing-specific-values-from-a-matrix

I am doing some numerical computations and a few iterations return values that are obviously incorrect (some numerical integration problem, I suppose.). I have managed to set these values to zero but ...

- asked by Gabu (2 votes)

—————————-

[ImageSize not working correctly with Placed directive] http://mathematica.stackexchange.com/questions/114580/imagesize-not-working-correctly-with-placed-directive

It seems that having Placed inside Plot breaks the ImageSize specification:

cm = 72/2.54; 
plt = 
  LogLogPlot[Exp[x], {x, 1, 3}, 
   ImageSize -&gt; 12 cm, 
   AspectRatio -&gt; 0.73, 
   Frame -&gt;  ...

- asked by leosenko (2 votes)

5.35 Tuesday, May 3, 2016

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

[Find duplicates in list of InfiniteLine] http://mathematica.stackexchange.com/questions/114046/find-duplicates-in-list-of-infiniteline

MMA 10 introduced a new function, which can be very convenient: InfiniteLine.

Of course, two infinite lines can be described by different arguments: for example InfiniteLine[0,0,1,0] and ...

- asked by anderstood (14 votes), answered by kglr (12 votes)

—————————-

[Is there any harm or benefit to Removing unneeded private symbols in packages?] http://mathematica.stackexchange.com/questions/114106/is-there-any-harm-or-benefit-to-removing-unneeded-private-symbols-in-packages

One of the things I noticed is that in typical medium-to-large sized packages, a huge number of symbols are created in the myPackage‘Private context. You can see a list of them by running

? ...

- asked by QuantumDot (12 votes), answered by R. M. (18 votes)

—————————-

[Can Mathematica solve functional equations with nested variable?] http://mathematica.stackexchange.com/questions/114210/can-mathematica-solve-functional-equations-with-nested-variable

First, inline free form input can solve these equations:

But it seems no native Mathematica function can solve these, there is even an error page for equations of this form (nestdv).

Now my ...

- asked by happy fish (10 votes)

—————————-

[How to describe the convex hull of a set of points as an implicit region for optimization?] http://mathematica.stackexchange.com/questions/113689/how-to-describe-the-convex-hull-of-a-set-of-points-as-an-implicit-region-for-opt

Last edit: 2016-05-03

A.G.’s answer was the one helped me the most, see explanation at the end of this question.

Original question

In Mathematica you can create out of a set of points in 2D and 3D ...

- asked by Mauricio Lobos (10 votes), answered by A.G. (2 votes)

—————————-

[NDEigensystem returns incorrect eigenvalues for 2D coulomb problem, eigenfunctions contain discontinuity] http://mathematica.stackexchange.com/questions/113898/ndeigensystem-returns-incorrect-eigenvalues-for-2d-coulomb-problem-eigenfunctio

I posted a similar question a short time ago regarding the 3D Coulomb problem. Jens’ excellent answer to this thread allowed me to obtain the correct eigenvalues and eigenenergies for that system.

I ...

- asked by Matthew Brunetti (10 votes), answered by Jens (12 votes)

—————————-

[RandomInteger: speed with long lists] http://mathematica.stackexchange.com/questions/114047/randominteger-speed-with-long-lists

I noticed an interesting effect with RandomInteger when looking at the time to create \(10^8\) random integers. The following code lines all take about 0.5 seconds on a i7 Windows 64bit Laptop:

...

- asked by Eisbar (9 votes), answered by Daniel Lichtblau (8 votes)

—————————-

[Creating Saveable->False notebooks] http://mathematica.stackexchange.com/questions/113858/creating-saveable-false-notebooks

Bug introduced in 10.3 or earlier and persisting through 10.4.1

Reproduced on Windows 7, 10

I’m having difficulties with programmatic creation of non saveable notebooks on Windows with V10.4.1.

...

- asked by Kuba (9 votes), answered by Kuba (7 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 (109 votes), answered by Leonid Shifrin (127 votes)

—————————-

[What are the most common pitfalls awaiting new users?] http://mathematica.stackexchange.com/questions/18393/what-are-the-most-common-pitfalls-awaiting-new-users

As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...

- asked by Dr. belisarius (308 votes), answered by Michael E2 (177 votes)

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

[Integrate producing bad result] http://mathematica.stackexchange.com/questions/113791/integrate-producing-bad-result

I noticed a bug in Mathematica. It computes incorrectly a definite integral

Integrate[y* Sqrt[(l1^2 - y^2) (l2^2 - y^2)]/(a^2 - y^2), {y, 0, l1}, 
  Assumptions -&gt; l2 &gt; a &gt; l1 &gt; 0]

and ...

- asked by user1765636 (3 votes)

—————————-

[FindPeaks error " Expecting an image or graphics instead of"] http://mathematica.stackexchange.com/questions/113884/findpeaks-error-expecting-an-image-or-graphics-instead-of

I’m running Mathematica 10.3.1.0 on windows 7 Professional Sp.1 when I try to use FindPeaks I keep getting the following error, even when trying the example in the documentation.

I have done the ...

- asked by Phymonkey (2 votes)

—————————-

[How can I set notebook’s options without opening it?] http://mathematica.stackexchange.com/questions/113816/how-can-i-set-notebooks-options-without-opening-it

At present moment, to batch apply a change in a set of notebook I use a "brute force", rough, method:

(* simple example *) 
setBackgroundBlue[notebookFileName_] := Module[ 
   {tempNb}, 
   tempNb =  ...

- asked by mitochondrial (3 votes)

5.36 Tuesday, April 26, 2016

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

[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 (59 votes), answered by Martin Buttner (54 votes)

—————————-

[Numerical inverse Laplace-Hankel transform for a highly oscillatory function] http://mathematica.stackexchange.com/questions/113240/numerical-inverse-laplace-hankel-transform-for-a-highly-oscillatory-function

When trying to reproduce the result of this paper about numerical solution of Lamb’s problem, I encountered the double integral (to be more precise, the 0-order inverse Hankel-Laplace transform) of a ...

- asked by xzczd (11 votes)

—————————-

[Fitting Stradivari’s scroll] http://mathematica.stackexchange.com/questions/113273/fitting-stradivaris-scroll

How can I find the simplest curve that gives me a scroll like this?

This is where I am at the moment and doing it by hand is becoming more and more cumbersome.

First, take a drawing of the scroll ...

- asked by tsuresuregusa (11 votes), answered by nikie (13 votes)

—————————-

[NDEigensystem cannot solve numerically the 3D Coulomb problem, while DSolve returns the right answer] http://mathematica.stackexchange.com/questions/113520/ndeigensystem-cannot-solve-numerically-the-3d-coulomb-problem-while-dsolve-retu

After having derived by hand the eigenvalues and eigenfunctions for the 3D and 2D hydrogen atom, I want to solve the systems numerically using Mathematica. I need to do this because my next step is to ...

- asked by Matthew Brunetti (9 votes), answered by user21 (4 votes)

—————————-

[Make the moon’s 3D gif] http://mathematica.stackexchange.com/questions/113217/make-the-moons-3d-gif

How do I make the following gif

I tried:

moon = Import[ 
 "https://upload.wikimedia.org/wikipedia/commons/f/f0/Full_Moon_as_Seen_From_Denmark.jpg"]; 
 
{r, g, b} = ColorSeparate[ImageResize[moon,  ...

- asked by vito (9 votes), answered by Kuba (13 votes)

—————————-

[How to generate this structure of a list without ‘While‘ and the like?] http://mathematica.stackexchange.com/questions/113307/how-to-generate-this-structure-of-a-list-without-while-and-the-like

I need to create a list that holds, for given integer d, the elements \(1,\ldots ,d,d+2,\ldots ,2d,2d+3,\ldots ,3d,3d+4,\ldots ,d^2\) where \(\ldots \) is just denoting increment by 1 until the next written ...

- asked by Lukas (8 votes), answered by ciao (3 votes)

—————————-

[Join a list with 6, 6, 2 dimensions with a list 6, 6 dimensions] http://mathematica.stackexchange.com/questions/113630/join-a-list-with-6-6-2-dimensions-with-a-list-6-6-dimensions

listA = {{a1, a2, a3, a4, a5, a6}, 
{b1, b2, b3, b4, b5, b6}, 
{c1, c2, c3, c4, c5, c6}, 
{d1, d2, d3, d4, d5, d6}, 
{e1, e2, e3, e4, e5, e6}, 
{f1, f2, f3, f4, f5, f6}} 
 
listB = {{{n1, p1}, {n2, p2},  ...

- asked by SPIL (7 votes), answered by Kuba (6 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 (5 votes), answered by Jens (15 votes)

—————————-

[Multivariable Taylor expansion does not work as expected] http://mathematica.stackexchange.com/questions/15023/multivariable-taylor-expansion-does-not-work-as-expected

The basic multivariable Taylor expansion formula around a point is as follows:

\[ f(\mathbf r + \mathbf a) = f(\mathbf r) + (\mathbf a \cdot \nabla )f(\mathbf r) + \frac {1}{2!}(\mathbf a \cdot ... \]

- asked by matheorem (24 votes), answered by Jens (29 votes)

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

[JournalArticle does not react on the PointSize option] http://mathematica.stackexchange.com/questions/113547/journalarticle-does-not-react-on-the-pointsize-option

The Default StyleSheet recognizes the PointSize option for ListPlot:

    ListPlot[Table[Table[{i, j*i}, {i, 1, 10}], {j, 1, 3}], 
 PlotStyle -&gt; {{Red, PointSize[0.1]}, {Blue, PointSize[0.05]},  ... 

- asked by Alexei Boulbitch (2 votes)

—————————-

[How to trace the stylesheet directives responsible for the selected text’s appearance?] http://mathematica.stackexchange.com/questions/113495/how-to-trace-the-stylesheet-directives-responsible-for-the-selected-texts-appea

By way of example, in a typical Mathematica interactive session, one sees text content as shown below:

Three different text styles can be seen in this figure: input, output, and the style for the ...

- asked by kjo (5 votes)

—————————-

[How do I get my ZWO ASI120MM astro-camera to work in MMA?] http://mathematica.stackexchange.com/questions/113481/how-do-i-get-my-zwo-asi120mm-astro-camera-to-work-in-mma

I am using Windows 10 + MMA 10.4.1. I bought a ZWO ASI120MM astro camera which I want to use as a guiding camera during astrophotography. From this site (http://astronomy-imaging-camera.com/software/) ...

- asked by Max (2 votes)

5.37 Tuesday, April 19, 2016

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

[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 = ...

- asked by vito (36 votes), answered by C. E. (38 votes)

—————————-

[Can you plot pure function without specifying variable?] http://mathematica.stackexchange.com/questions/112478/can-you-plot-pure-function-without-specifying-variable

Given a pure function, e.g. f=Sin[#]& it is possible to plot it with introducing an arbitrary local variable, e.g.,

Plot[f[x],x,0,1]

However, the introduction of a variable x seems ...

- asked by JeffDror (15 votes), answered by Jens (12 votes)

—————————-

[Vizualization of percolation paths] http://mathematica.stackexchange.com/questions/112878/vizualization-of-percolation-paths

I did a simple demonstration to illustrate the percolation theory for my students. The content is a conductive square network possessing electrodes at its top and bottom edges. Some randomly chosen ...

- asked by Alexei Boulbitch (13 votes), answered by Kuba (8 votes)

—————————-

[How to access FEM shape functions] http://mathematica.stackexchange.com/questions/112907/how-to-access-fem-shape-functions

A couple of days ago I asked here about surface meshes and plotting on surfaces.

Now I have another question: How can I access the surface or boundary element shape functions?

I would like to ...

- asked by AxelF (9 votes), answered by user21 (7 votes)

—————————-

[Finding peaks of curve with small values] http://mathematica.stackexchange.com/questions/112993/finding-peaks-of-curve-with-small-values

I have 2d data of which I want to find the peaks.

data &lt;&lt; "http://pastebin.com/raw/EQFz1KFn"; 
peaks = FindPeaks[data[[All, 2]], 0, 0, -Infinity] // N

The magnitudes of the found peaks are ...

- asked by mrz (8 votes), answered by JasonB (11 votes)

—————————-

[Is there research about the Mathematica programming paradigm?] http://mathematica.stackexchange.com/questions/112920/is-there-research-about-the-mathematica-programming-paradigm

There seem to be lots of papers discussing the functional programming paradigm terminology for Haskell, such as monad, category theory, lambda calculus, *morphism, etc. People study concepts and ...

- asked by Eric (8 votes)

—————————-

[Constructing a graph from a distance matrix] http://mathematica.stackexchange.com/questions/112745/constructing-a-graph-from-a-distance-matrix

I have a set \(S\) of \(n\) 2-dimensional points. We can compute a distance matrix (Euclidean distance) for \(S\) using say this answer. I wish to form an \(n\)-vertex graph having the points \(S\) as vertices, ...

- asked by Juho (8 votes), answered by Martin Buttner (9 votes)

================================== 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 ...

- asked by Tianxiang Xiong (42 votes), answered by Artes (36 votes)

—————————-

[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 ...

- asked by noisy (43 votes), answered by Vitaliy Kaurov (23 votes)

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

[Possible reduced GUI performance in 10.4] http://mathematica.stackexchange.com/questions/112526/possible-reduced-gui-performance-in-10-4

I have observed significantly reduced performance in GUI in Mathematica v10.4. This is especially visible in autocomplete feature delays. This is very evident when I turn some power saving features ...

- asked by leosenko (3 votes)

—————————-

[Why does Eigenvalues work for a matrix \(\{M\}\) but not \(\{\{M\}\}\)?] http://mathematica.stackexchange.com/questions/112619/why-does-eigenvalues-work-for-a-matrix-m-but-not-m

Suppose I have a matrix 
 
{{1, 2}, {3, 4}}

which I’ll call mat. In a blur of human error, I computed the eigenvalues of mat with an extra set of curly braces surrounding it. To my surprise, this ...

- asked by user170231 (3 votes)

—————————-

[Calculate the ESP Grid based on Density Grid] http://mathematica.stackexchange.com/questions/112872/calculate-the-esp-grid-based-on-density-grid

I want to build a fast way to convert a density grid file into a grid file of the respective electrostatic potential (ESP; also known as MEP, the molecular electrostatic potential).

This ...

- asked by pH13 - Yet another Philipp (3 votes)

5.38 Tuesday, April 12, 2016

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

[How to model wooden joints with mathematica’s FEM?] http://mathematica.stackexchange.com/questions/111960/how-to-model-wooden-joints-with-mathematicas-fem

This is a dovetail joint:

and I’d like to see the stresses and deformation on the joint.I haven’t seen any modeling of disconnected regions with FEM, only connected regions, so I’m curious if you ...

- asked by tsuresuregusa (16 votes), answered by user21 (6 votes) —————————-

[Possible Bug in ArrayMesh] http://mathematica.stackexchange.com/questions/111945/possible-bug-in-arraymesh

Suppose we have the following array from which we intend to create an ArrayMesh:

arr = {{{1, 1, 1}, {1, 0, 1}, {1, 1, 0}}, {{1, 1, 1}, {0, 1, 1}, {1, 1, 
   0}}, {{0, 1, 0}, {0, 1, 1}, {0, 0, 1}}};

...

- asked by RunnyKine (15 votes), answered by ilian (9 votes)

—————————-

[How to draw all paths from (1,1) to (n,n) by move (+1, 0) or (0, +1)?] http://mathematica.stackexchange.com/questions/112395/how-to-draw-all-paths-from-1-1-to-n-n-by-move-1-0-or-0-1

Now I can draw some grid:

But what I want(I’m sorry for the weird line. I have no image processing software in my mac...):

Please notice:

f(1, 1) = f(2, 1) = f(3, 1) = 1 
f(1, 1) = f(1, 2) =  ...

- asked by Sayakiss (14 votes), answered by wxffles (14 votes)

—————————-

[All the food WolframAlpha knows about] http://mathematica.stackexchange.com/questions/112104/all-the-food-wolframalpha-knows-about

I want to plot some nutritional values and do some computation with it.

Is there an analogue of CountryData[] to get a list of all the foods for which WA has information?

- asked by Andrea Di Biagio (12 votes), answered by C. E. (12 votes)

—————————-

[RegionNearest and neighborhoods] http://mathematica.stackexchange.com/questions/112264/regionnearest-and-neighborhoods

In this previous question we see that RegionNearest isn’t quite as ’capable’ as Nearest for some things.

Similarly, I need to be able to find a given neighborhood of points on a MeshRegion. With ...

- asked by flip (11 votes), answered by Simon Woods (10 votes)

—————————-

[How do I extract a matrix of only positive numbers given a set of assumptions?] http://mathematica.stackexchange.com/questions/111989/how-do-i-extract-a-matrix-of-only-positive-numbers-given-a-set-of-assumptions

I want to divide a matrix:

mat = {{a, 0, -b}, {d, a, 0}, {0, 0, -a}} 
 
with the following assumptions: 
a &gt;= 0,  b &gt;= 0, d &gt;= 0

Into two matrices, one containing the positive elements, and one ...

- asked by Luis Fernando (11 votes), answered by b.gatessucks (14 votes)

—————————-

[How to type text with an underbrace underneath it like: \(\underbrace {g...g}_{n-times}\)?] http://mathematica.stackexchange.com/questions/111970/how-to-type-text-with-an-underbrace-underneath-it-like-underbraceg-g-n-t

I want to use the underbrace "esc u esc" but have it placed underneath text. Like \[\underbrace {g...g}_{n-times}\]

in a mathematica text cell. Is it possible? Thanks

- asked by Craig (11 votes), answered by JasonB (16 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 (5 votes), answered by Jens (15 votes)

—————————-

[How to manipulate 2D plots?] http://mathematica.stackexchange.com/questions/7142/how-to-manipulate-2d-plots

When it comes to visual analysis, large datasets or data with intricate internal details often makes plotting in 2D useless, as the outcome is either just a fraction of the full dataset, or no details ...

- asked by Istvan Zachar (94 votes), answered by Istvan Zachar (105 votes)

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

[Possible Bug in LinearSolveFunction with Sparse Vectors] http://mathematica.stackexchange.com/questions/112313/possible-bug-in-linearsolvefunction-with-sparse-vectors

Bug introduced in 5.0 and persists through 10.4

LinearSolveFunction is new in 5.0

Consider the following set of equations and corresponding variables:

eqns1 ={2 x == 2 - 4 y, 3 y == 4 z, 2 z + 4  ...

- asked by RunnyKine (8 votes)

—————————-

[Why FoldList 5 times faster than Apply for matrix multiplication?] http://mathematica.stackexchange.com/questions/112125/why-foldlist-5-times-faster-than-apply-for-matrix-multiplication

Consider this list of \(2x2\) matrices:

list=RandomReal[{-2,2},{500,2,2}];

Now compare timings of Apply and FoldList for matrix multiplication:

t1=FoldList[Dot,list];//AbsoluteTiming 
(* 0.000324,  ...

- asked by Lukas (6 votes)

—————————-

[Generating OpenCL C code] http://mathematica.stackexchange.com/questions/112127/generating-opencl-c-code

I’m trying to make an interactive complex function plotter using OpenCl. So far I can only plot functions that I hardcode into the kernel by hand. I’d like to be able to use ComplexExpand@#@f@(x +  ... 

- asked by ra91 (6 votes)

5.39 Tuesday, April 5, 2016

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

[Rounding the Corners of a Shape] http://mathematica.stackexchange.com/questions/111479/rounding-the-corners-of-a-shape

I was wondering whether there is an option in Mathematica that enables me to smooth the corners of a shape. The example I want to start with is the pentagon.

This can be crudely specified as

...

- asked by Mr S 100 (23 votes), answered by MarcoB (21 votes)

—————————-

[Writing functions with "Method" options] http://mathematica.stackexchange.com/questions/111666/writing-functions-with-method-options

I’d like to implement several behaviors for a particular function using a Method option added to the function definition:

Options[saveData] = {Method -&gt; "Addition"}; 
saveData[vars_, opts :  ...

- asked by dionys (14 votes), answered by Shutao TANG (7 votes)

—————————-

[Interpretation of the result of ?@] http://mathematica.stackexchange.com/questions/111394/interpretation-of-the-result-of

This might be a very trivial question but as a beginner, I don’t know the answer. I was exploring ? and after running a cell containing ?@, I got an interesting result:

However, I’m not sure about ...

- asked by MathX (13 votes), answered by m_goldberg (15 votes)

—————————-

[Ticks in v10 - a bug or undocumented change] http://mathematica.stackexchange.com/questions/111663/ticks-in-v10-a-bug-or-undocumented-change

Bug introduced in 10.0 and fixed in 10.4

In this post @Heike provides this code:

ticksfun[xmin_, xmax_] := 
 Table[{10^i, Superscript[10, i]}, {i, Floor[Log10[xmin]], 
   Ceiling[Log10[xmax]]}]

...

- asked by leosenko (12 votes), answered by rcollyer (8 votes)

—————————-

[Why is an empty list not tested by VectorQ?] http://mathematica.stackexchange.com/questions/111438/why-is-an-empty-list-not-tested-by-vectorq

I am a bit amazed by this behavior of VectorQ[ expr, test ]: 
 
VectorQ[ {}, NumberQ ] 
 
  True

It seems that the test itself is never applied and thus does not matter, so NumericQ or OddQ for ...

- asked by gwr (11 votes), answered by Szabolcs (16 votes)

—————————-

[Matrix indexed by one number] http://mathematica.stackexchange.com/questions/111631/matrix-indexed-by-one-number

I’m trying to find a generic way (for arbitrary dimensions) to create a matrix like so

a[1] a[2]

a[3] a[4]

i.e where it is indexed by one number, instead of say Array[a, 2, 2] which gives

...

- asked by Henrik (10 votes), answered by Szabolcs (14 votes)

—————————-

[ErrorListPlot ignores some exact data points] http://mathematica.stackexchange.com/questions/111436/errorlistplot-ignores-some-exact-data-points

Possible bug? Or am I missing something / expecting too much?

Forgive the seemingly obscure data points but they’re where I’ve noticed a problem.

Needs["ErrorBarPlots`"] 
data = { 
   {{(10 Pi)/8, 1},  ...

- asked by Quantum_Oli (9 votes)

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

[Generate two random numbers with constraints] http://mathematica.stackexchange.com/questions/97424/generate-two-random-numbers-with-constraints

I want to generate two random numbers, \(p\) and \(q\), between \(0.5\) and \(1\).

They are connected by the constraint \(1/(2q) > p\).

How do I generate \(p\) and \(q\)?

- asked by Chandan Datta (25 votes), answered by JasonB (11 votes)

—————————-

[Multivariable Taylor expansion does not work as expected] http://mathematica.stackexchange.com/questions/15023/multivariable-taylor-expansion-does-not-work-as-expected

The basic multivariable Taylor expansion formula around a point is as follows:

\[ f(\mathbf r + \mathbf a) = f(\mathbf r) + (\mathbf a \cdot \nabla )f(\mathbf r) + \frac {1}{2!}(\mathbf a \cdot \nabla )^2 f(\mathbf r) + \cdots \]

- asked by matheorem (24 votes), answered by Jens (29 votes)

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

[Numerical Optimal Control] http://mathematica.stackexchange.com/questions/111375/numerical-optimal-control

It seems that most practical optimal control problems are only able to be solved numerically using a non-linear programming approach. As such, I was hoping to tackle the following optimal control ...

- asked by user7388 (3 votes)

—————————-

[How to define a custom 3D graphics primitive in Mathematica?] http://mathematica.stackexchange.com/questions/111403/how-to-define-a-custom-3d-graphics-primitive-in-mathematica

There are lots of basic graphics pimitive in Mathematica such as 2D- caseLine[], Circle[] and 3D case Cylinder[], BSplineSurface[],etc.

In general, they own the following usage if memory serves:

...

- asked by Shutao TANG (5 votes)

—————————-

[Can Mathematica reliably determine the equality of any two constructible numbers?] http://mathematica.stackexchange.com/questions/111615/can-mathematica-reliably-determine-the-equality-of-any-two-constructible-numbers

A constructible number is any number which can be expressed with only natural numbers and the operators \(+\), \(-\), \(\times \), \(/\), \(\sqrt {}\) (square root only). Is Mathematica’s Simplify or FullSimplify ...

- asked by Martin Buttner (3 votes)

5.40 Tuesday, March 29, 2016

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

[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 (42 votes), answered by M.R. (65 votes)

—————————-

[Is there a simple strategy to determine whether a point is inside a boundary?] http://mathematica.stackexchange.com/questions/111114/is-there-a-simple-strategy-to-determine-whether-a-point-is-inside-a-boundary

For a ellipse \(E(\theta )\), which owns the parametric equation as follows:

\(\begin {cases} x = a \sin \theta + b \cos \theta + c \\ y = d \sin \theta + e \cos \theta + f \\ \end {cases}\)

Now, I have a ...

- asked by Shutao TANG (17 votes), answered by RunnyKine (19 votes)

—————————-

[How to divide the wine into two equal portions] http://mathematica.stackexchange.com/questions/111250/how-to-divide-the-wine-into-two-equal-portions

There is a 8-liter bottle is full of wine. There are two empty bottles that have capacity 5-liters and 3-liters. How can these three bottles be used to separate the wine into two 4-liter portions?

...

- asked by yode (14 votes), answered by Simon Woods (21 votes)

—————————-

[solve this probability problem symbolically] http://mathematica.stackexchange.com/questions/110789/solve-this-probability-problem-symbolically

Consider a unit square, Pick two points P and Q uniformly at random inside the square, What is the probability that |PQ|>1?

I tried solve this problem

...

- asked by mathe (11 votes), answered by ubpdqn (9 votes)

—————————-

[Radial distribution function] http://mathematica.stackexchange.com/questions/110743/radial-distribution-function

I have tried to rewrite my old IDL code to calculate the radial correlation function for a regular 2D crystal structure.

The theory behind this function is given here: ...

- asked by mrz (10 votes), answered by RunnyKine (11 votes)

—————————-

[How to plot GDPs in this way?] http://mathematica.stackexchange.com/questions/110901/how-to-plot-gdps-in-this-way

Actually the current answer is very wonderfull.The bouns just for someone can complete this question.

I found this interesting plot of how the relationship between the GDPs of different countries has ...

- asked by yode (10 votes), answered by C. E. (13 votes)

—————————-

[Interesting Progression of ParametricRegion: Bug?] http://mathematica.stackexchange.com/questions/110791/interesting-progression-of-parametricregion-bug

Consider the following ParametricRegion from an answer to this question:

region = ParametricRegion[{{(1 + r - 12 r^2 + 4 r^3)/(2 r - 2), 
     z Sqrt[(4 r^2)/(r - 1)^2 (r - r^2 (r - 3)^2)]}, 
    2  ...

- asked by RunnyKine (10 votes)

================================== 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?

- asked by niklasfi (41 votes), answered by Artes (34 votes)

—————————-

[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, ...

- asked by Istvan Zachar (126 votes), answered by Heike (105 votes)

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

[Overlay Inside a Grid/Column/Row Not Working] http://mathematica.stackexchange.com/questions/110836/overlay-inside-a-grid-column-row-not-working

Here is a microscopy image of some cells I want to make measurements on with Mathematica:

In order to make some measurements of cells in a microscopy image I have written a simple dynamic overlay ...

- asked by user13999 (3 votes)

—————————-

[WeightedAdjacencyMatrix does not complete for Connected Graph] http://mathematica.stackexchange.com/questions/111007/weightedadjacencymatrix-does-not-complete-for-connected-graph

Please see code snippet below - I have a weighted, connected graph that models a software process using a DiscreteMarkovProcess. I set some of the edge weights to zero to "turn off" some of the ...

- asked by Chris Ruhl (3 votes)

—————————-

[Counting automorphisms that preserve a group action] http://mathematica.stackexchange.com/questions/111102/counting-automorphisms-that-preserve-a-group-action

Note: the math, I believe, is not the problem here. The issue is not that I get the wrong answer, just that my code does not terminate. So, if you do not feel comfortable with the problem below, I do ...

- asked by Gerald (5 votes)

5.41 Tuesday, March 22, 2016

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

[General techniques for creating complex animations] http://mathematica.stackexchange.com/questions/110190/general-techniques-for-creating-complex-animations

I love good animations of abstract concepts, and when I try to create them myself, I prefer doing so in code to make sure they are exact (and because some things are just way too fiddly to do by ...

- asked by Martin Buttner (23 votes), answered by LLlAMnYP (6 votes)

—————————-

[Is there a numerical method/built-in to calculate the boundary of a set of graphs?] http://mathematica.stackexchange.com/questions/110236/is-there-a-numerical-method-built-in-to-calculate-the-boundary-of-a-set-of-graph

Recently, I encounted a geometry problem in my work. For a curve-family that owns the following parametric equation: \[E(t,\theta )= \begin {pmatrix} x_E(t,\theta ) \\ y_E(t,\theta ) \end {pmatrix}\]

...

- asked by Shutao TANG (13 votes), answered by RunnyKine (8 votes)

—————————-

[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.

- asked by vito (13 votes), answered by Martin Buttner (20 votes)

—————————-

[Regression /Bug in DelaunayMesh from 10.3.1 to 10.4] http://mathematica.stackexchange.com/questions/110598/regression-bug-in-delaunaymesh-from-10-3-1-to-10-4

In answering this question, I realized the OP and I were obtaining different results from the alphaShapes2D code. This question was updated with additional point sets, but when I tried to use my ...

- asked by RunnyKine (12 votes)

—————————-

[Handling Kernel quit] http://mathematica.stackexchange.com/questions/110162/handling-kernel-quit

One can use $Epilog to do something when the Kernel is quit or put an end.m file next to the init.m.

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 \(\mathbf s=\mathbf 0\) when \(\mathbf ...\)

- 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)

5.42 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.

$Version 
(* 10.4.0 for Microsoft  ...

- asked by Vladimir Reshetnikov (12 votes), answered by The Vee (3 votes)

================================== 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 ...

- asked by noisy (43 votes), answered by Vitaliy Kaurov (23 votes)

—————————-

[Is Mathematica worth it for me?] http://mathematica.stackexchange.com/questions/100072/is-mathematica-worth-it-for-me

I’m 13 years old and in 7th grade. I’m currently in Algebra 1, and I have fallen in love with both math and programming.

When I came upon Mathematica, it was awesome. My two favorite things fused ...

- asked by TreFox (59 votes), answered by Pillsy (43 votes)

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

[Building a classifier for images] http://mathematica.stackexchange.com/questions/109484/building-a-classifier-for-images

I tried to build a classifier for some images that I have with the following code:

class1 = Import /@ 
   FileNames["*", 
    "location1"]; 
 
class2 = Import /@ 
   FileNames["*", 
    "location2"];

...

- asked by soandos (2 votes)

—————————-

[AppearanceRules on multipage Web Form] http://mathematica.stackexchange.com/questions/109887/appearancerules-on-multipage-web-form

I’m attempting to make a web survey using FormFunction. To list the questions I am using AppearanceRules to give each page an individual title. I can’t find any documentation in regards to ...

- asked by Alex Krotz (4 votes)

—————————-

[Function output] http://mathematica.stackexchange.com/questions/109714/function-output

I would like a function that computes Cartesian product of two 
sets z=(Tuples@{#1,#2}), and computes the number of elements in this set(list) 
Length@z which have a x elements in #1 and y elements in  ...

- asked by Gelios (2 votes)

5.43 Tuesday, March 8, 2016

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

[How to design CloudObjects with reasonable CloudCredit costs] http://mathematica.stackexchange.com/questions/109259/how-to-design-cloudobjects-with-reasonable-cloudcredit-costs

Note: I originally thought to post this as a non-answer/extended comment to this question; however I feared that I would end up hijacking the original question. It is likely a duplicate with the ...

- asked by bobthechemist (17 votes)

—————————-

[How to merge two screenshots into one image?] http://mathematica.stackexchange.com/questions/109196/how-to-merge-two-screenshots-into-one-image

I have two screenshots:

For a long screenshot picture I usually use PhotoShop to combine both images:

How do I use Mathematica to make an automated program to do this? This is my current ...

- asked by yode (13 votes), answered by Arnoud Buzing (13 votes)

—————————-

[Current (e.g., ca. 2016 / MMa 10 / WP 4+) best practices for embedding interactive content in WordPress?] http://mathematica.stackexchange.com/questions/109231/current-e-g-ca-2016-mma-10-wp-4-best-practices-for-embedding-interacti

My strategy, in the past, has been to embed interactive CDF files into my WordPress blog for student’s to use (Much like the Wolfram Demonstration Project).

As many know 1) the ’Plug in’ ...

- asked by flip (11 votes)

—————————-

[Getting data from FRED] http://mathematica.stackexchange.com/questions/109203/getting-data-from-fred

Mathematica V10.4 supports a service for connection to FRED. If you create a connection with

fred = ServiceConnect["FederalReserveEconomicData"]

(you need to have created a login id to be ...

- asked by George Wolfe (11 votes), answered by George Wolfe (4 votes)

—————————-

[Do[ ]s and Don’t[ ]s when teaching Mathematica in undergraduate courses] http://mathematica.stackexchange.com/questions/108987/do-s-and-dont-s-when-teaching-mathematica-in-undergraduate-courses

Question motivated by some horrific homework-related posts that I don’t dare to link:

What are the top Do’s and Dont’s when teaching Mathematica to undergrads?

I don’t ask for the design of a ...

- asked by Dr. belisarius (11 votes), answered by bobthechemist (10 votes)

—————————-

[Primes Race (Mathematica Efficiency)] http://mathematica.stackexchange.com/questions/108798/primes-race-mathematica-efficiency

I am currently working with a paper that deals with this concept of Prime Races. You essentially create a large list of prime numbers and then split that list into two teams. You are assigned to ...

- asked by Dops (10 votes), answered by bbgodfrey (6 votes)

—————————-

[Gathering of list] http://mathematica.stackexchange.com/questions/109104/gathering-of-list

Problem statement

The following challenge was recently posted to the J language programming forum by Skip Cave http://jsoftware.com/pipermail/programming/2016-March/044561.html

"The animal ...

- asked by murray (9 votes), answered by J. M. (13 votes)

================================== 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-schr%c3%b6dinger-equation

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

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

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

- asked by xslittlegrass (35 votes), answered by Jens (38 votes)

—————————-

[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 (4 votes), answered by Jens (12 votes)

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

[Mimicking Console and Output Matlab/Rstudio-Style Environment in Mathematica?] http://mathematica.stackexchange.com/questions/109179/mimicking-console-and-output-matlab-rstudio-style-environment-in-mathematica

I am trying to crudely approximate the RStudio or Matlab Workspace environment in Mathematica by having a specific notebook function as the "console notebook" where I execute commands and another ...

- asked by user13999 (6 votes)

—————————-

[What is the equivalent of $ModuleNumber for DynamicModule] http://mathematica.stackexchange.com/questions/108850/what-is-the-equivalent-of-modulenumber-for-dynamicmodule

Mathematica provides access to $ModuleNumber which can be enormously useful.

Unfortunately I can’t find the equivalent for DynamicModule.

I know such a parameter must exist for two reasons:

First, ...

- asked by MB1965 (8 votes)

—————————-

[Why this expression is not evaluated correctly?] http://mathematica.stackexchange.com/questions/109310/why-this-expression-is-not-evaluated-correctly

Look at the following code:

f[kx_, ky_] := -1*(Exp[I*kx] + 2*Exp[-I*kx/2]*Cos[Sqrt[3]*ky/2]); 
H = {{1, f[kx, ky]}, {Conjugate[f[kx, ky]], -1}}; 
D[Norm[Normalize[Eigensystem[H][[2]][[1]]]], kx] /. {kx  ...

- asked by Chong Wang (1 vote)

5.44 Tuesday, March 1, 2016

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

[Typoglycemia text manipulation] http://mathematica.stackexchange.com/questions/108563/typoglycemia-text-manipulation

I was just reading the article: https://en.wikipedia.org/wiki/Typoglycemia

"... readers can understand the meaning of words in a sentence even when the interior letters of each word are scrambled ...

- asked by mrz (20 votes), answered by J. M. (15 votes)

—————————-

[Version inconsistency with optional arguments: what if the default value doesn’t match the pattern?] http://mathematica.stackexchange.com/questions/108636/version-inconsistency-with-optional-arguments-what-if-the-default-value-doesnt

I just came across some weird behaviour. Take this function definition:

ClearAll[f] 
f[vs_List : All] := "match"

The default value of vs is All. Now think about what f[] should return. Should it ...

- asked by Szabolcs (18 votes), answered by Mr.Wizard (12 votes)

—————————-

[Reproducing a ranking function that behaves like Excel’s RANK] http://mathematica.stackexchange.com/questions/108309/reproducing-a-ranking-function-that-behaves-like-excels-rank

I tried to find a function or expression in Mathematica that produces the same output as the RANK function in Excel (see its description here), but unfortunately I could not find an existing one.

For ...

- asked by M.Basel (14 votes), answered by TomD (18 votes)

—————————-

[Given a large binary matrix, find the largest submatrix containing non-zero elements] http://mathematica.stackexchange.com/questions/108299/given-a-large-binary-matrix-find-the-largest-submatrix-containing-non-zero-elem

I’m looking for a way to reduce a binary matrix containing zeros at some positions into a matrix that contains no zeros by deleting rows and columns of the original matrix until only non-zero values ...

- asked by tavr (13 votes), answered by unlikely (4 votes)

—————————-

[Generating a list of numbers that are not multiples of 4] http://mathematica.stackexchange.com/questions/108502/generating-a-list-of-numbers-that-are-not-multiples-of-4

I want to write simple code that will list all numbers from \(1\) to \(n\) that are not multiples of \(4\).

And in this case I consider that

n=100 
 
For[i = 1, i &lt;= n, i++, If[Mod[i, 4] != 0,  ...

- asked by Mariam (12 votes), answered by Mr.Wizard (15 votes)

—————————-

[Can Mathematica convert a RegularExpression into a StringExpression or vice-versa?] http://mathematica.stackexchange.com/questions/108481/can-mathematica-convert-a-regularexpression-into-a-stringexpression-or-vice-vers

I know that Mathematica can perform string comparison using either StringExpression or RegularExpression. Although regular expressions are more common, I feel that the Mathematica StringExpressions ...

- asked by Denis Cousineau (12 votes)

—————————-

[What options and settings can be used to create print quality typeset documents with Mathematica?] http://mathematica.stackexchange.com/questions/108553/what-options-and-settings-can-be-used-to-create-print-quality-typeset-documents

If I am proficient on dedicated typesetting software (e.g. LaTeX) it makes sense to use that for typesetting but if I am not how can I use Mathematica to create good quality documents.

The question ...

- asked by Mike Honeychurch (11 votes), answered by Mike Honeychurch (17 votes)

================================== 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 \(y\) axis. How can I have two different axis?

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

- asked by 500 (97 votes), answered by ArgentoSapiens (92 votes)

—————————-

[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 ...

- asked by chyaong (43 votes), answered by Mr.Wizard (66 votes)

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

[Prepending a sequence with zeros gives ‘FindGeneratingFunction‘ hard time] http://mathematica.stackexchange.com/questions/108451/prepending-a-sequence-with-zeros-gives-findgeneratingfunction-hard-time

Asking for

FindGeneratingFunction[{1, 3, 11, 43, 171, 683, 2731, 10923, 43691, 174763}, t] 
 
 
gives the answer (namely (1 - 2 t)/(1 - 5 t + 4 t^2)) almost immediately. 
However if I prepend zeros in  ...

- asked by (3 votes)

—————————-

[Obtaining a Previously Constructed Function as Desired Output] http://mathematica.stackexchange.com/questions/108373/obtaining-a-previously-constructed-function-as-desired-output

I was playing around with some Generalized Trigonometric Functions defined as follows;

 w[n_] := E^((2*\[Pi]*I)/n) 
 
 Ncos[n_, x_] := Expand[(1/n)*Sum[E^(x*w[2 n]^(2 k + 1)), {k, 0, n - 1}]]

...

- asked by Eleven-Eleven (3 votes)

—————————-

[The implementation of FunctionRange] http://mathematica.stackexchange.com/questions/108308/the-implementation-of-functionrange

How exactly does the FunctionRange work? What kind of algorithm does it use? I looked it up in the manual but it doesn’t provide any references or even a name of the algorithm.

It also accepts a ...

- asked by pwl (3 votes)

5.45 Tuesday, February 23, 2016

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

[++ 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 ...

- asked by Giovanni Resta (30 votes), answered by Mr.Wizard (23 votes)

[Apply multiple functions to same list] http://mathematica.stackexchange.com/questions/107721/apply-multiple-functions-to-same-list

I’d like to get the Min, Max, Median, Mean, etc. for the same list. For now I’m doing the following:

y = {1, 2, 3, 4, 5, 6, 7}; 
Map[{Max[#] , Min[#] , Median[#], Mean[#]} &amp;, y, {0}]

It seems ...

- asked by Mitchell Kaplan (15 votes), answered by Bob Hanlon (18 votes)

—————————-

[How do I delete all items that occur more than once?] http://mathematica.stackexchange.com/questions/107483/how-do-i-delete-all-items-that-occur-more-than-once

DeleteDuplicates works fine but leaves a single copy of the duplicated item. 
I need to remove all items that occur more than once i.e. 
{{1,2},{1,2},{3,4}} -> {3,4}. There must be a one-liner.

- asked by Boris (12 votes), answered by Leonid Shifrin (16 votes)

[Puzzle with Mathematica] http://mathematica.stackexchange.com/questions/107859/puzzle-with-mathematica

Hello everyone, This is a puzzle I got from someone via social media. Basically, we need to fill up the boxes with the numbers 1-9 (no repetitions) that fit the multiplication and addition ...

- asked by iFikr (11 votes), answered by unlikely (13 votes)

[Finite Element Method and ElementMeshInterpolation issue in v10.3] http://mathematica.stackexchange.com/questions/107668/finite-element-method-and-elementmeshinterpolation-issue-in-v10-3

I recently installed Mathematica v10.3 and checked a project I was working on few months ago under Mathematica v10.1.

In this project I solve a PDE with NDSolve and Finite Element Method over a 2D ...

- asked by unlikely (10 votes), answered by Jason B (8 votes)

[Efficient way to make subsets of list with placeholders] http://mathematica.stackexchange.com/questions/107517/efficient-way-to-make-subsets-of-list-with-placeholders

I have an arbitrary list of unique elements:

lst = {a, b, c, d} 
 
 
Documentation allows finding subsets with same number of elements, say 2: 
 
Subsets[lst, {2}] 
(* {{a, b}, {a, c}, {a, d}, {b, c}, {b,  ...

- asked by garej (10 votes), answered by Dr. belisarius (10 votes)

[Double Sum Involving Condition] http://mathematica.stackexchange.com/questions/107652/double-sum-involving-condition

I would like to compute the dimensions of some small free nilpotent Lie algebras. However, I am totally new to this and I could not figure out how to write the double sum which gives the dimension of ...

- asked by Can Hatipoglu (9 votes), answered by J. M. (13 votes)

================================== 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 ...

- asked by wxffles (42 votes), answered by Per Alexandersson (27 votes)

[Calling Correct Function for Plotting DiracDelta] http://mathematica.stackexchange.com/questions/3506/calling-correct-function-for-plotting-diracdelta

I am wondering what is the correct function in Mathematica to plot the true impulse function, better known as the DiracDelta[] function. When using this inside of a function or just the function ...

- asked by night owl (11 votes), answered by Heike (13 votes)

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

[How many clusters does DominantColors return?] http://mathematica.stackexchange.com/questions/107842/how-many-clusters-does-dominantcolors-return

Is there any documentation on how it automatically chooses the number of colors - does it use X-means?

- asked by M.R. (3 votes)

[Using GNU Make to compile MathLink program automatically removes a file] http://mathematica.stackexchange.com/questions/107863/using-gnu-make-to-compile-mathlink-program-automatically-removes-a-file

It’s possible that this question belongs on Stackoverflow; however, the Mathematica context may be important so I’m asking here first.

I am working on a project to interact with sensors connected to ...

- asked by bobthechemist (1 vote)

[Why does Solve work in v9.0.1 but not in v10.3.1] http://mathematica.stackexchange.com/questions/107585/why-does-solve-work-in-v9-0-1-but-not-in-v10-3-1

I want to solve the following DE \[ P'=k(M-P)P, P[0]=53.08, P[50]=23.192, P[100]=76.212.\] The Mathematica command is

sol1 = DSolve[P'[t] == k (M - P[t]) P[t], P[t], t] 
 
P[t_] = sol1[[1,1,2]]

sol2 ...

- asked by xpaul (4 votes)

5.46 Tuesday, February 16, 2016

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

[Why does Mathematica report that \(\int _1^\infty \frac {\sin (\sqrt {x})}{\sqrt {x}}dx\) = \(2\cos (1)\)?] http://mathematica.stackexchange.com/questions/106162/why-does-mathematica-report-that-int-1-infty-frac-sin-sqrtx-sqrtxdx

Bug introduced in 7.0 or earlier and persisting through 10.3.1 or later

Mathematica 10 gives the following very odd result,

Integrate[Sin[Sqrt[x]]/Sqrt[x], {x, 1, Infinity}] 
(* 2 Cos[1] *)

which seems ...

- asked by JEM (30 votes)

—————————-

[How was Mathematica built?] http://mathematica.stackexchange.com/questions/106020/how-was-mathematica-built

I’ve been wondering this for a while now: How was Mathematica built?

Is it written in Haskell? C++? I’d love to get a taste of the wizardry behind this incredible software.

- asked by Chet (14 votes), answered by Sjoerd C. de Vries (19 votes)

—————————-

[How can one manually change the rule ordering] http://mathematica.stackexchange.com/questions/106068/how-can-one-manually-change-the-rule-ordering

I have a function which has some general behaviour, but that should act on some specific kinds of objects in some other way. I know that Mathematica is supposed to automatically order the rules so ...

- asked by Lior Blech (14 votes), answered by Mr.Wizard (15 votes)

—————————-

[What governs images resizing in the FrontEnd environment] http://mathematica.stackexchange.com/questions/106204/what-governs-images-resizing-in-the-frontend-environment

What is responsible for the middle Row images’ size? And why single image row is different?

{#, Row[{#, #}], Row[{#}]} &amp; @ RandomImage[1, {100, 100}]

I know I can prevent that with mapping ...

- asked by Kuba (13 votes), answered by Jason B (9 votes)

—————————-

[How to report a bug in Mathematica] http://mathematica.stackexchange.com/questions/106227/how-to-report-a-bug-in-mathematica

I found two bugs in Mathematica (10.3 and 10.1) and I need to report it. Is there any tools to do that or section on Wolfram website?

- asked by Developer2000 (12 votes), answered by Szabolcs (17 votes)

—————————-

[Reproduce image effect in Mathematica] http://mathematica.stackexchange.com/questions/106165/reproduce-image-effect-in-mathematica

How do I create the "dotifying" effect below in Mathematica?

I have tried to use Rasterize first to get the image pixelated, but how do I get the disc/circle pattern then?

image :=  ...

- asked by macurie (12 votes), answered by rhermans (17 votes)

—————————-

[How to make a CahnHilliard model GIF] http://mathematica.stackexchange.com/questions/106333/how-to-make-a-cahn-hilliard-model-gif

The question derived from @Jason B ’s answer.I wanna make it but don’t how to do. But we can get some rule about the GIF

The change of the total pixel is very small.

imagelist =  ...

- asked by yode (10 votes), answered by MarcoB (15 votes)

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

[Generating visually pleasing circle packs] http://mathematica.stackexchange.com/questions/40334/generating-visually-pleasing-circle-packs

EDIT: (my conclusion and thank you note) I want to thank you all guys for this unexpected intellectual and artistic journey. Hope you had fun and enjoyed it the same as I did.

I would like to ...

- asked by VividD (89 votes), answered by level1807 (53 votes)

—————————-

[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 \(\frac {1}{\sqrt {4 z^2 + 4 z + 3}}\) over the unit circle counterclockwise for each branch of the integrand?

- asked by user64494 (20 votes), answered by Artes (39 votes)

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

[Extracting control points from BezierFunction] http://mathematica.stackexchange.com/questions/107435/extracting-control-points-from-bezierfunction

given a Bezier surface, is there a simple way to express \(g_{12}\) (from the First fundamental form) again in Bezier form?

More precisely, I have control points and a Bezier function \(f\):

cps = {{{0,  ...

- asked by Osmihran (1 vote)

—————————-

[Order of importing data from files] http://mathematica.stackexchange.com/questions/106296/order-of-importing-data-from-files

I have many text files numbered from 1 to 1 million in numerical order. Within each text file is 5 columns of data (TAB spaced) with many rows. I effectively want to take the minimum value from each ...

- asked by David (1 vote)

—————————-

[WolframScript Unix - Script Parameters on Raspberry Pi] http://mathematica.stackexchange.com/questions/107436/wolframscript-unix-script-parameters-on-raspberry-pi

I’m currently trying to run a script with 2 parameters which gets called via a BASH script. The script runs fine however the list of passed parameters , $ScriptCommandLine, always stays empty.

...

- asked by TheCheatsrichter (2 votes)

5.47 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 ...

- asked by wolfies (15 votes), answered by Mr.Wizard (18 votes)

—————————-

[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 ...

- asked by Alexei Boulbitch (12 votes), answered by Michael E2 (7 votes)

—————————-

[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

\[q \cdot \left (p'\times B\right ) + q\cdot E = m \]

- asked by triplebig (11 votes), answered by Sjoerd C. de Vries (11 votes)

—————————-

[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 ...

- asked by M. Tissier (11 votes), answered by Mr.Wizard (13 votes)

—————————-

[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 
and TrigToRadicals

However for each ...

- asked by Alexei Boulbitch (10 votes), answered by Jens (5 votes)

—————————-

[Plot of \(sin(x^x)\) is missing from \(x=143\)] http://mathematica.stackexchange.com/questions/105774/plot-of-sinxx-is-missing-from-x-143

When plotting the graph of \(\sin (x^x)\) I noticed that there is no plot from about \(x=143\). I don’t suppose there is a purely mathematical explanation for this?

So, why is there no graph in ...

- asked by Imre Vegh (10 votes), answered by MarcoB (22 votes)

—————————-

[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?

- asked by C. Tamaro (8 votes), answered by John Conor Cosnett (9 votes)

================================== 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?

- asked by niklasfi (37 votes), answered by Artes (31 votes)

—————————-

[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,  ...

- asked by mathe (22 votes), answered by Bob Hanlon (17 votes)

================================== 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 ...

- asked by Emilio Pisanty (3 votes)

—————————-

[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 ...

- asked by user37299 (2 votes)

—————————-

[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[ 
 ...

- asked by drN (3 votes)

5.48 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 ...

- asked by Alexey Popkov (20 votes), answered by Sjoerd C. de Vries (6 votes)

—————————-

[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 ...

- asked by M.R. (17 votes), answered by blochwave (22 votes)

—————————-

[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 ...

- asked by Kiro (13 votes), answered by Kuba (12 votes)

—————————-

[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 ...

- asked by Kuba (11 votes), answered by Coolwater (7 votes)

—————————-

[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 ...

- asked by Mr S 100 (11 votes), answered by Jens (12 votes)

—————————-

[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]; 
 ...

- asked by yode (11 votes), answered by nikie (7 votes)

—————————-

[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 ...

- asked by Jenny (10 votes), answered by John Conor Cosnett (17 votes)

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

[Is there a syntax for single-line comments for notebooks?] http://mathematica.stackexchange.com/questions/1496/is-there-a-syntax-for-single-line-comments-for-notebooks

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

- asked by Peeter Joot (37 votes), answered by Szabolcs (43 votes)

—————————-

[Advice for Mathematica as Mathematician’s Aid] http://mathematica.stackexchange.com/questions/92686/advice-for-mathematica-as-mathematicians-aid

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

- asked by CarlEdman (56 votes), answered by MarcoB (39 votes)

================================== 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 ...

- asked by M.R. (4 votes)

—————————-

[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_,  ...

- asked by Xiao (3 votes)

—————————-

[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[\"  ...

- asked by Ymareth (2 votes)

5.49 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 ...

- asked by halirutan (37 votes), answered by halirutan (38 votes)

—————————-

[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 ...

- asked by pvanbijnen (25 votes), answered by David G. Stork (9 votes)

—————————-

[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 ...

- asked by Andy C. (12 votes), answered by Mark Adler (13 votes)

—————————-

[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.

...

- asked by hesam (12 votes), answered by Chris K (9 votes)

—————————-

[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  ...

- asked by Zorngo (12 votes), answered by Kuba (10 votes)

—————————-

[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 ...

- asked by vikram reddy (10 votes), answered by Kuba (11 votes)

—————————-

[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 ...

- asked by Stefano (9 votes), answered by nikie (9 votes)

================================== 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,  ...

- asked by mathe (22 votes), answered by Bob Hanlon (17 votes)

—————————-

[Advice for Mathematica as Mathematician’s Aid] http://mathematica.stackexchange.com/questions/92686/advice-for-mathematica-as-mathematicians-aid

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

- asked by CarlEdman (56 votes), answered by MarcoB (39 votes)

================================== 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 ...

- asked by Eli Morris (4 votes)

—————————-

[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, \(B_{n,i}\) denotes Bernstein-basis.

vec1 = {B[0],...,B[m]}; 
mat = {{P[0,0],...P[0,n]},...,{P[m,0],...P[m,n]}}; 
vec2=  ...

- asked by Shutao TANG (2 votes)

—————————-

[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 ...

- asked by Alexei Boulbitch (3 votes)

5.50 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 ...

- asked by Jason B (11 votes), answered by Kuba (14 votes)

—————————-

[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] ...

- asked by matheorem (10 votes), answered by Mr.Wizard (7 votes)

—————————-

[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 ...

- asked by Philo (9 votes), answered by Szabolcs (14 votes)

—————————-

[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 ...

- asked by Shutao TANG (8 votes), answered by Mr.Wizard (2 votes)

—————————-

[Using Solve to solve the equation \(x^{1/3}=-1\)] 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  ... 

- asked by David (8 votes), answered by Jens (13 votes)

—————————-

[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,  ...

- asked by d8uv (8 votes), answered by d8uv (9 votes)

—————————-

[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;  ...

- asked by Murta (7 votes)

================================== 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,  ...

- asked by mathe (22 votes), answered by Bob Hanlon (16 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? ==================================

[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 ...

- asked by matheorem (2 votes)

—————————-

[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 ...

- asked by Michael (3 votes)

5.51 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 ...

- asked by David Zhang (13 votes), answered by Adam Strzebonski (16 votes)

—————————-

[ReplaceAll with Associations instead of Rules] http://mathematica.stackexchange.com/questions/103497/replaceall-with-associations-instead-of-rules

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

- asked by Gustavo Delfino (13 votes), answered by Edmund (4 votes)

—————————-

[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, ...

- asked by jjstankowicz (11 votes), answered by bbgodfrey (15 votes)

—————————-

[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 ...

- asked by tsuresuregusa (10 votes), answered by user21 (5 votes)

—————————-

[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 ...

- asked by Nasser (10 votes), answered by Mike Honeychurch (11 votes)

—————————-

[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 =  ...

- asked by tparker (9 votes), answered by Alexei Boulbitch (12 votes)

—————————-

[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 \(z\approx i\). (Just to be clear, I’m not trying to write a ...

- asked by Jerry Guern (9 votes), answered by bbgodfrey (10 votes)

================================== 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 \(\frac {1}{\sqrt {4 z^2 + 4 z + 3}}\) over the unit circle counterclockwise for each branch of the integrand?

- asked by user64494 (20 votes), answered by Artes (39 votes)

—————————-

[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 ...

- asked by Nakilon (30 votes), answered by nikie (49 votes)

================================== 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 \(f\) with coordinates \(x_i\), and unknown parameters \(\delta _i\)’s and \(t\). Let this system be defined as,

...

- asked by user19218 (3 votes)

—————————-

[‘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 ...

- asked by buzhidao (2 votes)

—————————-

[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 ...

- asked by Pace Nielsen (4 votes)

5.52 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, ...

- asked by QuantumDot (10 votes), answered by jkuczm (11 votes)

—————————-

[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 ...

- asked by Nasser (8 votes), answered by Jens (10 votes)

—————————-

[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, ...

- asked by Manuel Odendahl (7 votes), answered by Leonid Shifrin (9 votes)

—————————-

[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 ...

- asked by becko (7 votes), answered by eldo (13 votes)

—————————-

[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 \[\bigl (r''(\phi )r(\phi ) - r'(\phi )^2\bigr )\bigl (b + r(\phi )\bigr ) = r(\phi )\bigl (r'(\phi )^2 + r(\phi )^2\bigr )\] Here \(b\) and \(r\) are lengths, and \(\phi \) is an angle (in radians, so ...

- asked by David Z (7 votes), answered by bbgodfrey (2 votes)

—————————-

[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",  ...

- asked by Ronald Monson (7 votes), answered by Paco Jain (3 votes)

—————————-

[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]; ...

- asked by M.R. (7 votes), answered by eldo (0 votes)

================================== 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,

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

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

- asked by xslittlegrass (33 votes), answered by Jens (36 votes)

—————————-

[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, ...

- asked by Istvan Zachar (124 votes), answered by Heike (105 votes)

================================== 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 ...

- asked by Tobias Nash (2 votes)

—————————-

[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 ...

- asked by Igor Kotelnikov (5 votes)

—————————-

[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;@ 
  ...

- asked by Xiao (2 votes)

Chapter 6
Year 2015

6.1 Tuesday, December 29, 2015
6.2 Tuesday, December 22, 2015
6.3 Tuesday, December 15, 2015
6.4 Tuesday, December 8, 2015
6.5 Tuesday, December 1, 2015
6.6 Tuesday, November 24, 2015
6.7 Tuesday, November 17, 2015
6.8 Tuesday, November 10, 2015
6.9 Tuesday, November 3, 2015
6.10 Tuesday, October 27, 2015
6.11 Tuesday, October 20, 2015
6.12 Tuesday, October 13, 2015
6.13 Tuesday, October 6, 2015
6.14 Tuesday, September 29, 2015
6.15 Tuesday, September 22, 2015
6.16 Tuesday, September 15, 2015
6.17 Tuesday, September 8, 2015
6.18 Tuesday, September 1, 2015
6.19 Tuesday, August 25, 2015
6.20 Tuesday, August 18, 2015
6.21 Tuesday, August 11, 2015
6.22 Tuesday, August 4, 2015
6.23 Tuesday, July 28, 2015
6.24 Tuesday, July 21, 2015
6.25 Tuesday, July 14, 2015
6.26 Tuesday, July 7, 2015
6.27 Tuesday, June 30, 2015
6.28 Tuesday, June 23, 2015
6.29 Tuesday, June 16, 2015
6.30 Tuesday, June 9, 2015
6.31 Tuesday, June 2, 2015
6.32 Tuesday, May 26, 2015
6.33 Tuesday, May 19, 2015
6.34 Tuesday, May 12, 2015
6.35 Tuesday, May 5, 2015
6.36 Tuesday, April 28, 2015
6.37 Tuesday, April 21, 2015
6.38 Tuesday, April 14, 2015
6.39 Tuesday, April 7, 2015
6.40 Tuesday, March 31, 2015
6.41 Tuesday, March 24, 2015
6.42 Tuesday, March 17, 2015
6.43 Tuesday, March 10, 2015
6.44 Tuesday, March 3, 2015
6.45 Tuesday, February 17, 2015
6.46 Tuesday, February 17, 2015
6.47 Tuesday, February 10, 2015
6.48 Tuesday, February 3, 2015
6.49 Tuesday, January 27, 2015
6.50 Tuesday, January 20, 2015
6.51 Tuesday, January 13, 2015
6.52 Tuesday, January 6, 2015

6.1 Tuesday, December 29, 2015

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

[\(\sum _{k=1}^{\infty } \left \lfloor \frac {5}{5^k}\right \rfloor \) giving wrong answer?] http://mathematica.stackexchange.com/questions/102722/sum-k-1-infty-left-lfloor-frac55k-right-rfloor-giving-wrong-ans

When I try to evaluate the following:

\[\sum _{k=1}^{\infty } \Bigg \lfloor \frac {5}{5^k}\Bigg \rfloor \]

using

Sum[Floor[5/5^k], {k, 1, \[Infinity]}]

Mathematica provides an answer of \(0\) when it ...

- asked by 1110101001 (14 votes), answered by ttetrafon (-4 votes)

—————————-

[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 ...

- asked by Robert B (10 votes), answered by eldo (3 votes)

—————————-

[Prevent Plus from threading] http://mathematica.stackexchange.com/questions/102721/prevent-plus-from-threading

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

- asked by Rahul (10 votes), answered by JHM (5 votes)

—————————-

[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*), 
              ...

- asked by QuantumDot (9 votes), answered by Schopenhauer (7 votes)

—————————-

[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 \(RevolutionPlot3D[f,\lbrace {t,t_1} \rbrace ]\), but I think there is no \(f\) for Koch Snowflake.

Sorry for my ...

- asked by vito (9 votes), answered by ubpdqn (11 votes)

—————————-

[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 ...

- asked by murphy (8 votes), answered by Mark Adler (4 votes)

—————————-

[Bug? Completely wrong results from NSolve] http://mathematica.stackexchange.com/questions/102724/bug-completely-wrong-results-from-nsolve

The following code creates two polynomials \(q_1\) and \(q_2\) in variables \(c\) and \(p\), then uses NSolve to find roots. But the polynomials don’t evaluate to zero at those roots.

pp[n_] := If[n &gt; 0,  ...

- asked by Jerry Guern (8 votes), answered by Rom38 (6 votes)

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

[Advice for Mathematica as Mathematician’s Aid] http://mathematica.stackexchange.com/questions/92686/advice-for-mathematica-as-mathematicians-aid

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

- asked by CarlEdman (55 votes), answered by MarcoB (39 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. (386 votes), answered by faysou (354 votes)

================================== 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 ...

- asked by Erdem (3 votes)

—————————-

[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 ...

- asked by Tyler Durden (4 votes)

6.2 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;  ...

- asked by Jess Riedel (17 votes), answered by Kuba (14 votes)

—————————-

[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 ...

- asked by M.R. (15 votes), answered by Szabolcs (11 votes)

—————————-

[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?

- asked by Mike Honeychurch (14 votes), answered by Mike Honeychurch (14 votes)

—————————-

[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 ...

- asked by kukako-muka (14 votes)

—————————-

[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 ...

- asked by Szabolcs (14 votes), answered by Leonid Shifrin (11 votes)

—————————-

[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 -  ...

- asked by matheorem (12 votes), answered by Karsten 7. (11 votes)

—————————-

[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 ...

- asked by Hugh (11 votes), answered by user21 (2 votes)

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

[Upgrade to Windows 10] http://mathematica.stackexchange.com/questions/89407/upgrade-to-windows-10

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

- asked by Lubos Motl (38 votes), answered by RunnyKine (32 votes)

—————————-

[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

- asked by Tom Wellington (39 votes), answered by programming_historian (20 votes)

================================== 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 ...

- asked by M.R. (2 votes)

—————————-

[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 ...

- asked by Physics Moron (3 votes)

—————————-

[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 ...

- asked by yode (6 votes)

6.3 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 ...

- asked by Jason B (21 votes), answered by Jason B (25 votes)

—————————-

[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 \(f(a,b) = (a-b)\ln (a-b)\), ...

- asked by QuantumDot (12 votes), answered by Kuba (11 votes)

—————————-

[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;  ...

- asked by Kuba (12 votes), answered by Kuba (5 votes)

—————————-

[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 = ...

- asked by M.R. (12 votes), answered by Jason B (7 votes)

—————————-

[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,  ...

- asked by ciao (11 votes)

—————————-

[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 ...

- asked by Matteo S (10 votes), answered by nikie (16 votes)

—————————-

[Is mathematica’s right click menu customizable to add Simplify tools?] http://mathematica.stackexchange.com/questions/101684/is-mathematicas-right-click-menu-customizable-to-add-simplify-tools

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

- asked by matheorem (10 votes), answered by Karsten 7. (7 votes)

================================== 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 ...

- asked by J. M. (382 votes), answered by faysou (348 votes)

—————————-

[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, \(a\) and \(b\), 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( 
$$

- asked by George Mills (20 votes), answered by Jens (27 votes)

================================== 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 \(P(x)\) 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:

\[f(z) = \frac {\pi ^2 \cot (\pi \sqrt z) \cot (\pi \sqrt {z-a})}{4\sqrt {z^2 - az}}\]

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)

—————————-

[How to add symbols to autocompletion list] http://mathematica.stackexchange.com/questions/101871/how-to-add-symbols-to-autocompletion-list

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

- asked by QuantumDot (4 votes)

6.4 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 ...

- asked by ibeatty (12 votes), answered by ZachB (3 votes)

—————————-

[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?

- asked by David (12 votes), answered by Peter Roberge (12 votes)

—————————-

[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 ...

- asked by Alexey Golyshev (10 votes), answered by Alexey Golyshev (4 votes)

—————————-

[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] 
 
 
Returns "21" instead of "`2`". 
 
How can I get the correct result ? 
 
Of course a solution would be to use  ...

- asked by faysou (8 votes), answered by Kuba (5 votes)

—————————-

[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 ...

- asked by dimitris (8 votes), answered by Kuba (10 votes)

—————————-

[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 ...

- asked by MYG (8 votes), answered by Graumagier (4 votes)

—————————-

[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 ...

- asked by garej (7 votes), answered by Peter Roberge (1 vote)

================================== 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

- asked by Tom Wellington (38 votes), answered by programming_historian (20 votes)

—————————-

[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 ...

- asked by Simpleton Jack (236 votes), answered by mikuszefski (360 votes)

================================== 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 ...

- asked by George Wolfe (4 votes)

—————————-

[Theorem Proving]http://mathematica.stackexchange.com/questions/101201/theorem-proving

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_] :=  ...

- asked by rattrapper (5 votes)

—————————-

[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 ...

- asked by Karsten 7. (3 votes)

6.5 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,  ... 
 
- asked by   (12 votes), answered by Michael E2 (7 votes)

—————————-

[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 ...

- asked by Kuba (11 votes)

—————————-

[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, ...

- asked by holistic (11 votes), answered by eldo (11 votes)

—————————-

[A quicker than outer] http://mathematica.stackexchange.com/questions/100551/a-quicker-than-outer

I need to get a matrix \(\{a(x_i-x_j)\}\), where \(x_i\) form a partition of an interval, \(a(x)\) is a given function. I use

In[67]:= a[x_?NumericQ] := N[Exp[-Abs[x]]]; 
         x = Table[-10 + 0.02 (j -  ...

- asked by Dmitri (11 votes), answered by Szabolcs (14 votes)

—————————-

[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: 
 
 ...

- asked by David (9 votes), answered by eldo (14 votes)

—————————-

[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, ...

- asked by Ackaran (9 votes), answered by Karsten 7. (13 votes)

—————————-

[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 ...

- asked by Edmund (9 votes), answered by nikie (4 votes)

================================== 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] 
 ...

- asked by Prashant Bhate (24 votes), answered by Simon (28 votes)

—————————-

[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 ...

- asked by Margus (52 votes), answered by Daniel Lichtblau (56 votes)

================================== 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 \(2n\) equations appeared to be more efficient than using mathematical results on the solutions to reduce the problem to \(n\) equations (the \(n\) ...

- asked by anderstood (2 votes)

—————————-

[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 ...

- asked by jaimehrubiks (2 votes)

—————————-

[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 ...

- asked by Kristina (3 votes)

6.6 Tuesday, November 24, 2015

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

[Is Mathematica worth it for me?] http://mathematica.stackexchange.com/questions/100072/is-mathematica-worth-it-for-me

I’m 13 years old and in 7th grade. I’m currently in Algebra 1, and I have fallen in love with both math and programming.

When I came upon Mathematica, it was awesome. My two favorite things fused ...

- asked by TreFox (50 votes), answered by Pillsy (33 votes)

—————————-

[GroupBy twice gives different results] http://mathematica.stackexchange.com/questions/100139/groupby-twice-gives-different-results

update: confirmed as a bug related to ’N’ when using GroupBy or GatherBy. It is a bug at least since version 7

It took me quite a lot of time to finally trace down to this strange output. I really ...

- asked by matheorem (25 votes), answered by Patrick Stevens (15 votes)

—————————-

[How to make a blob in 3D?] http://mathematica.stackexchange.com/questions/99754/how-to-make-a-blob-in-3d

I am trying to make a blob like the one shown below, but in 3D so I can rotate it. I’m trying to use ParametricPlot3D or SphericalPlot3D. I can make a sphere easily. But my knowledge of how to modify ...

- asked by Michael McCain (20 votes), answered by Eric Towers (12 votes)

—————————-

[Coordinate system transformation problem (about Euler angle)] http://mathematica.stackexchange.com/questions/100054/coordinate-system-transformation-problem-about-euler-angle

This question comes from the work that constructing the general cylinder by the NURBS. I have implemented the point-set \(P_1,P_2,\cdots ,P_n\) that in the \(O-xyz\) plane, now I want to implement the ...

- asked by Shutao TANG (14 votes), answered by J. M. (9 votes)

—————————-

[List of symbols marked [[EXPERIMENTAL]] in the documentation] http://mathematica.stackexchange.com/questions/100058/list-of-symbols-marked-experimental-in-the-documentation

Some of the built-in Wolfram Language symbols are marked as [[EXPERIMENTAL]] in the documentation. For example

[Echo]

How can I get a list of all the symbols marked as [[EXPERIMENTAL]]?

(This ...

- asked by Karsten 7. (14 votes), answered by Karsten 7. (20 votes)

—————————-

[Random letters: What is the chance, that true words are coming?] http://mathematica.stackexchange.com/questions/99800/random-letters-what-is-the-chance-that-true-words-are-coming

Suppose, that we are just typing random letters with our keyboards(we use space bar too). We don’t make difference between big and small letters. If we work for a long time, how much from the words ...

- asked by Arquis (13 votes), answered by belisarius has settled (18 votes)

—————————-

[How to take and evaluate a specific part of a list without evaluating the rest?] http://mathematica.stackexchange.com/questions/100217/how-to-take-and-evaluate-a-specific-part-of-a-list-without-evaluating-the-rest

I have a large list, for example, 
 
lis = {x + y, x y, Sin[x] y + Exp[y], x^2 y} 
 
 
and its elements depend on variables x and y. Later I assign numerical values to x and y 
 
x = {1, 2, 3, 4, 5} 
y = {3,  ...

- asked by renphysics (9 votes), answered by Chris Degnen (9 votes)

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

[How to use Mathematica functions in Python programs?] http://mathematica.stackexchange.com/questions/4643/how-to-use-mathematica-functions-in-python-programs

I’d like to know how can I call Mathematica functions from Python.

I appreciate a example, for example, using the Mathematica function Prime.

I had search about MathLink but how to use it in Python ...

- asked by GarouDan (35 votes), answered by GarouDan (14 votes)

—————————-

[Mathematica sporadically crashes on open] http://mathematica.stackexchange.com/questions/32232/mathematica-sporadically-crashes-on-open

Sometimes, when I open Mathematica, while the opening splash screen still says "Initializing Kernel Connections", Windows will tell me that "Wolfram Mathematica 9 has stopped working". This will ...

- asked by William Kunkel (9 votes), answered by Bingo (5 votes)

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

[Can’t get Mathematica to Import PDF files with diacritics on the file name] http://mathematica.stackexchange.com/questions/99980/cant-get-mathematica-to-import-pdf-files-with-diacritics-on-the-file-name

Tested with versions 9.0.0, 10.0.2 and 10.3.0, all under OS X 10.10.5. 
 
The drag-and-drop front-end functionality also results in $Failed. 
 
Surprisingly, Importing, JPEGs, TXTs, and XLSX work just  ...

- asked by Aisamu (4 votes)

—————————-

[Where can I find documentation on use of special characters in templates?] http://mathematica.stackexchange.com/questions/100023/where-can-i-find-documentation-on-use-of-special-characters-in-templates

I am new to Templates.  I have seen the usage 
 
"\!\(\*StyleBox ...)" 
 
 
as here: disabling templates  What does the string "!(*" accomplish and 
can I find some documentation of this notation?

- asked by John McGee (1 vote)

—————————-

[Exponential Matrix Diffentiation] http://mathematica.stackexchange.com/questions/100214/exponential-matrix-diffentiation

I have been struggling with the following question while solving an optimization problem in \(\mathbb {R}_{+}^G\). Basically, I have \[\min _{y \in \mathbb {R}_{+}^G} F(y) = y^{T}\mathcal {K} + \exp (-y^{T} ... \]

- asked by Guilherme Thompson (1 vote)

6.7 Tuesday, November 17, 2015

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

[Terrifying performance decrease for contour/density plots in v10.1 -> 10.3] http://mathematica.stackexchange.com/questions/99255/terrifying-performance-decrease-for-contour-density-plots-in-v10-1-10-3

I setup for download a test dataset at http://www.inrim.it/~magni/cm.dat.gz (a set of 64800 triplets x,y,z).

The behavior can be reproduced with the following code:

link = ...

- asked by alessandro (24 votes), answered by Jason B (13 votes)

—————————-

[Cyclic Take function?] http://mathematica.stackexchange.com/questions/99188/cyclic-take-function

Is there some direct and simple "cyclic Take", sometimes also known as "overtake" in Mathematica. That is, if the take specification runs out of elements, it just cycles back to the beginning (as many ...

- asked by murray (21 votes), answered by kglr (22 votes)

—————————-

[Speeding up generation of block diagonal matrix] http://mathematica.stackexchange.com/questions/99467/speeding-up-generation-of-block-diagonal-matrix

I’m struggling with the following problem. I have \(48\) square matrices (full, filled with real machine precision numbers, thus are packed, all different) of size \(128\). I wolud like to place them on a ...

- asked by mmal (16 votes), answered by ybeltukov (14 votes)

—————————-

[Integrate returns imaginary answer for smooth, real function] http://mathematica.stackexchange.com/questions/99395/integrate-returns-imaginary-answer-for-smooth-real-function

Bug introduced in 7 or earlier and persisting through 10.3

I’m trying to evaluate the integral:

\[\int _0^{\infty } \frac {1}{4 b \sqrt {\pi } r} e^{-(b-r)^2}(e^{4 b r} - 1) \mathrm {d}r\]

with ...

- asked by Kevin Driscoll (15 votes)

—————————-

[Detecting an ellipse in a glaucoma photo] http://mathematica.stackexchange.com/questions/99578/detecting-an-ellipse-in-a-glaucoma-photo

For glaucoma diagnosis it is common to determine a "cup to disk ratio" which compares the diameter of the optic disk (VDD) and optic cup (VCD). The optical disk is visible as a circular red feature ...

- asked by indra ginanjar A.T (14 votes), answered by belisarius has settled (17 votes)

—————————-

[How to implement the general array broadcasting method from NumPy?] http://mathematica.stackexchange.com/questions/99171/how-to-implement-the-general-array-broadcasting-method-from-numpy

A friend of mine introduced array broadcasting in the Python NumPy package which is very convenient (and also highly efficient).

The idea is perfectly shown in this picture:

Basically, the method ...

- asked by matheorem (14 votes), answered by Pillsy (15 votes)

—————————-

[Derivative of a pure function with SlotSequence] http://mathematica.stackexchange.com/questions/99439/derivative-of-a-pure-function-with-slotsequence

I can live with this but I can’t figure out why the following is 0:

 
Derivative[1][f[##] &amp;][x] 
 
 
 
  0 
 
 
From documentation for Derivative: 
 
 
  [...] Whenever Derivative[n][f] is generated, the WL  ...

- asked by Kuba (14 votes), answered by Michael E2 (13 votes)

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

[Even Fibonacci numbers] http://mathematica.stackexchange.com/questions/37266/even-fibonacci-numbers

Today, I found the Euler Project. Problem #2 is

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:

1, ...

- asked by Shutao TANG (26 votes), answered by rcollyer (34 votes)

—————————-

[How can I plot the direction field for a differential equation?] http://mathematica.stackexchange.com/questions/8841/how-can-i-plot-the-direction-field-for-a-differential-equation

I’d like to plot the graph of the direction field for a differential equation, to get a feel for it. I’m a novice, right now, when it comes to plotting in Mathematica, so I’m hoping that someone can ...

- asked by Matt Groff (16 votes), answered by Peter Breitfeld (13 votes)

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

[Odd Coloring with GeoRegionValuePlot] http://mathematica.stackexchange.com/questions/99478/odd-coloring-with-georegionvalueplot

When I’m plotting data with GeoRegionValuePlot, I’m getting some strange coloring errors:

The grid included shows the top 10 countries with arable land per population. However, Australia is colored ...

- asked by DavisDude (1 vote)

—————————-

[Find regions in which the roots of a third degree polynomial are real] http://mathematica.stackexchange.com/questions/99167/find-regions-in-which-the-roots-of-a-third-degree-polynomial-are-real

I have to find the roots of a third degree polynomial in \(\phi \) that depends from 3 parameters, namely \(t,s,w\in \mathbb R\). In order to do that I’ve used the command Solve, in the following way:

...

- asked by Claretta (5 votes)

—————————-

[Works with example numbers, but not with variables alone] http://mathematica.stackexchange.com/questions/99575/works-with-example-numbers-but-not-with-variables-alone

 
The following code prints the correct solution for variable a (2.23). 
 
But if i comment out the 5 given example numbers on top it fails. 
If i remove some of the constraints at the bottom (&amp;&amp;  ...

- asked by JoDo (1 vote)

6.8 Tuesday, November 10, 2015

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

[How to draw cylinders inside a cube] http://mathematica.stackexchange.com/questions/98724/how-to-draw-cylinders-inside-a-cube

I want to create the following graphic (ignore the unit vectors).

What I do is the following (not the most elegent and smart way I guess:-)!):

1) Use the code below to generate randomly distributed ...

- asked by dimitris (23 votes), answered by ybeltukov (37 votes)

—————————-

[Sparse Cholesky Decomposition] http://mathematica.stackexchange.com/questions/98702/sparse-cholesky-decomposition

I am working with square matrices with a special form, which for 
large rank ($&gt; 100,000$) would be best stored and manipulated 
as a SparseArray.  I believe that the Cholesky decomposition of these  ...

- asked by Eric Brown (17 votes), answered by J. M. (16 votes)

—————————-

[Histogram3D with various colors and textures on cuboids’ faces] http://mathematica.stackexchange.com/questions/98687/histogram3d-with-various-colors-and-textures-on-cuboids-faces

I’m trying to produce an Histogram3D-like graph, but with a little more customization.

In particular I want to manually specify the color of each cuboid and to print some information on the top ...

- asked by glance (14 votes), answered by Taiki (10 votes)

—————————-

[Can anyone explain this weird Plot3D error?] http://mathematica.stackexchange.com/questions/98813/can-anyone-explain-this-weird-plot3d-error

This is more of a fun question because I see the source of the error, but cannot explain what Plot3D is doing. Can you figure it out?

L = 111; 
X = Table[{0, 0}, {n, 1, L}]; 
X3D[n_, m_] :=  ...

- asked by lynvie (13 votes), answered by Michael E2 (6 votes)

—————————-

[Piecewise imposes internal boundaries in NDSolve - is this expected?] http://mathematica.stackexchange.com/questions/98734/piecewise-imposes-internal-boundaries-in-ndsolve-is-this-expected

In the following code I used True as the predicate for DirichletCondition and found that the boundary condition was applied not only at the boundary of the specified region but also at the internal ...

- asked by Simon Woods (13 votes), answered by user21 (8 votes)

—————————-

[What is the difference between a .wl package and a .m package?] http://mathematica.stackexchange.com/questions/98981/what-is-the-difference-between-a-wl-package-and-a-m-package

In Mathematica 10.x, one now has both .wl Wolfram Language Packages and .m Wolfram Mathematica Packages.

What’s the difference? Is one of the two formats to be preferred in certain situations and, ...

- asked by murray (12 votes)

—————————-

[Defer, Hold, Unevaluated, Inactivate – which one when?] http://mathematica.stackexchange.com/questions/98874/defer-hold-unevaluated-inactivate-which-one-when

What are some guidelines on which function to select from among the superficially similar functions Defer, Hold, Unevaluated, and Inactivate?

Consider, for example:

Defer[Defer[Sum[1/k^2, {k, 1,  ...

- asked by murray (12 votes)

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

[Python-style plots in Mathematica] http://mathematica.stackexchange.com/questions/84877/python-style-plots-in-mathematica

I love making plots in Mathematica. And I love to spend a lot of time making high-quality plots that maximize readability and aesthetics. For most cases, Mathematica can make very beautiful images, ...

- asked by Pablo Galindo Salgado (49 votes), answered by halirutan (49 votes)

—————————-

[What are the most common pitfalls awaiting new users?] http://mathematica.stackexchange.com/questions/18393/what-are-the-most-common-pitfalls-awaiting-new-users

As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...

- asked by belisarius has settled (278 votes), answered by Michael E2 (148 votes)

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

[How do I determine which ChartElementDataFunction is Automatic?] http://mathematica.stackexchange.com/questions/98820/how-do-i-determine-which-chartelementdatafunction-is-automatic

In the course of exploring @kglr's answer to Edmund's question gain 
some insight into how I might answer my own question here, I came across the 
undocumented System`ChartElementData function, which  ...

- asked by Pillsy (7 votes)

—————————-

[Control Front End in "mathlink" mode] http://mathematica.stackexchange.com/questions/98686/control-front-end-in-mathlink-mode

Note: This question was already posted in the Wolfram community.

In a terminal math session, we can start a front end (FE) easily by launching it though LinkLaunch or by using functions provided in ...

- asked by halirutan (11 votes)

—————————-

[Multivariate Path Construction using Sobol numbers] http://mathematica.stackexchange.com/questions/98914/multivariate-path-construction-using-sobol-numbers

I am sharing my code,which I have tried to perform as per the instruction mentioned below. Please correct it so that I could get my output.

Instruction: Use the first m dimensions of the Sobol vector ...

- asked by Pankaj Mani (1 vote)

6.9 Tuesday, November 3, 2015

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

[Incorrect Timing of Total] http://mathematica.stackexchange.com/questions/98453/incorrect-timing-of-total

For demonstrating how fast C-compiled functions can be, in one of my courses I use the following function for finding the sum of a list of reals:

myTotal = Compile[{{lst, _Real, 1}},Module[{s=0.},  ...

- asked by Fred Simons (17 votes), answered by ilian (12 votes)

—————————-

[Aggregation queries on lists of associations in 10.3] http://mathematica.stackexchange.com/questions/98277/aggregation-queries-on-lists-of-associations-in-10-3

Bug introduced in 10.3

Some aggregation queries applied to a list of associations (or Dataset’s with this structure) lock up the front end or crash the kernel in Version 10.3.

xx = {&lt;|"a" -&gt;  ...

- asked by Daniel W (14 votes), answered by SquareOne (7 votes)

—————————-

[On making a graphical real-time memory usage monitor] http://mathematica.stackexchange.com/questions/98205/on-making-a-graphical-real-time-memory-usage-monitor

I’d like to make a graphical version of

Dynamic[Refresh[MemoryInUse[], UpdateInterval -&gt; 1]] 
 
 
A naive implementation would be something like: 
 
miu = {}; 
Dynamic[Refresh[ListPlot[AppendTo[miu,  ...

- asked by kjo (12 votes), answered by Karsten 7. (7 votes)

—————————-

[How to sort list of mixed types of elements with each type a specified canonical order?] http://mathematica.stackexchange.com/questions/98438/how-to-sort-list-of-mixed-types-of-elements-with-each-type-a-specified-canonical

For example, here is a list

{{1, "u"}, {6, "d"}, {3, "u"}, {4, "d"}, {2, "u"}, {5, "u"}, {3, 
  "d"}, {1, "d"}, {4, "u"}, {2, "d"}, {5, "d"}, {6, "u"}} 
 
 
The default canonical order for integer is  ...

- asked by matheorem (11 votes), answered by belisarius is forth (14 votes)

—————————-

[How do you concatenate matrices? And how do you make block matrices?] http://mathematica.stackexchange.com/questions/98406/how-do-you-concatenate-matrices-and-how-do-you-make-block-matrices

This is pretty trivial to do in Matlab, but I have not seen a function for it in Mathematica. Here is how you can do it with Join and Transpose. Is there an easier way to do it than this?

...

- asked by luke wendt (10 votes), answered by Taiki (12 votes)

—————————-

[Association Subtotals with Lists as Keys] http://mathematica.stackexchange.com/questions/98346/association-subtotals-with-lists-as-keys

I have the following Association:

as = &lt;|{5, 2, 1} -&gt; 3, {6, 1, 4} -&gt; 9, {5, 1, 9} -&gt; 12, {5, 2, 4} -&gt; 6, {6, 2, 8} -&gt; 10|&gt;;

I want to total the values on the right side of the ...

- asked by eldo (10 votes), answered by Pillsy (13 votes)

—————————-

[get position index for all element in a list] http://mathematica.stackexchange.com/questions/98170/get-position-index-for-all-element-in-a-list

For example

mat={{a,b},{c,a,a}} 
 
 
How to write a function posindex that posindex[mat] will give 
 
{{a -&gt; {1, 1}, b -&gt; {1, 2}}, {c -&gt; {2, 1}, a -&gt; {2, 2}, a -&gt; {2, 3}} 
 
 
And the function  ...

- asked by matheorem (10 votes), answered by Michael E2 (8 votes)

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

[3D surface that looks like a virus] http://mathematica.stackexchange.com/questions/74193/3d-surface-that-looks-like-a-virus

I have been recently using Mathematica for composing animations that are part of the supplementary information of my papers.

I am currently trying to build an animation that involves a viral ...

- asked by user2098 (16 votes), answered by Chris Degnen (18 votes)

—————————-

[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 ...

- asked by faleichik (131 votes), answered by faleichik (176 votes)

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

[Triggering events based on choices made inside of system dialogs (e.g. window close)] http://mathematica.stackexchange.com/questions/98091/triggering-events-based-on-choices-made-inside-of-system-dialogs-e-g-window-cl

I’m trying to arrange for Mathematica to perform a certain action every time a notebook is saved or closed (with or without saving). The obvious way to do this would be through event handling. So, ...

- asked by Paco Jain (5 votes)

—————————-

[ListContourPlot and ListContourPlot3D use better interpolation for arrays of values than for lists of tuples (i.e. x,y,z,f[x,y,z]..] http://mathematica.stackexchange.com/questions/98145/listcontourplot-and-listcontourplot3d-use-better-interpolation-for-arrays-of-val

From reading the documentation, it seems that ListContourPlot3D should work equally well on an array versus a list of tuples,

?ListContourPlot3D 
 
  ListContourPlot3D[array] generates a contour plot  ...

- asked by Jason B (10 votes)

—————————-

[Size problems combining objects in a Graphics using Inset] http://mathematica.stackexchange.com/questions/98282/size-problems-combining-objects-in-a-graphics-using-inset

The Problem

I need to put together different graphics objects in a precise way inside a Graphics. Some objects are drawn directly by graphics primitives, some others are the result of calls to ...

- asked by Guido (4 votes)

6.10 Tuesday, October 27, 2015

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

[Recursively appending elements to a list] http://mathematica.stackexchange.com/questions/97684/recursively-appending-elements-to-a-list

In wanting to demonstrate the power of Mathematica, I wanted to show my 11-year-old son how we could validate that his sequences homework was correct. We could generate the next value in sequence in a ...

- asked by AnthonyMiller (15 votes), answered by J. M. (19 votes)

—————————-

[What is "MemoryMonitor"?] http://mathematica.stackexchange.com/questions/97810/what-is-memorymonitor

Evaluating one of the following inputs

CurrentValue[EvaluationNotebook[], WindowElements] 
 
CurrentValue[$FrontEndSession, WindowElements] 
 
CurrentValue[$FrontEnd, WindowElements]

...

- asked by Karsten 7. (12 votes), answered by m_goldberg (10 votes)

—————————-

[Pop-up documentation for "The new function of the day"] http://mathematica.stackexchange.com/questions/97552/pop-up-documentation-for-the-new-function-of-the-day

The Wolfram Language has more than 5000 built-in functions and constants.

functionslist = Flatten[ 
   Names[#] &amp; /@ Flatten[ 
     {# &lt;&gt; "*", "$" &lt;&gt; # &lt;&gt; "*"} &amp; 
      /@  ...

- asked by rhermans (12 votes), answered by J. M. (5 votes)

—————————-

[ListContourPlot has wrong colouring: workaround?] http://mathematica.stackexchange.com/questions/97596/listcontourplot-has-wrong-colouring-workaround

ListContourPlot uses the wrong colouring here:

res = Import["https://dl.dropboxusercontent.com/u/38623/res.wdx", "WDX"]; 
 
ListContourPlot[res, Contours -&gt; Range[0.66, 0.9, 0.02], ColorFunction  ...

- asked by Szabolcs (12 votes), answered by Jason B (9 votes)

—————————-

[How do you handle upgrade frequency now that minor releases come so quickly?] http://mathematica.stackexchange.com/questions/97493/how-do-you-handle-upgrade-frequency-now-that-minor-releases-come-so-quickly

Does anyone understand the Mathematica upgrade treadmill these days? With the minor releases (10.2, 10.3) coming out fairly quickly and the upgrade price associated with each, I have no idea what my ...

- asked by sblom (12 votes)

—————————-

[More efficient method to compute moments of the Johnson \(S_B\) distribution] http://mathematica.stackexchange.com/questions/97750/more-efficient-method-to-compute-moments-of-the-johnson-s-b-distribution

Here is a very specific feature request. I need

Mean[JohnsonDistribution["SB", \[Gamma], \[Delta], 0, 1]] 
 
When I issue e.g. 
 
Table[N[Mean[JohnsonDistribution["SB", \[Gamma], \[Delta], 0, 1]]], 
  {\[Gamma], -10, 10}, {\[Delta], 1, 10}] 
 
- asked by   (11 votes), answered by J. M. (15 votes)

—————————-

[Path Names Longer Then 256 on Windows] http://mathematica.stackexchange.com/questions/97736/path-names-longer-then-256-on-windows

Is there a way to work with pathnames that are longer then the typical 256 in Mathematica?

For example run the following in Cygwin

echo 1 &gt;  ...

- asked by William (11 votes), answered by WReach (10 votes)

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

[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 ...

- asked by faleichik (131 votes), answered by faleichik (176 votes)

—————————-

[3D surface that looks like a virus] http://mathematica.stackexchange.com/questions/74193/3d-surface-that-looks-like-a-virus

I have been recently using Mathematica for composing animations that are part of the supplementary information of my papers.

I am currently trying to build an animation that involves a viral ...

- asked by user2098 (16 votes), answered by Chris Degnen (18 votes)

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

[How to model discontinuities in a NonlinearStateSpaceModel] http://mathematica.stackexchange.com/questions/97717/how-to-model-discontinuities-in-a-nonlinearstatespacemodel

I know that it is possible to model discontinuities like bouncing and other collisions by using WhenEvent with NDSolve.

However, I am using the tools for Non linear systems and I’d like to know if ...

- asked by RationalAsh (2 votes)

—————————-

[How to pass a custom method to a particular option?] http://mathematica.stackexchange.com/questions/97753/how-to-pass-a-custom-method-to-a-particular-option

In an answer to my question More efficient method to compute moments of the Johnson \(S_B\) distribution, J. M. has come up with a method to compute the moments of the Johnson \(S_B\) distribution, which ...

- asked by   (4 votes)

—————————-

[Scaling 1D ArrayPlot divide by zero error] http://mathematica.stackexchange.com/questions/97467/scaling-1d-arrayplot-divide-by-zero-error

I am trying to overlay an ArrayPlot onto a WaveletScalogram, using the helpful answer here; however, my ArrayPlot is one-dimensional.

My code:

Show[{ 
  WaveletScalogram[trainWaveData["A1 HbO"],  ...

- asked by Lylax (2 votes)

6.11 Tuesday, October 20, 2015

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

[DumpSave 10.2 style from 10.3] http://mathematica.stackexchange.com/questions/97357/dumpsave-10-2-style-from-10-3

Szabolcs has asked WRI support about mx files, in particular:

Can we expect that MX files written by Mathematica 10.0.0 will be readable by future point released such as 10.0.1 or 10.0.2?

...

- asked by Kuba (14 votes)

—————————-

[Plot3D is incorrectly returning "1/0. encountered"] http://mathematica.stackexchange.com/questions/97104/plot3d-is-incorrectly-returning-1-0-encountered

The line of code

Plot3D[1/y, {x, 0, 1}, {y, x + 1, x + 2}]

is returning several "Power::infy: Infinite expression 1/0. encountered." error messages, and then returning an empty plot. But the ...

- asked by tparker (13 votes), answered by rhermans (8 votes)

—————————-

[Fast Selections Testing on Inequality] http://mathematica.stackexchange.com/questions/97083/fast-selections-testing-on-inequality

Is there a functional idiom for fast selections testing on inequality?

For example, finding values from list a &amp; b where the key is less than or equal to a value, in this case 4 or 9.

An ...

- asked by Chris Degnen (13 votes), answered by Chris Degnen (5 votes)

—————————-

[Generate two random numbers with constraint] http://mathematica.stackexchange.com/questions/97424/generate-two-random-numbers-with-constraint

I want to generate two random numbers p and q between 0.5 and 1. They are connected by the following constraint \(1/2q\&gt ;p\). How to do that?

- asked by Chandan Datta (12 votes), answered by rhermans (18 votes)

—————————-

[How to evaluate the second argument of Cases only once] http://mathematica.stackexchange.com/questions/96939/how-to-evaluate-the-second-argument-of-cases-only-once

I’d like to find a fast but readable way to achieve the following:

Cases[RandomInteger[{AbsoluteTime["2001"], AbsoluteTime["2003"]}, 1000], 
a_ /; a &gt; AbsoluteTime["2002"]]

The correct result ...

- asked by Italianice (10 votes), answered by Michael E2 (11 votes)

—————————-

[How to predict the degree of the first series coefficient?] http://mathematica.stackexchange.com/questions/97313/how-to-predict-the-degree-of-the-first-series-coefficient

Given an expression f that is a function of x and a number x0, what is the least integer n that produces a non-zero coefficient in Series[f, x, x0, n]?

[1] For instance, here, is the answer is n = ...

- asked by Michael E2 (9 votes), answered by bbgodfrey (0 votes)

—————————-

[Trying to find the asymptote to a function] http://mathematica.stackexchange.com/questions/97365/trying-to-find-the-asymptote-to-a-function

I am trying to find the asymptote to a solution of a differential equation.

I solved $x'(t) = \sin(x(t) + t)$ using NDSolve and plotted my solution. 
 
sol = NDSolve[{x'[t] == Sin[x[t] + t], x[0] ==  ...

- asked by Jacobadtr (9 votes), answered by bbgodfrey (9 votes)

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

[Generating visually pleasing circle packs] http://mathematica.stackexchange.com/questions/40334/generating-visually-pleasing-circle-packs

EDIT: (my conclusion and thank you note) I want to thank you all guys for this unexpected intellectual and artistic journey. Hope you had fun and enjoyed it the same as I did.

I would like to ...

- asked by VividD (86 votes), answered by level1807 (51 votes)

—————————-

[Is there a syntax for single-line comments for notebooks?] http://mathematica.stackexchange.com/questions/1496/is-there-a-syntax-for-single-line-comments-for-notebooks

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

- asked by Peeter Joot (35 votes), answered by Szabolcs (42 votes)

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

[SyntaxInformation: take allowed options from multiple symbols possible?] http://mathematica.stackexchange.com/questions/97411/syntaxinformation-take-allowed-options-from-multiple-symbols-possible

Suppose I have a function like

Options[f] = {foo -&gt; 1}; 
f[opt : OptionsPattern[{f,g}]] := h@g[Sequence @@ FilterRules[{opt}, Options[g]]]

I purposefully do not want to append Options[g] to ...

- asked by Szabolcs (4 votes)

—————————-

[Is there any way to export vector graphics with shading?] http://mathematica.stackexchange.com/questions/97305/is-there-any-way-to-export-vector-graphics-with-shading

This has irked me for a while as I really feel its a significant shortfall in Mathematica’s abilities but maybe I am missing something.

I would like to export simple graphics with shading in a ...

- asked by Quantum_Oli (9 votes)

—————————-

[Why is 13 the smaller height dimension of a Graphics?] http://mathematica.stackexchange.com/questions/97364/why-is-13-the-smaller-height-dimension-of-a-graphics

It seems that you cannot get a Graphics image with a height dimension less than 13. Trying to draw something and then asking for the ImageDimensions of the resulting Graphics, you will get three ...

- asked by Guido (6 votes)

6.12 Tuesday, October 13, 2015

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

[Progress bar for FullSimplify] http://mathematica.stackexchange.com/questions/96602/progress-bar-for-fullsimplify

Sometimes FullSimplify takes a really long time and it is not really clear if it makes sense to wait another half an hour in hopes for it to finish, or if it will actually take three years in which ...

- asked by Kagaratsch (18 votes), answered by Sjoerd C. de Vries (26 votes)

—————————-

[Construct a master curve from data] http://mathematica.stackexchange.com/questions/96393/construct-a-master-curve-from-data

I will try to be as informative as possible.

Clear["Global`*"] 
 
I have the following data 
 
data91 = {{-0.209091`, 2.89296`}, {0.281818`, 2.92958`}, {0.8`, 
    2.97535`}, {1.28182`, 3.03028`},  ...

- asked by dimitris (11 votes), answered by Sjoerd C. de Vries (17 votes)

—————————-

[Upper bound "Vicious nearest neighbour" algorithm suggestions] http://mathematica.stackexchange.com/questions/96691/upper-bound-vicious-nearest-neighbour-algorithm-suggestions

I am asking a question based on this question from the sister site MSE.

In an effort to make this a self-contained question, I include the fiorst documented posing of the problem by Robert Abilock in ...

- asked by martin (10 votes), answered by Arnoud Buzing (2 votes)

—————————-

[Symbolic sum of Stirling numbers gives wrong answer] http://mathematica.stackexchange.com/questions/96575/symbolic-sum-of-stirling-numbers-gives-wrong-answer

This issue originated from my attempt to answer a question on MathOverflow:

 Sum[StirlingS2[i, 2], {i, 0, n}]

on Mathematica 10.2.0.0 gives as answer \(\frac {1}{2} (-3 + 2^{1 + n} - 2 n)\), while the ...

- asked by Carlo Beenakker (10 votes), answered by Bob Hanlon (6 votes)

—————————-

[Map a function of several arguments] http://mathematica.stackexchange.com/questions/96803/map-a-function-of-several-arguments

I have three lists, e.g.

list1 = {{a,b,...}}; 
list2 = {{1,2},{3,4},...}; 
list3 = {{x,y},{z,w},...}; 
 
 
and a function 
 
f[x_,y_]:=(* whatever it does *);

I need to get

...

- asked by T. Rihacek (10 votes), answered by Kuba (12 votes)

—————————-

[Why does Nearest not support Sqrt?] http://mathematica.stackexchange.com/questions/96588/why-does-nearest-not-support-sqrt

Simple examples with two points

nf1=Nearest[{{0, 0}, {Sqrt[2], Sqrt[2]}}] 
 
nf1[{0, 0}, {All, 2.1}] 
 
 
gives 
 
{{0, 0}}

This is incorrect. If we test bigger radius, we can find that Mathematica takes ...

- asked by matheorem (9 votes)

—————————-

[Unique Element in List] http://mathematica.stackexchange.com/questions/96747/unique-element-in-list

I have a list a, and want to find out whether there is a unique element in the list.

For instance a=x,y,z,y,x has an unique element (z), while a=1,2,3,4,5,1,2,3,4,5 has no unique element.

There ...

- asked by NicoDean (8 votes), answered by J. M. is back. (11 votes)

================================== 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 \(y\) axis. How can I have two different axis?

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

- asked by 500 (87 votes), answered by ArgentoSapiens (83 votes)

—————————-

[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 ...

- asked by faleichik (131 votes), answered by faleichik (175 votes)

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

[Examples of using Mathematica to solve matrix equations symbolically] http://mathematica.stackexchange.com/questions/96405/examples-of-using-mathematica-to-solve-matrix-equations-symbolically

Suppose we want to solve a linear system like

\[ \left \lbrack \begin {array}{cc}M& S\\ -S^{T}&0 \end {array} \right \rbrack \left \lbrack \begin {array}{c} x\\ y\end {array}\right \rbrack = \left \lbrack \begin {array}{c} f \\g \end {array} \right \rbrack \]

- asked by fred (5 votes)

—————————-

[General suggestions to accelerate Simplify and FullSimplify] http://mathematica.stackexchange.com/questions/96476/general-suggestions-to-accelerate-simplify-and-fullsimplify

To my understanding, the function Simplify[] and FullSimplify[] work by applying a series of built-in transformation rules to the expression and trying to minimize the TransformationFunctions in the ...

- asked by Yuchen Xie (1 vote)

—————————-

[External and internal Assumptions on ‘PiecewiseExpand‘ and ‘Mod‘] http://mathematica.stackexchange.com/questions/96596/external-and-internal-assumptions-on-piecewiseexpand-and-mod

After this question I’m intrigued about the different behaviors depending where and how the assumptions are given.

PiecewiseExpand[Mod[n, m]]    (* case #1 *) 
(* Mod[n, m] *) 
 
PiecewiseExpand[Mod[n,  ... 

- asked by rhermans (5 votes)

6.13 Tuesday, October 6, 2015

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

[How to simplify writing LibraryLink code?]( http://mathematica.stackexchange.com/questions/96127/how-to-simplify-writing-librarylink-code)

LibraryLink is an API for extending Mathematica through C or C++. It is very fast because it gives direct access to Mathematica’s packed array data structure, without even needing to make a copy of ...

- asked by Szabolcs (22 votes), answered by Szabolcs (20 votes)

—————————-

[Find the volume of Phobos and Deimos]( http://mathematica.stackexchange.com/questions/96125/find-the-volume-of-phobos-and-deimos)

How can we calculate the volume of a 3D object using the new-in-10 computational geometry functions?

For simple objects this works:

shuttle = ExampleData[{"Geometry3D", "SpaceShuttle"}]

- asked by Szabolcs (17 votes), answered by I_Mariusz (7 votes)

—————————-

[Convert binary voxel image to geometric region] (http://mathematica.stackexchange.com/questions/96134/convert-binary-voxel-image-to-geometric-region)

I have a binary voxel image which described a contiguous region in space.

Example:

arr = Array[ 
   Function[{x, y, z}, (1 + Sin[5 x] Sin[5 y] Sin[5 z]/2) - (x^2 + y^2 + z^2)], 
    {100, 100, 100},  ...

- asked by Szabolcs (14 votes), answered by Simon Woods (5 votes)

—————————-

[Is it possible to reference "self" from a pure function?]( http://mathematica.stackexchange.com/questions/96220/is-it-possible-to-reference-self-from-a-pure-function)

This would calculate the factorial of 6, if the "self" was the function itself. Is there something that could allow this?

If[#[[1]] &gt; 0, self[{#[[1]] - 1, #[[2]] #[[1]]}], Print[#[[2]]]] &amp;[{6,  ...

- asked by MathematicaUser39386 (13 votes), answered by Leonid Shifrin (19 votes)

—————————-

[Circle with negative radius?]( http://mathematica.stackexchange.com/questions/96102/circle-with-negative-radius)

Why does this work:

Graphics[{Circle[{0, 0}, -Pi/4]}]

But this doesn’t?

Graphics[{Circle[{0, 0}, N[-Pi/4]]}]

Telling me:

Radius -0.78539816339744828 should be a positive number or pair of ...

- asked by David (12 votes)

—————————-

[DSolve documention on web differs greatly from distributed MMA 10.2.0 version] (http://mathematica.stackexchange.com/questions/96089/dsolve-documention-on-web-differs-greatly-from-distributed-mma-10-2-0-version)

In the course of improving my answer to 95361, I noticed that the DSolve documentation on the web is much better written than that distributed with Mathematica 10.2.0 for Microsoft Windows (64-bit) ...

- asked by bbgodfrey (10 votes), answered by Karsten 7. (5 votes)

—————————-

[MapAt with Replace(All) causing kernel crash]( http://mathematica.stackexchange.com/questions/96193/mapat-with-replaceall-causing-kernel-crash)

Bug introduced in 10.1 and fixed in 10.2

I wanted to roll a function that works like /. but only acts on the very first match it encounters.

ReplaceAtFirst = 
 Function[{expr, rule}, 
   ...

- asked by LLlAMnYP (9 votes), answered by LLlAMnYP (4 votes)

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

[3D surface that looks like a virus] (http://mathematica.stackexchange.com/questions/74193/3d-surface-that-looks-like-a-virus)

I have been recently using Mathematica for composing animations that are part of the supplementary information of my papers.

I am currently trying to build an animation that involves a viral ...

- asked by user2098 (16 votes), answered by Chris Degnen (18 votes)

—————————-

[Trying to Visualize a Collatz - The Collatz conjecture]( http://mathematica.stackexchange.com/questions/85718/trying-to-visualize-a-collatz-the-collatz-conjecture)

So I’m new in this and learning— and I happen to have this collatz

collatz[x_, y_] := If[x == 3*y || x == 2*y + 1 || y == 3*x || y == 2*x + 2, 2, 0]

So i want a visual 3D adjacency graph of my ...

- asked by Mia (23 votes), answered by Sjoerd C. de Vries (27 votes)

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

[How to "fake" a front-end object when running a Mathematica script?] (http://mathematica.stackexchange.com/questions/95779/how-to-fake-a-front-end-object-when-running-a-mathematica-script)

I’m running a Mathematica script (content of which cannot be disclosed here) and some part of it requires "front-end"? Since it’s running in a script, there is not one and it gave the following error: ...

- asked by qazwsx (3 votes)

—————————-

[INTERNAL SELF-TEST ERROR: FileNotify|c|305]( http://mathematica.stackexchange.com/questions/96273/internal-self-test-error-filenotifyc305)

Does anybody know what this error means? Clicking the link in the warning message gives a "page not found", and Googling does not produce anything for this exact error code. I get it whenever I try to ...

- asked by Marius Ladegard Meyer (3 votes)

—————————-

[Does Compilation option "InlineExternalDefinitions"/"InlineCompiledFunctions" lead to unnecessarily complicated nesting?] (http://mathematica.stackexchange.com/questions/96147/does-compilation-option-inlineexternaldefinitions-inlinecompiledfunctions-le)

Question:  When an external (possibly complicated) definition f 
 is used inside a compiled function with 
CompilationOption-&gt;{"InlineCompiledFunctions"-&gt;True}, 
does Mathematica really store the  ...

- asked by QuantumDot (4 votes)

6.14 Tuesday, September 29, 2015

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

[Fast calculation of discrete logarithms] http://mathematica.stackexchange.com/questions/95590/fast-calculation-of-discrete-logarithms

Does Mathematica have any built-in fast algorithms for calculating discrete logarithms over \((\mathbb {Z}_p)^\times \) (the group of integers modulo \(p\))?

Essentially, for a fixed large prime p, a ...

- asked by 2012rcampion (15 votes)

—————————-

[What pseudo-random number generators are available to Mathematica users?] http://mathematica.stackexchange.com/questions/95533/what-pseudo-random-number-generators-are-available-to-mathematica-users

One would think I should be able answer the question I pose in the title for myself by reading the Documentation Center article ref/SeedRandom, but it’s not so simple.

That article does give a list ...

- asked by m_goldberg (13 votes), answered by ilian (15 votes)

—————————-

[Efficient conversion between two partition representations] http://mathematica.stackexchange.com/questions/95410/efficient-conversion-between-two-partition-representations

I have a list of distinct expressions. We can represent a partitioning of list in two ways:

As a list of sublists partitions = a, b, ..., x, y, ..., ....

As a vector of integer partition ...

- asked by Szabolcs (12 votes), answered by Leonid Shifrin (12 votes)

—————————-

[Why do singularities disappear when performing convolutions with the Dirac Delta function?] (http://mathematica.stackexchange.com/questions/95588/why-do-singularities-disappear-when-performing-convolutions-with-the-dirac-delta)

I am attempting to perform a convolution involving the Dirac Delta function:

\(\int _{-\infty }^{\infty } \frac {1}{t+1} \cdot \delta (t+1)\ dt\)

I would expect that the result of this integral is ...

- asked by Peter Crowley (11 votes), answered by I_Mariusz (1 vote)

—————————-

[Determine height of box packed with spheres] (http://mathematica.stackexchange.com/questions/95566/determine-height-of-box-packed-with-spheres)

I got such a wonderful answer regarding The Diagonals of a Regular Octagon, so I thought I’d try asking another question we had on our Pizza and Problem quiz activity at College of the Redwoods. The ...

- asked by David (10 votes), answered by KennyColnago (10 votes)

—————————-

[How to automatically remove text from images?] (http://mathematica.stackexchange.com/questions/95512/how-to-automatically-remove-text-from-images)

I’d like to remove the text in the center of images automatically. To use Inpaint[], you need a mask, but I don’t have one. So really the problem is:

How to build a mask for an image that contains a ...

- asked by M.R. (10 votes), answered by blochwave (36 votes)

—————————-

[Front ends gone wild with named slots] (http://mathematica.stackexchange.com/questions/95351/front-ends-gone-wild-with-named-slots)

Bug introduced in version 10

Assume the following simple expression

{#"Test"}&amp;

Now go in front of the # and just start typing another named slot expression. On my system, the front end ...

- asked by halirutan (10 votes)

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

[Python-style plots in Mathematica] http://mathematica.stackexchange.com/questions/84877/python-style-plots-in-mathematica

I love making plots in Mathematica. And I love to spend a lot of time making high-quality plots that maximize readability and aesthetics. For most cases, Mathematica can make very beautiful images, ...

- asked by Pablo Galindo Salgado (48 votes), answered by halirutan (49 votes)

—————————-

[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 ...

- asked by Margus (51 votes), answered by Daniel Lichtblau (55 votes)

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

[Time complexity to choose the right overload from the memoized function] http://mathematica.stackexchange.com/questions/95399/time-complexity-to-choose-the-right-overload-from-the-memoized-function

If we want to save some outputs of the function, we often use the memoization pattern as follows,

f[x_]:=f[x]=x 
f/@Range[10^5]

If I call this function many times for different arguments, ...

- asked by Sungmin (7 votes)

—————————-

[Diagonalisation of equations for NDSolve] http://mathematica.stackexchange.com/questions/95383/diagonalisation-of-equations-for-ndsolve

I have a linear matrix differential equation and I wish to speed up evaluation by diagonalising using eigenvectors. There is an example in Help for finite elements under "swinging beam" that is ...

- asked by Hugh (2 votes)

—————————-

[TableDirections example produces an error message] http://mathematica.stackexchange.com/questions/95321/tabledirections-example-produces-an-error-message

Bug introduced in 10.0 and persisting through in 10.2

Can anyone replicate this? In Mathematica 10.2 on Win 64:

TableForm[{{a, b}, {c, d}, {e, f}}, TableDirections -&gt; Row]

I get the ...

- asked by Alan (9 votes)

6.15 Tuesday, September 22, 2015

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

[How to speed up PDF export in Mathematica 10] (http://mathematica.stackexchange.com/questions/94776/how-to-speed-up-pdf-export-in-mathematica-10)

Based on this question: - Version 7 print environment - I set up two 10 page test documents in version 7.0.1 and version 10.1. The version 7 document exported to PDF in 4.18 seconds whereas the ...

- asked by Chris Degnen (19 votes)

—————————-

[How can I import a huge CSV file quickly?] (http://mathematica.stackexchange.com/questions/94752/how-can-i-import-a-huge-csv-file-quickly)

I have two CSV files, each one is around 1 GB of data. When I use Import["file.csv"], it takes a very, very, long time to import the data. So how can I accelerate the import procedure?

The file ...

- asked by m00nlight (17 votes), answered by tesseract (12 votes)

—————————-

[Is it possible to change the order that symbol definitions are checked? (DownValues vs UpValues)] (http://mathematica.stackexchange.com/questions/95087/is-it-possible-to-change-the-order-that-symbol-definitions-are-checked-downval)

Suppose I have the function f with the following definition assigned to it:

f // ClearAll; 
f // Attributes = { HoldAll }; 
f /: HoldPattern[ f[x_] + f[y_] ] := upvalue; 
 
 
If I evaluate f[x] + f[y], I  ...

- asked by rhennigan (15 votes), answered by halirutan (9 votes)

—————————-

[Is it a bug in Limit?](http://mathematica.stackexchange.com/questions/95052/is-it-a-bug-in-limit)

Bug introduced in 9.0 and fixed in 10.0.0

Mathematica 9 on Windows and WolframAlpha says

Limit[Sin[Sqrt[x+1]]-Sin[Sqrt[x]],x-&gt;Infinity] 
 
 
is Interval[{-2,2}].

But actually the limit is 0.

...

- asked by user15961 (13 votes)

—————————-

[Add a vector to a list of vectors]( http://mathematica.stackexchange.com/questions/95033/add-a-vector-to-a-list-of-vectors)

What is the syntax to add v1 to each vector in v2? I know it has to be simple, but I really have searched and not found it.

v1 = {a, b, c} 
v2 = {{d, e, f}, {g, h, i}, {j, k, l}}

i.e., sum them in ...

- asked by DrBubbles (12 votes), answered by Artes (16 votes)

—————————-

[How to remove a LocalSymbol (or CloudSymbol)?] (http://mathematica.stackexchange.com/questions/94978/how-to-remove-a-localsymbol-or-cloudsymbol)

In version 10.2 LocalSymbol can be used to create a persistent store of a variable. Once this is created I don’t see a method to remove it. How are are they removed.

LocalSymbol["MySolution"] = 7

...

- asked by Edmund (11 votes), answered by ilian (11 votes)

—————————-

[How can I route edges manually for a Graph?] (http://mathematica.stackexchange.com/questions/95013/how-can-i-route-edges-manually-for-a-graph)

Most graph layouts supported by Mathematica use straight lines for edges; or at least something that only depends on the coordinates of the two adjacent vertices of the edge and nothing else.

A ...

- asked by Szabolcs (10 votes), answered by Silvia (9 votes)

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

[Elegant operations on matrix rows and columns] (http://mathematica.stackexchange.com/questions/3069/elegant-operations-on-matrix-rows-and-columns)

Question

The Mathematica tutorial has a section ’Basic Matrix Operations’, describing operations like transpose, inverse and determinant. These operations all work on entire matrices. I am missing a ...

- asked by sjdh (91 votes), answered by Mr.Wizard (31 votes)

—————————-

[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 (89 votes), answered by Leonid Shifrin (100 votes)

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

[Why is an imported plot different from the saved one?] (http://mathematica.stackexchange.com/questions/94757/why-is-an-imported-plot-different-from-the-saved-one)

I have a question concerning the importing of previously saved graphics. So I drew a plot in Mathematica and saved it by right clicking on it and saving it ("save as..."). When I open this (.pdf) ...

- asked by drabus (2 votes)

—————————-

[Number of 4-colorings of Johnson solids] (http://mathematica.stackexchange.com/questions/95066/number-of-4-colorings-of-johnson-solids)

I want to know the number of 4-colorings for all Johnson solids. This is equivalent to evaluating the flow polynomial for the corresponding polyhedral graphs at \(k=4\).

I tried the following to get ...

- asked by Athanasios Evangelou (4 votes)

—————————-

[How to have Mathematica pronounce/speak International Phonetic Alphabet?] (http://mathematica.stackexchange.com/questions/95068/how-to-have-mathematica-pronounce-speak-international-phonetic-alphabet)

We know that Speak could read out English words and sentences such as

Speak["this is a sentence"] 
 
Unfortunately, Speak only works for English. Speak[" "] will only yield silence.

In fact ...

- asked by Harry (3 votes)

6.16 Tuesday, September 15, 2015

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

[Spacing out random walks so they don’t overlap] (http://mathematica.stackexchange.com/questions/94363/spacing-out-random-walks-so-they-dont-overlap)

From an external simulation program, I have lots of particle tracks which follow random walks, all of which start at or near the origin \((0,0)\). This means that when I plot the walks in Mathematica, ...

- asked by blochwave (20 votes), answered by kirma (8 votes)

—————————-

[How to avoid the wiggly text on Ticks and Labels when rotating 3D objects] (http://mathematica.stackexchange.com/questions/94470/how-to-avoid-the-wiggly-text-on-ticks-and-labels-when-rotating-3d-objects)

Motivation

I’m trying to do a nice animation of the rotation of a ParametricPlot3D . My problem is that the Ticks numbers and AxesLabel text wiggle with an undesirable noisy component as the ...

- asked by rhermans (16 votes), answered by P. Fonseca (8 votes)

—————————-

[Efficiently generating 2-D Gaussian random fields on the sphere] (http://mathematica.stackexchange.com/questions/94390/efficiently-generating-2-d-gaussian-random-fields-on-the-sphere)

Context

A couple of years ago I posted this question for an efficient code to generate an n-D Gaussian random field (sometimes called processes in other fields of research), which has applications in ...

- asked by chris (15 votes)

—————————-

[Pattern does not match with Orderless head] (http://mathematica.stackexchange.com/questions/94432/pattern-does-not-match-with-orderless-head)

Why does the following pattern matching not succeed?

ClearAll[f]; 
SetAttributes[f,Orderless]; 
HoldForm[f[a,d[],b,c]]/.HoldPattern[f[a,d[],b,z_]]:&gt;{z} 
(* f[a,d[],b,c] *)

I expected that because f ...

- asked by bdforbes (14 votes), answered by Mr.Wizard (8 votes)

—————————-

[What are the requirements for a well behaved indexed variable? Subscript, ToExpression, Downvalue?] (http://mathematica.stackexchange.com/questions/94294/what-are-the-requirements-for-a-well-behaved-indexed-variable-subscript-toexpr)

On writing this answer I needed to call a function, (NonlinearModelFit) with an unknown number of parameters.

We have learned that we should not use Subscript for indexing variables because ...

- asked by rhermans (14 votes), answered by Leonid Shifrin (14 votes)

—————————-

[What is wrong with RuleCondition here?] (http://mathematica.stackexchange.com/questions/94413/what-is-wrong-with-rulecondition-here)

Hold@1`5 /. x_Real :&gt; RuleCondition[N@x, True] 
Hold@1`5 /. x_Real :&gt; RuleCondition[N@2`5, True] 
Hold@2`5 /. x_Real :&gt; RuleCondition[N@2`5, True] 
Hold@1`5 /. x_Real :&gt; RuleCondition[N@t,  ...

- asked by Chris Chiasson (12 votes), answered by Oleksandr R. (10 votes)

—————————-

[\(\tt AddTo\) regression in v10]( http://mathematica.stackexchange.com/questions/94296/tt-addto-regression-in-v10)

As we know we can assign special addition rules to symbols by using UpValues:

ClearAll[mySymbol] 
mySymbol /: mySymbol + x_ := {mySymbol, x}

They are used when we directly add something to mySymbol

...

- asked by jkuczm (12 votes), answered by Bob Hanlon (6 votes)

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

[Elegant operations on matrix rows and columns] (http://mathematica.stackexchange.com/questions/3069/elegant-operations-on-matrix-rows-and-columns)

Question

The Mathematica tutorial has a section ’Basic Matrix Operations’, describing operations like transpose, inverse and determinant. These operations all work on entire matrices. I am missing a ...

- asked by sjdh (90 votes), answered by Mr.Wizard (31 votes)

—————————-

[What are the most common pitfalls awaiting new users?] (http://mathematica.stackexchange.com/questions/18393/what-are-the-most-common-pitfalls-awaiting-new-users)

As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...

- asked by belisarius (266 votes), answered by Michael E2 (142 votes)

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

[Interfacing Red Pitaya board with Mathematica] (http://mathematica.stackexchange.com/questions/94493/interfacing-red-pitaya-board-with-mathematica)

I just discovered the Red Pitaya board and borrowed a unit to play during this weekend. Surprisingly I did not find any reference to Mathematica on the Red Pitaya forum, nor did I find any reference ...

- asked by Christian Neel (6 votes)

—————————-

[Using NMaximize to get integer results for a fractional programming problem] (http://mathematica.stackexchange.com/questions/94549/using-nmaximize-to-get-integer-results-for-a-fractional-programming-problem)

I have an optimization problem that I am trying to model in mathematica (wolfram cloud, to be precise).

Link to notebook for code described here: ...

- asked by pyrex (3 votes)

—————————-

[How to speed up summing a large number of vectors] (http://mathematica.stackexchange.com/questions/94660/how-to-speed-up-summing-a-large-number-of-vectors)

First let me explain what I am trying to do in my code.

Assume that I send a very short chirp (2,000 ms long) into a domain filled with 20,000 particles randomly scattered in the domain.

The ...

- asked by Mahdi Razaz (3 votes)

6.17 Tuesday, September 8, 2015

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

[Mathematica 10.0.x freezes in Initializing kernels] (http://mathematica.stackexchange.com/questions/92931/mathematica-10-0-x-freezes-in-initializing-kernels)

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 remember any Windows updates occurring which would have ...

- asked by mitcheljh (41 votes), answered by ilian (54 votes)

—————————-

[How to restore corrupted files?] (http://mathematica.stackexchange.com/questions/92814/how-to-restore-corrupted-files)

I have a file that I can’t reopen because MMa was "Not Responding" and I had to shut it down.

I found links online to this: http://support.wolfram.com/kb/12423

I executed those two instructions in a ...

- asked by Jerry Guern (13 votes), answered by Lou (11 votes)

—————————-

[No help from ?-command] (http://mathematica.stackexchange.com/questions/94165/no-help-from-command)

I recently upgraded to Mathematica 10.2, and there seem to be a problem with the help system. When typing

?Integrate

I get the following output

Integrate 
System` 
CreateUUID["Info-"] 
False 
False 
 ...

- asked by mickep (12 votes), answered by ilian (11 votes)

—————————-

[Syntax for using Tooltip in DiscretePlot] (http://mathematica.stackexchange.com/questions/93990/syntax-for-using-tooltip-in-discreteplot)

Tooltip works fine in ListPlot:

ListPlot[Table[Tooltip[PDF[PoissonDistribution[10], x]], {x, 0, 20}]]

in which the decimal value of the distribution at a point is revealed when a cursor is placed ...

- asked by David G. Stork (10 votes), answered by march (10 votes)

—————————-

[Fast way to pass an array of integers to Java using JLink] (http://mathematica.stackexchange.com/questions/92878/fast-way-to-pass-an-array-of-integers-to-java-using-jlink)

I am using a package from java to compress a list of integers, this package provide me two methods, one for compress and other one for uncompress. Each of these methods has a version to int [] arrays ...

- asked by d555 (10 votes), answered by Leonid Shifrin (8 votes)

—————————-

[How to share a notebook?] (http://mathematica.stackexchange.com/questions/92848/how-to-share-a-notebook)

I have a folder in dropbox syncing to my desktop. I tried sharing a notebook file this way, but this generates lots of errors, conflicts, and data loss:

I have notebooks with Dynamic and other ...

- asked by M.R. (10 votes), answered by MarcoB (9 votes)

—————————-

[How do I remove roads from Mathematica maps?] (http://mathematica.stackexchange.com/questions/93976/how-do-i-remove-roads-from-mathematica-maps)

I’m using GeoGraphics and Polygon[Interpreter["USState"]["Colorado"]] to create a map of Colorado and several bordering states. With automatic GeoStyling, I get a decent map with cities and roads ...

- asked by mmta no0b (9 votes), answered by Chip Hurst (17 votes)

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

[Alternatives to Mathematica] (http://mathematica.stackexchange.com/questions/28162/alternatives-to-mathematica)

Inspired by the recent question Alternatives to LaTeX (currently 58 upvotes) on http://tex.stackexchange.com/

Are there any paid-for or open source alternatives to Mathematica which produce equal or ...

- asked by akk (28 votes), answered by Sumit (18 votes)

—————————-

[What are the most common pitfalls awaiting new users?] (http://mathematica.stackexchange.com/questions/18393/what-are-the-most-common-pitfalls-awaiting-new-users)

As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...

- asked by belisarius (264 votes), answered by Michael E2 (141 votes)

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

[Help nedeed for understanding NDSolve architecture -Vacuum Heating Simulation] (http://mathematica.stackexchange.com/questions/94163/help-nedeed-for-understanding-ndsolve-architecture-vacuum-heating-simulation)

I am a beginner in mathematica and I am facing a problem that is way bigger than my knowledge..

I am tryng to simulate a semplificated version of Brunel Effect, wich is a Laser-Plasma interaction ...

- asked by Cosimo (2 votes)

—————————-

[Strange behavior of autocomplete for ColorData] (http://mathematica.stackexchange.com/questions/94135/strange-behavior-of-autocomplete-for-colordata)

I’m seeing very weird behavior when autocompleting:

Not sure if this is a bug. Is it?

(I have OSX v10.2)

- asked by M.R. (5 votes)

—————————-

[Open file menu bug with ubuntu dark theme] (http://mathematica.stackexchange.com/questions/92825/open-file-menu-bug-with-ubuntu-dark-theme)

I’m using Mathematica on a Ubuntu with a dark theme. When I click on the open file menu option, it shows up with a white background and white letters. I can only see something if the folder or file is ...

- asked by Hugo Andrade (3 votes)

6.18 Tuesday, September 1, 2015

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

[Advice for Mathematica as Mathematician’s Aid] (http://mathematica.stackexchange.com/questions/92686/advice-for-mathematica-as-mathematicians-aid)

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

- asked by CarlEdman (29 votes), answered by MarcoB (20 votes)

[How can I evaluate untrusted Mathematica code in a sandbox?] (http://mathematica.stackexchange.com/questions/92347/how-can-i-evaluate-untrusted-mathematica-code-in-a-sandbox)

Is there any way to build a sandbox to evaluate untrusted Mathematica expressions in order to prevent them from having (malicious or accidental) harmful side effects?

Context: I’m developing a system ...

- asked by ibeatty (21 votes), answered by Stefan R (10 votes)

[Efficient lazy weak compositions] (http://mathematica.stackexchange.com/questions/92647/efficient-lazy-weak-compositions)

In Mathematica all weak k-compositions of integer n can be generated using permutations of integer partitions:

ClearAll[weakCompositionsPermPart] 
weakCompositionsPermPart[n_Integer,  ...

- asked by jkuczm (19 votes), answered by jkuczm (18 votes)

[SeriesData sucks when it can. How do I keep SeriesData from sucking?] (http://mathematica.stackexchange.com/questions/92646/seriesdata-sucks-when-it-can-how-do-i-keep-seriesdata-from-sucking)

When I run

Series[f[x]*Sin[x],{x,0,3}, Analytic-&gt;False] 
 
 
I get: 
 
 
  f[x](x-x^3/3+O[x]^4) 
 
 
as expected.  In FullForm, this is 
 
Times[f[x],SeriesData[x,0,List[1,0,Rational[-1,6]],1,4,1]] 
 
 
But  ...

- asked by QuantumDot (16 votes)

[How to zero (or replace) the diagonal of a square matrix?] (http://mathematica.stackexchange.com/questions/92666/how-to-zero-or-replace-the-diagonal-of-a-square-matrix)

Zeroing the diagonal of a square matrix is an operation I need frequently, but somehow I still haven’t managed to find an elegant solution that satisfies all these requirements:

works with both ...

- asked by Szabolcs (14 votes), answered by ciao (12 votes)

[Splitting a list into increasing sublists] (http://mathematica.stackexchange.com/questions/92527/splitting-a-list-into-increasing-sublists)

I have a list of numbers (say, for example, 1,2,3,4,3,2,1,2,3,4,3,2), and I want to split it into sublists so that each sublist is the (smallest) sublist whose sum is larger than the preceding one. ...

- asked by rogerl (14 votes), answered by Chris Degnen (4 votes)

[How to detect loops in a vector field?] (http://mathematica.stackexchange.com/questions/92425/how-to-detect-loops-in-a-vector-field)

Given a vector field and I’d like to detect if there are streamlines in closed patterns. For example, if the input is a vector field like this:

image = ColorConvert[Rasterize[\[Infinity], ImageSize  ...

- asked by M.R. (14 votes), answered by nikie (19 votes)

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

[Understanding differences between Maple and Mathematica in examples picked by Maplesoft] (http://mathematica.stackexchange.com/questions/60124/understanding-differences-between-maple-and-mathematica-in-examples-picked-by-ma)

I am reading the document How Maple Compares to Mathematica. On page 15 there is an example where Mathematica produces wrong results. Does anybody know why?

MAPLE:

MATHEMATICA:

Also on page 17 ...

- asked by mrz (31 votes), answered by Mr.Wizard (37 votes)

[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] 
 ...

- asked by Prashant Bhate (23 votes), answered by Simon (27 votes)

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

[Creating a certain image (3D shadows, highlighted intersections)] (http://mathematica.stackexchange.com/questions/92494/creating-a-certain-image-3d-shadows-highlighted-intersections)

I would like to learn how to code within Mathematica the following picture:

I tried using

planarShadow[x_, direction_, normal_, darkShadow_: True] := 
 Module[{d, n}, d = Normalize[direction]; 
   ...

- asked by boldbrandywine (5 votes)

[How to stop auto loading of previously opened notebooks] (http://mathematica.stackexchange.com/questions/92699/how-to-stop-auto-loading-of-previously-opened-notebooks)

I’m trying to prevent Mathematica from opening previously opened notebooks when I start it up. I’m using version 10.0.0.0 on Mac OS X Yosemite. I’ve dug around in the preferences, and have tried ...

- asked by Peter Wills (2 votes)

—————————-

[Visualising a 1-(50,15,15) design] (http://mathematica.stackexchange.com/questions/92605/visualising-a-1-50-15-15-design)

The problem I have is the visualisation of a \(1-(50,15,15)\) design. That is a set of \(50\) points and \(50\) blocks (lines), so that each point is on \(15\) lines, and each line contains \(15\) points.

My ...

- asked by user32681 (4 votes)

6.19 Tuesday, August 25, 2015

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

[Strange behavior with Cases and Position with SetDelayed] (http://mathematica.stackexchange.com/questions/91917/strange-behavior-with-cases-and-position-with-setdelayed)

I feel like I must be missing something simple and obvious here, but this has me scratching my head.

This works as expected:

list = {f[a], f[b]}; 
Cases[list, f[x_] :&gt; x] -&gt; Position[list,  ...

- asked by rhennigan (16 votes), answered by Leonid Shifrin (15 votes)

—————————-

[Scraping High-Res images from the MoMA and the Van Gogh Museum websites]( http://mathematica.stackexchange.com/questions/91982/scraping-high-res-images-from-the-moma-and-the-van-gogh-museum-websites)

Many art websites allow the user to zoom into an image to see it at high resolution by using image tiles. It is great on the website, but presents problems if one wishes to compile a complete high ...

- asked by martin (13 votes), answered by belisarius (16 votes)

—————————-

[best practices for saving Datasets and TemporalData to a SQL database] (http://mathematica.stackexchange.com/questions/92020/best-practices-for-saving-datasets-and-temporaldata-to-a-sql-database)

I have been working with a simulation tool that generates large volumes of data, and it’s time to start saving this to a proper database. Is there an established mechanism for saving TemporalData ...

- asked by Michael Stern (12 votes), answered by Leonid Shifrin (6 votes)

—————————-

[How to determine if a function is continuous?] (http://mathematica.stackexchange.com/questions/91877/how-to-determine-if-a-function-is-continuous)

I wish to write code for Riemann Stieltjes integrals in Mathematica.

A necessary condition for the theorem to hold is that the function must be continuous. The domain of the function is a closed ...

- asked by Katherine (12 votes)

—————————-

[How to service preemptive computations while running a LibraryLink function?] (http://mathematica.stackexchange.com/questions/91893/how-to-service-preemptive-computations-while-running-a-librarylink-function)

Cross-posted to Wolfram Community

The following is from the comparison between WSTP (MathLink) and LibraryLink in the documentation:

When the Wolfram Language is waiting for a WSTP application ...

- asked by Szabolcs (11 votes)

—————————-

[Why does this LibraryLink example of LinkObject based passing not work? Bug or user error?] (http://mathematica.stackexchange.com/questions/92047/why-does-this-librarylink-example-of-linkobject-based-passing-not-work-bug-or-u)

There’s an example of LinkObject-based passing in the LibraryLink documentation. Unfortunately the cell in the documentation notebook is corrupted, but to skip that problem I’m going to reproduce it ...

- asked by Szabolcs (9 votes), answered by ilian (6 votes)

—————————-

[Form of citation for data via Wolfram Mathematica] (http://mathematica.stackexchange.com/questions/92179/form-of-citation-for-data-via-wolfram-mathematica)

What citation or reference should I adhere to if I’m using curated data obtained via Mathematica? I’m talking about data, or eg. plots thereof, obtained using functions such as SatelliteData, ...

- asked by zentient (9 votes), answered by V-J (5 votes)

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

[Generating visually pleasing circle packs] (http://mathematica.stackexchange.com/questions/40334/generating-visually-pleasing-circle-packs)

EDIT: (my conclusion and thank you note) I want to thank you all guys for this unexpected intellectual and artistic journey. Hope you had fun and enjoyed it the same as I did.

I would like to ...

- asked by VividD (80 votes), answered by level1807 (49 votes)

—————————-

[What are the most common pitfalls awaiting new users?] (http://mathematica.stackexchange.com/questions/18393/what-are-the-most-common-pitfalls-awaiting-new-users)

As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...

- asked by belisarius (263 votes), answered by Michael E2 (139 votes)

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

[Intersecting RegionPlots] (http://mathematica.stackexchange.com/questions/92252/intersecting-regionplots)

Does the Mathematica graphics system have any concept of intersecting regionplots? I’ve found about intersecting graphics but not regionplots so far. For example, if I want to show the intersection of ...

- asked by Elsa (3 votes)

—————————-

[MathLink (WSTP) vs LibraryLink performance] (http://mathematica.stackexchange.com/questions/91887/mathlink-wstp-vs-librarylink-performance)

Has anyone benchmarked LibraryLink vs MathLink when passing large arrays?

Specifically I would like to know how performance compares when using the following to pass and return a large array:

...

- asked by Szabolcs (6 votes)

—————————-

[Issues adding properties to multigraph] (http://mathematica.stackexchange.com/questions/92014/issues-adding-properties-to-multigraph)

Today I was working with a large multi-graph with properties on the edges when I discovered that properties aren’t assigned as expected.

My preferred graph construction method is to specify ...

- asked by Martin John Hadley (2 votes)

6.20 Tuesday, August 18, 2015

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

[Given an exact formula, how can Mathematica find a probability distribution whose PDF matches it?](http://mathematica.stackexchange.com/questions/91408/given-an-exact-formula-how-can-mathematica-find-a-probability-distribution-whos)

So, given some data, Mathematica 10.2 can now attempt to figure out what probability distribution might have produced it. Cool! But suppose that, instead of having data, we have something that is in ...

- asked by Seth Chandler (19 votes), answered by Vitaliy Kaurov (12 votes)

—————————-

[Improving speed of code computing number of nonrepeating partitions] (http://mathematica.stackexchange.com/questions/91613/improving-speed-of-code-computing-number-of-nonrepeating-partitions)

I need to answer the following for a number of parameters: How many ways can the integer \(k\) be written as a sum of \(n\) different integers ranging from \(1\) to \(m\)?

My initial attempt was the ...

- asked by jorgen (16 votes), answered by ciao (14 votes)

—————————-

[Implementing the PCG random number generator] (http://mathematica.stackexchange.com/questions/91497/implementing-the-pcg-random-number-generator)

PCG ("permuted congruential generator") is a recently-introduced random number generator.

PCG is a family of simple fast space-efficient statistically good algorithms for random number generation. ...

- asked by blochwave (15 votes), answered by Guess who it is. (13 votes)

—————————-

[Use Compile to improve performance] (http://mathematica.stackexchange.com/questions/91787/use-compile-to-improve-performance)

I’ve recently discovered Compile as a way to optimize my code. I wrote a program to learn something new about Compile. I have a function that creates a vector in the following form:

...

- asked by Vanille (14 votes), answered by halirutan (19 votes)

—————————-

[Why does’t SeedRandom work here?] (http://mathematica.stackexchange.com/questions/91523/why-doest-seedrandom-work-here)

From the docs on SeedRandom,

SeedRandom[] resets the generator, using as a seed the time of day and certain attributes of the current Wolfram System session.

This means that every time I use ...

- asked by Szabolcs (14 votes), answered by Mr.Wizard (2 votes)

—————————-

[How to implement a more efficient inverse triangular recursion?] (http://mathematica.stackexchange.com/questions/91610/how-to-implement-a-more-efficient-inverse-triangular-recursion)

Consider the following inverse triangular formula

$$\left( 
\begin{array}{ccccc} 
   &amp;   &amp;   &amp;   &amp; N_{i-p,p}\left(u_0\right) \\ 
   &amp;   &amp; N_{i-2,2}\left(u_0\right) &amp;   &amp;

- asked by Shutao Tang (11 votes), answered by xzczd (7 votes)

—————————-

[Nearest Kronecker Product] (http://mathematica.stackexchange.com/questions/91651/nearest-kronecker-product)

Some people (see The ubiquitous Kronecker product by Van Loan) have worked on finding two matrices \(\mathbf A\),\(\mathbf B\) of specified size whose tensor product \(\mathbf A\otimes \mathbf B\) is closest ...

- asked by pdmclean (10 votes), answered by Guess who it is. (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 (87 votes), answered by Leonid Shifrin (96 votes)

—————————-

[3D surface that looks like a virus] (http://mathematica.stackexchange.com/questions/74193/3d-surface-that-looks-like-a-virus)

I have been recently using Mathematica for composing animations that are part of the supplementary information of my papers.

I am currently trying to build an animation that involves a viral ...

- asked by user2098 (16 votes), answered by Chris Degnen (18 votes)

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

[Restarting random number generators where you left off] (http://mathematica.stackexchange.com/questions/91612/restarting-random-number-generators-where-you-left-off)

I have code that uses both RandomReal and RandomInteger a number of times to produces a sequence of \(n\) data sets. After closing the notebook and quitting the kernel, I would like to be able to start ...

- asked by user26718 (7 votes)

—————————-

[Swinging Beam example from Help. Not Understanding/Not Working] (http://mathematica.stackexchange.com/questions/91393/swinging-beam-example-from-help-not-understanding-not-working)

To help me understand finite element analysis with Mathematica I have been reading the Finite Element Method User Guide in Help and am stuck on the example in Coupled PDEs. Here there is a static beam ...

- asked by Hugh (2 votes)

—————————-

[Mathematica 10 Audio Export Issue] (http://mathematica.stackexchange.com/questions/91649/mathematica-10-audio-export-issue)

Summary of the problem: When exporting data as an audio file (AIFF/WAV etc.), there appears to be unwanted scaling and offset in the data such that the minimum and maximum values are forced to be -1 ...

- asked by Rahul (2 votes)

6.21 Tuesday, August 11, 2015

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

[Listable compiled function crashes the kernel with "no more memory available"] (http://mathematica.stackexchange.com/questions/90081/listable-compiled-function-crashes-the-kernel-with-no-more-memory-available)

Bug introduced in 9.0.0 and persisting through 10.2.0

I am trying to speed up a function that involves continued fractions. Since ContinuedFraction cannot be compiled and the alternative way with ...

- asked by shrx (16 votes)

—————————-

[Can Mathematica Export Shapefiles?] (http://mathematica.stackexchange.com/questions/90063/can-mathematica-export-shapefiles)

Mathematica is great at importing ESRI shapefiles (.shp).

Import["http://exampledata.wolfram.com/usamap.zip", "Graphics"]

But it seems like it’s a glaring omission that it can’t export them. ...

- asked by kale (16 votes), answered by kale (21 votes)

—————————-

[Integration of a PDE solution over a custom-defined subdomain] (http://mathematica.stackexchange.com/questions/90094/integration-of-a-pde-solution-over-a-custom-defined-subdomain)

Preamble: In my previous question I raised a problem of a custom-chosen integration of the solution of a PDE. In that case it was an integration along a line lying within the PDE domain. The solution ...

- asked by Alexei Boulbitch (11 votes), answered by Michael E2 (6 votes)

—————————-

[Detect if code is running in the cloud] (http://mathematica.stackexchange.com/questions/91202/detect-if-code-is-running-in-the-cloud)

Wolfram offers several services for running code in the cloud: Mathematica Online, Programming Cloud, CloudEvaluate, etc.

How can a piece of code detect if it is being run in the cloud or the ...

- asked by Szabolcs (11 votes), answered by Leonid Shifrin (10 votes)

—————————-

[Fastest way to sum the upper triangle] (http://mathematica.stackexchange.com/questions/90067/fastest-way-to-sum-the-upper-triangle)

I feel like this is an recurring question: if there’s a symmetric matrix whose diagonal is not all 0, how could I get the sum of the part of it that’s above the diagonal as fast as possible?

Small ...

- asked by arax (10 votes), answered by MarcoB (3 votes)

—————————-

[Possible bug in VonMisesDistribution?] (http://mathematica.stackexchange.com/questions/90019/possible-bug-in-vonmisesdistribution)

Observe:

FullSimplify[PDF[VonMisesDistribution[\[Mu], 0], x], (((-Pi + \[Mu] & )*lt; ) = (x & )*lt; ) = 
 Pi + \[Mu]] == FullSimplify[PDF[UniformDistribution[{\[Mu] - Pi, \[Mu] + Pi}], x], 
   (((-Pi + \[Mu] & )*lt; ) = (x & )*lt; ) = Pi + \[Mu]] 
 
(* True *)

...

- asked by ciao (10 votes), answered by Karsten 7. (7 votes)

—————————-

[Faster position-based duplicate removal in a ragged array?] 

(http://mathematica.stackexchange.com/questions/91191/faster-position-based-duplicate-removal-in-a-ragged-array)

Take a ragged 2D array:

rArray=4, 2, 1, 0, 2, 2, 0, 0, 3, 3, 3, 4, 0, 3, 4

I need to "deduplicate" this, where a duplicate is any element of a sublist where that element exists at the ...

- asked by ciao (9 votes), answered by sakra (7 votes)

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

[How to ask Mathematica to imitate Andy Warhol’s pop-art painting?] (http://mathematica.stackexchange.com/questions/59132/how-to-ask-mathematica-to-imitate-andy-warhols-pop-art-painting)

I tried to ask Mathematica to imitate Andy Warhol, let it convert a Marilyn Monroe’s portrait so that it looks like Warhol’s world famous pop-art painting. However, the result shown below is far from ...

- asked by Putterboy (43 votes), answered by belisarius (50 votes)

—————————-

[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 ...

- asked by PeterR (25 votes), answered by Guess who it is. (19 votes)

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

[Mathematica package for explicit matrix representations of group generators?] (http://mathematica.stackexchange.com/questions/89964/mathematica-package-for-explicit-matrix-representations-of-group-generators)

While there are several packages that are capable of working with weights and roots (for example LieArt), I couldn’t find any package that spits out explicit matrices for the generators, for example ...

- asked by JakobH (4 votes)

—————————-

[Mathematica claiming two Weierstrass half-periods not independent] (http://mathematica.stackexchange.com/questions/91322/mathematica-claiming-two-weierstrass-half-periods-not-independent)

I have the following code:

f[x_, y_, p_] = (p*(E^(Pi/y)*x + 2*x*Cosh[(2*Pi*x)/y] - 
 2*Sinh[(2*Pi*x)/y]))/(y*(E^(Pi/y) + 2*Cosh[(2*Pi*x)/y])); 
 
y1 = 1/11; 
 
t1 = I*y1; 
 
p1 = 1; 
 
xf =  ... 

- asked by spietro (1 vote)

—————————-

[Solving for the roots of a trilinear system of polynomials] http://mathematica.stackexchange.com/questions/91254/solving-for-the-roots-of-a-trilinear-system-of-polynomials

I have been trying to solve for the roots of the following system of trilinear polynomials:

eq1 = a6 x y + a5 x z + a4 y z + a3 x + a2 y + a1 z + a0; 
eq2 = x y z + b6 x y + b5 x z + b4 y z + b3 x +  ... 
 
- asked by Kagaratsch (2 votes) 

6.22 Tuesday, August 4, 2015

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

[Upgrade to Windows 10] http://mathematica.stackexchange.com/questions/89407/upgrade-to-windows-10

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

- asked by Lubos Motl (23 votes), answered by RunnyKine (21 votes)

—————————-

[Solve slower in versions 9 and 10] http://mathematica.stackexchange.com/questions/89650/solve-slower-in-versions-9-and-10

With some systems of equations, Solve is much slower in versions 9 and 10 than in earlier versions, apparently because it is doing more simplification of the results.

With the following example ...

- asked by Simon Rochester (21 votes), answered by Michael E2 (11 votes)

—————————-

[Speeding up the built-in Rudin-Shapiro and Thue-Morse sequence functions] http://mathematica.stackexchange.com/questions/89345/speeding-up-the-built-in-rudin-shapiro-and-thue-morse-sequence-functions

Version 10.2 introduced two well-studied sequences as functions: the (Golay-)Rudin-Shapiro sequence (RudinShapiro[]) and the (Prouhet-)Thue-Morse sequence (ThueMorse[]). Since these functions are ...

- asked by Guess who it is. (19 votes), answered by Oleksandr R. (22 votes)

—————————-

[Change in Lighting and Show in V10?] http://mathematica.stackexchange.com/questions/89491/change-in-lighting-and-show-in-v10

According the documentation for Show:

Options explicitly specified in Show override those included in the graphics expression. The lists of non-default options in the Subscript[g, i] are ...

- asked by Michael E2 (13 votes), answered by Mr.Wizard (7 votes)

—————————-

[Global‘ context not empty at startup in v10.2.0] http://mathematica.stackexchange.com/questions/89686/global-context-not-empty-at-startup-in-v10-2-0

Bug introduced in 10.2 and persisting through 10.2 or later

Note that the analysis of this problem revealed a different problem than in Potential pollution of Global‘ context in fresh kernel (see ...

- asked by Chen Stats Yu (12 votes), answered by Michael E2 (8 votes)

—————————-

[How to monitor the progress of training a classifier?] http://mathematica.stackexchange.com/questions/89444/how-to-monitor-the-progress-of-training-a-classifier

I've had p = Predict[x -&gt; y] running for hours and I have now idea if 
I should kill it or not. 
 
I'm looking for some rough bounds for an estimate of how long Predict[] or 
Classify[] will take to  ...

- asked by M.R. (12 votes), answered by Sebastian (12 votes)

—————————-

[All value types for a symbol?] http://mathematica.stackexchange.com/questions/89607/all-value-types-for-a-symbol

Robby Villegas here shows a nice way to see all the types associated with a symbol. He sets a symbol, valueTypes, to an explicit list of the values types in version 3.0 of Mathematica (I took off his ...

- asked by Reb.Cabin (11 votes), answered by Reb.Cabin (6 votes)

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

[How to perform a multi-peak fitting?] http://mathematica.stackexchange.com/questions/26336/how-to-perform-a-multi-peak-fitting

I am wondering how to implement the multi-peak detecting and fitting in Mathematica. Following is an example of fitting the data using three peaks (such that the data   peak1 + peak2 + peak3).

The ...

- asked by Everett You (27 votes), answered by Silvia (29 votes)

—————————-

[Get a "step-by-step" evaluation in Mathematica] http://mathematica.stackexchange.com/questions/148/get-a-step-by-step-evaluation-in-mathematica

Is it possible in Mathematica to get a step-by-step evaluation of some functions; that’s to say, outputting not only the result but all the stages that have led to it? If so, how does one do it?

...

- asked by Skydreamer (75 votes), answered by Guess who it is. (61 votes)

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

[Fast Partition of list at depth 2] http://mathematica.stackexchange.com/questions/89809/fast-partition-of-list-at-depth-2

I am looking to partition a list up at a certain depth level. Following code should demonstrate what I mean:

test = Table[Random[], {1000}, {32}, {32}]; 
 
result = Map[Partition[#, {5, 5}, 1] &amp;,  ...

- asked by Julian Francis (6 votes)

—————————-

[ListLogPlot error when forcing y axes start at 0] http://mathematica.stackexchange.com/questions/89524/listlogplot-error-when-forcing-y-axes-start-at-0

I came across an error I can not circumvent.

When plotting the following:

ListLogPlot[Table[1/x, {x, 1, 100}]]

I receive a functioning plot. If I now want to add a specific PlotRange, i.e.

...

- asked by mondo (4 votes)

—————————-

[DSolve returns an answer that is not a solution] http://mathematica.stackexchange.com/questions/89550/dsolve-returns-an-answer-that-is-not-a-solution

Investigating DSolve misses a solution of a differential equation, I came across this odd behavior of DSolve.

The following DSolve command returns an answer to the ODE but the solutions do not ...

- asked by Michael E2 (5 votes)

6.23 Tuesday, July 28, 2015

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

[A With expression local variable specification without head List] http://mathematica.stackexchange.com/questions/88920/a-with-expression-local-variable-specification-without-head-list

I just noticed a new form of With in its documentation:

  With[$x=x_0$, $expr$]

specifies that all occurrences of the symbol \(x\) in \(expr\) should be replaced by \(x_0\).

Note the lack of braces ...

- asked by jkuczm (17 votes), answered by Itai Seggev (9 votes)

—————————-

[New AssociationThread forms in 10.2?] http://mathematica.stackexchange.com/questions/88940/new-associationthread-forms-in-10-2

Is this another case of "documented" but "not implemented" ? or at least it is not explained clearly as I cannot make it work:

Two new forms appears in the new 10.2 doc. of AssociationThread (the ...

- asked by SquareOne (17 votes)

—————————-

[Visualizing Type System Operations] http://mathematica.stackexchange.com/questions/89080/visualizing-type-system-operations

With the introduction of Dataset in version 10, Mathematica acquired a static type-checking subsystem. A fair number of dataset-related questions here on MSE concern the operation of that type ...

- asked by WReach (16 votes), answered by WReach (16 votes)

—————————-

[Dataset seems to break Information] http://mathematica.stackexchange.com/questions/89036/dataset-seems-to-break-information

Bug present in version 10.2

My little function, from pre-10.2 ,to turn a headed table into a Dataset. 
 
toDataset[table_List] := 
  Dataset@(Association /@ (Function[r, Thread[First[r] -&gt; #]  ...

- asked by Ymareth (16 votes), answered by WReach (14 votes)

—————————-

[Initial values in Manipulate are hijacked by existing global variable values] http://mathematica.stackexchange.com/questions/89108/initial-values-in-manipulate-are-hijacked-by-existing-global-variable-values

Is the following behaviour a bug?  It's the same in all versions between 9.0-10.2.0. 
 
Let's try this simple Manipulate with the initial value of a set to 1: 
 
Manipulate[Style[a, Large], {{a, 1}, 0,  ...

- asked by Szabolcs (13 votes)

—————————-

[Undocumented fourth parameter of Collect; how long has it been there?] http://mathematica.stackexchange.com/questions/88781/undocumented-fourth-parameter-of-collect-how-long-has-it-been-there

While tinkering with How to get a list of monomials of a polynomial without coefficients? on a whim I tried a fourth argument in Collect and found:

Collect[(x + y + z + 1)^2, {x, y}, foo, bar]

...

- asked by Mr.Wizard (13 votes)

—————————-

[How can we show the boundary of a WordCloud shape?] http://mathematica.stackexchange.com/questions/88846/how-can-we-show-the-boundary-of-a-wordcloud-shape

WordCloud can arrange the words inside a shape. 
 
data = EntityValue[CountryData[], {"Name", "Population"}]; 
WordCloud[data, Disk[], WordOrientation -&gt; "Random", Frame -&gt; True]

As you can see ...

- asked by Szabolcs (12 votes), answered by Sjoerd C. de Vries (12 votes)

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

Parallel and perpendicular symbol from Mathematica to LaTeXhttp://mathematica.stackexchange.com/questions/46538/parallel-and-perpendicular-symbol-from-mathematica-to-latex

I want to get the following expression from Mathematica to LaTeX\[ \begin {bmatrix} E_{\parallel } \\ E_{\perp } \end {bmatrix} \] I have tried to use inbuilt ’symbol’ character from the special ...

- asked by Steve Hatcher (4 votes), answered by Sjoerd C. de Vries (9 votes)

—————————-

[Generating visually pleasing circle packs] http://mathematica.stackexchange.com/questions/40334/generating-visually-pleasing-circle-packs

EDIT: (my conclusion and thank you note) I want to thank you all guys for this unexpected intellectual and artistic journey. Hope you had fun and enjoyed it the same as I did.

I would like to ...

- asked by VividD (79 votes), answered by level1807 (49 votes)

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

[Call library function in compile] http://mathematica.stackexchange.com/questions/89134/call-library-function-in-compile

On the Wolfram official website, there is an example of calling library function in a compiled function:

Needs["CompiledFunctionTools`"]

...

- asked by xslittlegrass (2 votes)

—————————-

[MMA breaks down when DSolve -ing a third-order linear ODE] http://mathematica.stackexchange.com/questions/88862/mma-breaks-down-when-dsolve-ing-a-third-order-linear-ode

My code is:

DSolve[y'''[x] + (x^3 + a^3) y[x] == 0, y[x], x] 
 
It should be noted that similar code not only meets the similar 
problem but also returns more warning messages: 
 
DSolve[y'''[x] + (x^3  ...

- asked by WateSoyan (9 votes)

—————————-

[HistogramList is much Slower in 10.2 vs 10.1] http://mathematica.stackexchange.com/questions/88992/histogramlist-is-much-slower-in-10-2-vs-10-1

While I was running a code I wrote using version 10.1, I noticed that in version 10.2 the running time of the same code was more than twice as long. After some digging, I figured out the culprit is ...

- asked by RunnyKine (10 votes)

6.24 Tuesday, July 21, 2015

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

[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 ...

- asked by Nakilon (19 votes), answered by nikie (33 votes)

—————————-

[What is behind Mathematica’s experimental ‘FindFormula‘ function?] http://mathematica.stackexchange.com/questions/88511/what-is-behind-mathematicas-experimental-findformula-function

In version 10.2 there is a new experimental function: FindFormula.

I suspect that a genetic programming algorithm (symbolic regression) is behind this new feature but I can’t find any references.

My ...

- asked by vonjd (18 votes)

—————————-

[Is there a GraphicsPrimitiveQ (or a complete list of Heads of graphics primitives)?] http://mathematica.stackexchange.com/questions/88342/is-there-a-graphicsprimitiveq-or-a-complete-list-of-heads-of-graphics-primitive

For various reasons related to workflow associated with creating figures for journals, I am creating functions that will accept graphics primitives and a set of options and spit out a Graphics object ...

- asked by march (16 votes), answered by rcollyer (13 votes)

—————————-

[Symbolic area calculation for a parametric self-intersecting closed curve] http://mathematica.stackexchange.com/questions/88623/symbolic-area-calculation-for-a-parametric-self-intersecting-closed-curve

The parametric equation of the curve is:

\[\begin {cases} x &amp;= -9 \sin (2 t)-5 \sin (3 t) \\[6pt] y &amp; = 9 \cos (2 t)-5 \cos (3 t) \end {cases}\quad t\in [0,2\pi ]\]

which can be easily ...

- asked by LCFactorization (13 votes), answered by belisarius (21 votes)

—————————-

[What’s the point of ContainsAll, ContainsAny and friends?] http://mathematica.stackexchange.com/questions/88295/whats-the-point-of-containsall-containsany-and-friends

Mathematica 10.2 contains a few new functions that test set containment: ContainsAll, ContainsAny and a few others. The documentation mentions that these are equivalent to existing functions like ...

- asked by nikie (12 votes)

—————————-

[10.2 Dataset extraneous print using Transpose] http://mathematica.stackexchange.com/questions/88238/10-2-dataset-extraneous-print-using-transpose

Introduced in 10.2, fixed by paclet update (GeneralUtilities 10.2.1).

This is probably patch code in 10.2. Is there a way to turn off print with Transpose?

ds = &lt;|"k1" -&gt; &lt;|"a" -&gt; 1,  ...

- asked by alancalvitti (11 votes), answered by Michael E2 (12 votes)

—————————-

[What will happen if I set ExclusionsStyle for points in 2D plot?] http://mathematica.stackexchange.com/questions/88479/what-will-happen-if-i-set-exclusionsstyle-for-points-in-2d-plot

For example

f[x_] := (x^5 - 4 x^2 + 1)/(x - 1/2); 
Plot[f[x], {x, -1, 2}, Exclusions -&gt; {f[x] == 0}, ExclusionsStyle -&gt; Dashed]

Has the ExclusionsStyle -&gt; Dashed option done anything ...

- asked by xzczd (11 votes), answered by xzczd (13 votes)

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

[No weekends please] http://mathematica.stackexchange.com/questions/78735/no-weekends-please

I need to get the DateValues of the last 30 days (starting from yesterday, not today!) excluding saturdays and sundays. I want that the dates are german time (GMT + 1). The only solution I have found ...

- asked by eldo (4 votes), answered by Pickett (12 votes)

—————————-

[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?

- asked by stevenvh (18 votes), answered by Artes (14 votes)

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

[RegionPlot, RegionPlot3D and differing embedding dimensions] http://mathematica.stackexchange.com/questions/88584/regionplot-regionplot3d-and-differing-embedding-dimensions

RegionPlot seems to be for plotting regions with an embedding dimensions of 2 only, and RegionPlot3D for regions with an embedding dimensions of 3.

Yet passing a region of the wrong embedding ...

- asked by Szabolcs (5 votes)

—————————-

[How can I force the use of sparse diagonalization methods?] http://mathematica.stackexchange.com/questions/88551/how-can-i-force-the-use-of-sparse-diagonalization-methods

When I evaluate the Eigenvalues function on a very large 
(e.g. 2^16 x 2^16) sparse matrix, Mathematica says something like:

Because finding 65536 out of the 65536 eigenvalues and/or eigenvectors ...

- asked by P.R. (4 votes)

—————————-

[How to Copy formatted code without backslashes added?] http://mathematica.stackexchange.com/questions/88539/how-to-copy-formatted-code-without-backslashes-added

By default code copied from the FrontEnd is formatted with backslashes added at the ends of lines. For example, evaluating in a Notebook

Range[40]

and copying the output produces the following when ...

- asked by Alexey Popkov (9 votes)

6.25 Tuesday, July 14, 2015

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

[New behavior of PlotRange in Mathematica 10] http://mathematica.stackexchange.com/questions/87808/new-behavior-of-plotrange-in-mathematica-10

In Mathematica 10, when I plot data that has small changes around some non-zero value, the plot chooses a PlotRange that "collapses" the data so that the variations cannot be seen. The only way I can ...

- asked by Greg Cook (17 votes), answered by Mr.Wizard (13 votes)

—————————-

[Simple Matrix multiplication takes very long] http://mathematica.stackexchange.com/questions/87857/simple-matrix-multiplication-takes-very-long

Bug introduced in 10.1.0

I came across some strange behaviour during a computation involving matrices with symbolic values. It is reproduced below.

Multiplying a random 30x30 array with symbolic ...

- asked by A. Roy (14 votes)

—————————-

[Why does leaving and re-entering a context lose values defined in that context?] http://mathematica.stackexchange.com/questions/88147/why-does-leaving-and-re-entering-a-context-lose-values-defined-in-that-context

I’m getting unexpected behavior when beginning a new context, leaving it, and then re-entering it. Specifically, when re-entering the context, symbols that had been previously defined in that context ...

- asked by ibeatty (12 votes), answered by Simon Rochester (13 votes)

—————————-

[Use of Key to extract a key value in Associations not working in V10.1] http://mathematica.stackexchange.com/questions/88034/use-of-key-to-extract-a-key-value-in-associations-not-working-in-v10-1

V10.1:

&lt;|a -&gt; 1|&gt;[Key @ a] 
(* Missing["KeyAbsent", Key[a]]*) 
 
 
V10.0: 
 
&lt;|a -&gt; 1|&gt;[Key @ a] 
(* 1 *)

Bug or Design Change?

- asked by Ronald Monson (11 votes), answered by Szabolcs (8 votes)

—————————-

[Using Mathematica to solve a probability problem] http://mathematica.stackexchange.com/questions/88178/using-mathematica-to-solve-a-probability-problem

The problem is from Principles of Statistics by M.G. Bulmer:

In a certain survey of the work of chemical research workers, it was found, on the basis of extensive data, that on average each man ...

- asked by billc (10 votes), answered by ciao (11 votes)

—————————-

[What does this message mean and how serious is it?] http://mathematica.stackexchange.com/questions/87891/what-does-this-message-mean-and-how-serious-is-it

I had some Mathematica files on over which recently I have faced to this message:

However, after searching, I have seen some blogs in Mathematica SE or in somewhere else about that, but I could not ...

- asked by mr.0093 (9 votes), answered by Mr.Wizard (17 votes)

—————————-

[Remove static objects from an image sequence] http://mathematica.stackexchange.com/questions/87901/remove-static-objects-from-an-image-sequence

Is it possible to remove static objects/pixels from a sequence of images?

Lets say I have a black square in the middle of my white picture (white background) and a black circle is orbiting around it. ...

- asked by PH13 (9 votes), answered by Pickett (6 votes)

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

[Multivariable Taylor expansion does not work as expected] http://mathematica.stackexchange.com/questions/15023/multivariable-taylor-expansion-does-not-work-as-expected

The basic multivariable Taylor expansion formula around a point is as follows:

\[ f(\mathbf r + \mathbf a) = f(\mathbf r) + (\mathbf a \cdot \nabla )f(\mathbf r) + \frac {1}{2!}(\mathbf a \cdot \]

- asked by matheorem (15 votes), answered by Jens (21 votes)

—————————-

[How to ask Mathematica to imitate Andy Warhol’s pop-art painting?] http://mathematica.stackexchange.com/questions/59132/how-to-ask-mathematica-to-imitate-andy-warhols-pop-art-painting

I tried to ask Mathematica to imitate Andy Warhol, let it convert a Marilyn Monroe’s portrait so that it looks like Warhol’s world famous pop-art painting. However, the result shown below is far from ...

- asked by Putterboy (43 votes), answered by belisarius (50 votes)

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

[How to add AccuracyGoal and PrecisionGoal options in a numerical function?] http://mathematica.stackexchange.com/questions/88182/how-to-add-accuracygoal-and-precisiongoal-options-in-a-numerical-function

There are many built-in functions that contain AccuracyGoal, PrecisionGoal and WorkingPrecision.

For instance

NSolve 
 
NSolve[x^3 + 2 x + 7 == 0, x, WorkingPrecision -&gt; 40] 
 
 
 
 {{x -&gt;  ...

- asked by Shutao Tang (4 votes)

—————————-

[What is the best way to take the Bourdet derivative?]http://mathematica.stackexchange.com/questions/87760/what-is-the-best-way-to-take-the-bourdet-derivative

Given a list of paired delta-time, delta-pressure, \((dt,dp)\), what might be the best approach to calculate the Bourdet derivative, described below? I am unclear how to manipulate elements of the ...

- asked by John (4 votes)

—————————-

[Dirichlet coefficients as limits: wrong] http://mathematica.stackexchange.com/questions/87766/dirichlet-coefficients-as-limits-wrong

Perhaps I should have included the word "bug" in my question. Here we go

There is a bug in this Limit

Limit[3^s (-1 - 2^-s + Zeta[s]), s -&gt; \[Infinity]] 
(* 0 *) 
 
It should be 1 
 
and there is a  ... 
 
- asked by Dr. Wolfgang Hintze (7 votes) 
 

6.26 Tuesday, July 7, 2015

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

[Faster binary Hamming weight for big integers?]http://mathematica.stackexchange.com/questions/87486/faster-binary-hamming-weight-for-big-integers

While working on an answer to Count the sequences in an array I found that DigitCount was the bottleneck in my code when used as DigitCount[num, 2, 1]. DigitCount first expands the number to an ...

- asked by Mr.Wizard (17 votes), answered by Oleksandr R. (15 votes)

—————————-

[Dataset vs an association of associations]http://mathematica.stackexchange.com/questions/87360/dataset-vs-an-association-of-associations

Associations with a record structure (e.g., a flat table) can be organised in one of two main ways. First as a list of associations, which is also used in the case of Mathematica’s data set ...

- asked by Mac (16 votes), answered by WReach (16 votes)

—————————-

[Count the sequences in an array]http://mathematica.stackexchange.com/questions/87406/count-the-sequences-in-an-array

Is there a short and easier way to count number of sequences in a list?

Let’s say I have three lists:

list1 = 0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0

list2 = 0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1 ...

- asked by gurluk (13 votes), answered by Leonid Shifrin (16 votes)

—————————-

[Plot is discontinuous (it shouldn’t be)]http://mathematica.stackexchange.com/questions/87504/plot-is-discontinuous-it-shouldnt-be

Plot[{(E^x)^(-2I \[Pi])Hypergeometric2F1[-2I \[Pi]-2I Sqrt[2]\[Pi], 
   -2I \[Pi]+2I Sqrt[2]\[Pi],1-4I \[Pi],-E^x]+(E^x)^(2I \[Pi])Hypergeometric2F1[2I \[Pi]-2I...

- asked by grdgfgr (12 votes), answered by MarcoB (13 votes)

—————————-

[What’s wrong with Simplify and FullSimplify?]http://mathematica.stackexchange.com/questions/87305/whats-wrong-with-simplify-and-fullsimplify

I have a quite complex list of equations and inequalities I combine to a boundary condition for my cost function. After investigation of two days I found the bug (I really name it a bug!). One of my ...

- asked by akm (11 votes), answered by Bob Hanlon (3 votes)

—————————-

[What function generates random numbers in a compiled function?]http://mathematica.stackexchange.com/questions/87364/what-function-generates-random-numbers-in-a-compiled-function

I am writing a simulation for 2D random walk. I wrote several version of code, and found that the speed is like this (fastest to slowest): C++, Mathematica compiled procedural code, Mathematica ...

- asked by Felix (11 votes), answered by Szabolcs (11 votes)

—————————-

[Trainable WEKA segmentation of images] http://mathematica.stackexchange.com/questions/87256/trainable-weka-segmentation-of-images

Is there a Mathematica equivalent of Trainable WEKA Segmentation as implemented in Fiji, the image processing software? A Google search did not return any relevant links.

I attach the original image ...

- asked by JMarc (11 votes), answered by blochwave (17 votes)

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

[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, a and b, how can I make Jacobian matrix automatically in Mathematica?

$$ a=\left( 
\begin{array}{c} 
 \text{x1}^3+2\text{x2}^2 \\ 
 3\text{x1}^4+7\text{x2} 
\end{array} 
$$

- asked by George Mills (19 votes), answered by Jens (26 votes)

—————————-

[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?

- asked by stevenvh (18 votes), answered by Artes (14 votes)

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

[Does Sum calculate all terms before summing them?] http://mathematica.stackexchange.com/questions/87444/does-sum-calculate-all-terms-before-summing-them

After calculating the sum of a large number of large objects, using

B = Sum[RandomInteger[{0, 1}, {10^6}], {100}];

I find that MaxMemoryUsed[] has increased by 400MB, which is about 100 times ...

- asked by Stephen Powell (1 vote)

—————————-

[Performing a convolution for smoothing a function]http://mathematica.stackexchange.com/questions/87674/performing-a-convolution-for-smoothing-a-function

I want to smooth a one-dimensional oscillating function by convolving it with another function that I’ll call the screening function. This screening function should have a trapezoidal form and go to ...

- asked by user34801 (2 votes)

—————————-

[Alternative to use a function as an argument in Compile]http://mathematica.stackexchange.com/questions/87618/alternative-to-use-a-function-as-an-argument-in-compile

I am currently working on problems that require the use of functions such as :

Alpine[x__] := Total@Table[Abs[i*Sin[i] + 0.1*i], {i, x}]; 
ParabolaMin [x__] := Total@Table[i^2, {i, x}]; 
 
 
It may be  ... 
 
- asked by Doedalos (1 vote) 

6.27 Tuesday, June 30, 2015

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

[Does Mathematica have a built-in tool that allows one to operate on both sides of an equation?]http://mathematica.stackexchange.com/questions/86906/does-mathematica-have-a-built-in-tool-that-allows-one-to-operate-on-both-sides-o

Geogebra has a very neat CAS view that allows one to solve an equation step by step in the following fashion:

\(\quad \quad \quad \quad \quad \quad \quad \quad \quad \)

You type an equation and ...

- asked by Voyska (19 votes), answered by Alexei Boulbitch (25 votes)

—————————-

[Is ColorDistance symmetric?]http://mathematica.stackexchange.com/questions/86730/is-colordistance-symmetric

Is the function ColorDistance symmetric, i.e. is it always true that ColorDistance[a,b] == ColorDistance[b,a], as use of the word distance would suggest?

- asked by Szabolcs (15 votes), answered by Szabolcs (15 votes)

—————————-

[my Mathematica has turned orange and not able to find out why]http://mathematica.stackexchange.com/questions/87072/my-mathematica-has-turned-orange-and-not-able-to-find-out-why

I do not know what happened. But when I rebooted my PC, now Mathematica comes up orange colored. I shut down the PC and tried again, it is still orange. Here is screen shot:

I also did a reset. ...

- asked by Nasser (14 votes), answered by Sjoerd C. de Vries (14 votes)

—————————-

[Solve a trig equation system] http://mathematica.stackexchange.com/questions/86894/solve-a-trig-equation-system

Background of the problem

In the same plane, P is a fixed point, A,B,C are moving point, PA=a, PB=b, PC=c, find the maximize perimeter of ?ABC.

let ?BPC=A, ?CPA=B, ?APB=2*Pi-A-B, then the ...

- asked by mathe (13 votes), answered by Guess who it is. (19 votes)

—————————-

[How to retrieve current FaceForm?] http://mathematica.stackexchange.com/questions/86990/how-to-retrieve-current-faceform

The current colour in a Graphics object can be retrieved using CurrentValue["Color"] for use in Dynamic stuff.

Example:

Graphics[ RGBColor[2/3, 1/3, 2/3], Dynamic[If[CurrentValue["MouseOver"], ...

- asked by Szabolcs (12 votes), answered by Mr.Wizard (10 votes)

—————————-

[Using Simplify on a consistent system returns False]http://mathematica.stackexchange.com/questions/86791/using-simplify-on-a-consistent-system-returns-false

Bug introduced in 8.0 and persisting through 10.1.0 or later

It’s late, but am I missing something here? Why should two independent equations, which together are consistent, Simplify to False?

...

- asked by Michael E2 (10 votes), answered by Jens (5 votes)

—————————-

[Modifying strings in a list efficiently] http://mathematica.stackexchange.com/questions/86778/modifying-strings-in-a-list-efficiently

I have a list of strings \(\{s_1,s_2,\ldots ,s_n\}\). I would like to to produce the following list of strings:

$$ 
\{s_1&lt;&gt;1,\ 1&lt;&gt;s_2&lt;&gt;1,\ldots,\ 1&lt;&gt;s_n\} 
$$

In other words, I want ...

- asked by pre-kidney (10 votes), answered by ciao (7 votes)

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

[Finding real roots of negative numbers (for example, \(\sqrt [3]{-8}\))] http://mathematica.stackexchange.com/questions/3886/finding-real-roots-of-negative-numbers-for-example-sqrt3-8

Say I want to quickly calculate \(\sqrt [3]{-8}\), to which the most obvious solution is \(-2\).

When I input \(\sqrt [3]{-8}\) or Power[-8, 3^-1], Mathematica gives the result \(2 (-1)^{1/3}\). Not what I ...

- asked by jtbandes (36 votes), answered by Brett Champion (19 votes)

—————————-

[Parallel and perpendicular symbol from Mathematica to LaTeX] http://mathematica.stackexchange.com/questions/46538/parallel-and-perpendicular-symbol-from-mathematica-to-latex

I want to get the following expression from Mathematica to LaTeX:

\begin{bmatrix} 
E_{\parallel} \\ E_{\perp} 
\end{bmatrix}

I have tried to use inbuilt ’symbol’ character from the special ...

- asked by Steve Hatcher (4 votes), answered by Sjoerd C. de Vries (9 votes)

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

[Why is the Max function so slow when operating on lists of dates?]http://mathematica.stackexchange.com/questions/87204/why-is-the-max-function-so-slow-when-operating-on-lists-of-dates

Example:

dates = DateRange[DateObject[], DatePlus[DateObject[], 15]]; First[AbsoluteTiming[Max[dates]]]

(* 21.364247 *)

As a workaround, DateObject[Max[AbsoluteTime /@ dates]] will get the same ...

- asked by rhennigan (3 votes)

—————————-

[Discrete Fourier Transform baseline subtraction]http://mathematica.stackexchange.com/questions/86951/discrete-fourier-transform-baseline-subtraction

I am trying to remove sinusoidal variability from a set of evenly-spaced intensity vs. time data. These data contain periodic events that are separated by a normalized (but sinusoidally variable) ...

- asked by John (1 vote)

—————————-

[How to use Wolfram language in an external program with low latency?]http://mathematica.stackexchange.com/questions/87168/how-to-use-wolfram-language-in-an-external-program-with-low-latency

Im using Wolfram language on Pi B,and I want to compile a ’.m’ file (like "test.m" that contains Wolfram functions), in an external program like a C/C++ and then Export the output in an image file ...

- asked by Babak akbari (1 vote)

6.28 Tuesday, June 23, 2015

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

[Summer Solstice Spurious Correlations Challenge] http://mathematica.stackexchange.com/questions/86413/summer-solstice-spurious-correlations-challenge

I came across this hilarious web site that has charts of bizarre "correlations" between disparate categories. Results like this:

In the spirit of my summer solstice shedding spuriously earned rep. ...

- asked by ciao (20 votes)

—————————-

[Is there any Mathematica functionality enabling its use for the blind?]http://mathematica.stackexchange.com/questions/86538/is-there-any-mathematica-functionality-enabling-its-use-for-the-blind

A colleague of mine has become blind as the result of a sudden medical misfortune. We want to help him to feel useful and active again. We, however, still cannot determine what can be done and to what ...

- asked by Alexei Boulbitch (17 votes)

—————————-

[Nearest neighbor search in n-dimensions]http://mathematica.stackexchange.com/questions/86262/nearest-neighbor-search-in-n-dimensions

Suppose a list of items such as: L1 = RandomReal[0, 100, 1000];

I need to find the position of each k-neighbor in the original list. And very quickly if possible. As we can see, the problem is ...

- asked by Doedalos (14 votes), answered by bill s (14 votes)

—————————-

[HDF5 importing large arrays]http://mathematica.stackexchange.com/questions/86544/hdf5-importing-large-arrays

I have some computations that output a 300,000,000 element array of long unsigned ints, so about 2.4GB, in an h5 file. Mathematica handles files south of 2GB fine, albeit taking very long to import ...

- asked by Kartoffelpelz (13 votes), answered by Albert Retey (7 votes)

—————————-

[How does Rescale[] handle infinities?]http://mathematica.stackexchange.com/questions/86365/how-does-rescale-handle-infinities

Rescale appears to be a simple function. It just does a simple linear \(y = a x + b\) type rescaling of the values:

Rescale@Range[0, 10] (* 0, 1/10, 1/5, 3/10, 2/5, 1/2, 3/5, 7/10, 4/5, 9/10, 1 *)

...

- asked by Szabolcs (13 votes), answered by LLlAMnYP (5 votes)

—————————-

[How to fill the space outside of an image after rotating it]http://mathematica.stackexchange.com/questions/86528/how-to-fill-the-space-outside-of-an-image-after-rotating-it

I want to rotate this image by -50 degrees, and then fill up the black space around the rotated image with a bluish color. I can’t find any documentation/answers that suggest how to do it. (Sorry ...

- asked by George Wolfe (12 votes), answered by ubpdqn (21 votes)

—————————-

[How do I add my own help pages to the in-built Wolfram documentation?]http://mathematica.stackexchange.com/questions/86137/how-do-i-add-my-own-help-pages-to-the-in-built-wolfram-documentation

How do I add my own help pages to the in-built Wolfram documentation ?

- asked by Peter Lindsay (11 votes)

================================== 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 ...

- asked by Guess who it is. (352 votes), answered by faysou (323 votes)

—————————-

[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] 
 ...

- asked by Prashant Bhate (17 votes), answered by Simon (24 votes)

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

[Export 3D plot or Graphics3D object as stereoscopic 3D .jps file]http://mathematica.stackexchange.com/questions/86354/export-3d-plot-or-graphics3d-object-as-stereoscopic-3d-jps-file

I recently came across some Matlab code to output a 3D graph as a stereoscopic left/right .JPS file, viewable e.g. with 3D Media Viewer, Stereoscopic Player or using any 3D television or beamer: ...

- asked by Tom Wenseleers (2 votes)

—————————-

[DiscretizeRegion of ImplicitRegion too small]http://mathematica.stackexchange.com/questions/86600/discretizeregion-of-implicitregion-too-small

I have a 2D function that has some sharp peeks within the my domain. I need to find a tight region that contains these sharp peeks. The following is an example of what I would like to do.

An example ...

- asked by c186282 (2 votes)

—————————-

[Is it possible to automatically apply Parallelize when possible]http://mathematica.stackexchange.com/questions/86373/is-it-possible-to-automatically-apply-parallelize-when-possible

Parallelize in Mathematica is pretty easy to use. Most of the time, applying Parallelize to an expression, it tries to evaluates expr using automatic parallelization. Is there an option that ...

- asked by Kattern (2 votes)

6.29 Tuesday, June 16, 2015

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

[Memoization with pure functions?]http://mathematica.stackexchange.com/questions/85750/memoization-with-pure-functions

Is this possible?

If I have a simple function, say:

f=If[#&gt;0,1,2]&amp; 
 
 
then for each value of # this will re-evaluate f right? 

Is it possible to define a pure function like this:

...

- asked by maria (30 votes), answered by Leonid Shifrin (39 votes)

—————————-

[Trying to Visualize a Collatz - The Collatz conjecture] http://mathematica.stackexchange.com/questions/85718/trying-to-visualize-a-collatz-the-collatz-conjecture

So I’m new in this and learning— and I happen to have this collatz

collatz[x_, y_] := If[x == 3*y || x == 2*y + 1 || y == 3*x || y == 2*x + 2, 2, 0] 
 
Array[#1 + 2 #2 &amp;, {4, 4}]

output =

3, ...

- asked by Madona (20 votes), answered by Sjoerd C. de Vries (25 votes)

—————————-

[How to plot an emission spectrum?]http://mathematica.stackexchange.com/questions/85990/how-to-plot-an-emission-spectrum

If I have a list of data with various wavelengths in nanometers, how would I plot them on a graph so it looks like this:

So far I have managed to plot a spectrum in DensityPlot, but I have no idea ...

- asked by Alizter (15 votes), answered by MarcoB (18 votes)

—————————-

[How: 2D scatterplots with quantitative density-dependent coloring]http://mathematica.stackexchange.com/questions/85530/how-2d-scatterplots-with-quantitative-density-dependent-coloring

Consider the following scatterplot of a 50K-point dataset:

ListPlot[data, 
 AspectRatio -&gt; Automatic, PlotRange -&gt; {{x0, x1}, {y0, y1}}, 
 ImageSize -&gt; Small, 
 Frame -&gt; True, 
  ...

- asked by kjo (15 votes), answered by MarcoB (16 votes)

—————————-

[How to define a recursive pattern?]http://mathematica.stackexchange.com/questions/85683/how-to-define-a-recursive-pattern

I want to translate this recursive syntactic definition into a Mathematica pattern1:

\[ \mathtt {x}: \begin {cases} \text {Null}\\ \{\textit {integer}, \mathtt {x}\} \end {cases} \]

In other ...

- asked by kjo (12 votes), answered by Leonid Shifrin (17 votes)

—————————-

[Mathematica: 3D plot based on combined 2D graphs] http://mathematica.stackexchange.com/questions/85717/mathematica-3d-plot-based-on-combined-2d-graphs

I have several sigmoidal fits to 3 different datasets, with mean fit predictions plus the 95% confidence limits (not symmetrical around the mean) and the actual data.

I would now like to show these ...

- asked by Tom Wenseleers (11 votes), answered by halmir (13 votes)

—————————-

[What’s the function that takes X[Y[z___]] to Y[X[z___]]? ("swap heads")] http://mathematica.stackexchange.com/questions/85872/whats-the-function-that-takes-xyz-to-yxz-swap-heads

I’ve seen the operation described in the title before (basically, swap the heads of the first two levels of an expression), but I can’t find it...

Does anyone know the function (or idiom/incantation) ...

- asked by kjo (11 votes), answered by Kuba (13 votes)

================================== 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 ...

- asked by Guess who it is. (351 votes), answered by faysou (323 votes)

—————————-

[Is it possible to export the equations from Mathematica to MATLAB?]http://mathematica.stackexchange.com/questions/14035/is-it-possible-to-export-the-equations-from-mathematica-to-matlab

Is it possible to export the output expressions from Mathematica computations (e.g., equations) in valid MATLAB syntax?

- asked by Seyhmus Gungoren (23 votes), answered by The Toad (30 votes)

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

[Sub-processes (like XML.exe, GZIP.exe) not ended properly]http://mathematica.stackexchange.com/questions/85668/sub-processes-like-xml-exe-gzip-exe-not-ended-properly

I have difficulties with running MathKernel.exe from .NET and sub-processes like XML.exe and GZIP.exe, which are not terminated properly. Sometimes even the MathKernel.exe task stays active and is ...

- asked by akm (1 vote)

—————————-

[Fitting data to a complicated function]http://mathematica.stackexchange.com/questions/85778/fitting-data-to-a-complicated-function

So, where to begin. I have a certain dataset that I want to fit to a function. However, the function is rather complicated (matrix inversions, linearsolve) and does in general not have a closed form ...

- asked by user129412 (2 votes)

—————————-

[Partitioning Table]http://mathematica.stackexchange.com/questions/85820/partitioning-table

I have a long vector array in the following format:

x1,y1,z1,a,b,c,x1,y1,z2,d,e,f,...,x1,y2,z1,g,h,i,x1,y2,z2, ...

- asked by user27670 (3 votes)

6.30 Tuesday, June 9, 2015

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

[Error "Throw::nocatch: Uncaught Throw[False] returned to top level" given each time I open a new Mathematica 10.1 session]http://mathematica.stackexchange.com/questions/85013/error-thrownocatch-uncaught-throwfalse-returned-to-top-level-given-each-t

From a few days now each time I open a new Mathematica session I get the small error messages window with the error

Throw::nocatch: Uncaught Throw[False] returned to top level.

repeatedly given, as ...

- asked by glance (13 votes), answered by ilian (7 votes)

—————————-

[Is it possible to extract data from an eps plot not generated in Mathematica?]http://mathematica.stackexchange.com/questions/85320/is-it-possible-to-extract-data-from-an-eps-plot-not-generated-in-mathematica

I want to extract data from an eps plot not generated in Mathematica and replot it. In general is it possible to extract data from plots in any formats in Mathematica? I searched but unfortunately ...

- asked by Soodeh Z. (11 votes), answered by Alexey Popkov (15 votes)

—————————-

[Mimic a procedural, recursive clustering algorithm for site percolation using functional programming]http://mathematica.stackexchange.com/questions/85185/mimic-a-procedural-recursive-clustering-algorithm-for-site-percolation-using-fu

Sorry in advance for my logorrhea: I just want to make sure all of the information is here.

Context and Question

I am investigating site percolation on a square lattice. I have a working, ...

- asked by march (11 votes), answered by Virgil (7 votes)

—————————-

[Subtracting two plots from each other after shifting one]http://mathematica.stackexchange.com/questions/85420/subtracting-two-plots-from-each-other-after-shifting-one

I have the following lists representing energy spectra that need to be subtracted from each other to produce a difference spectrum.

data1 = ...

- asked by W. Heisenberg (10 votes), answered by Histograms (15 votes)

—————————-

[Lookup with default broken in Dataset]http://mathematica.stackexchange.com/questions/85114/lookup-with-default-broken-in-dataset

Given an Association,

data = &lt;|"1" -&gt; &lt;|"A" -&gt; 10, "B" -&gt; 20|&gt;, 
  "2" -&gt; &lt;|"C" -&gt; 30, "B" -&gt; 40|&gt;|&gt;

Lookup works w/ default:

 data // Map[Lookup[#, "A", 0]  ...

- asked by alancalvitti (10 votes), answered by WReach (5 votes)

—————————-

[Confused by the opts : OptionsPattern[ ] pattern] http://mathematica.stackexchange.com/questions/85347/confused-by-the-opts-optionspattern-pattern

I’m trying to make sense of the syntax in the clause opts:OptionsPattern[], as found in this standard "rule-based" (pseudo-)function definition pattern:

aFunction[a1_, a2_, a3_,  ...

- asked by kjo (9 votes)

—————————-

[Why Mathematica cannot apply The Fundamental Theorem of Calculus automatically?] http://mathematica.stackexchange.com/questions/85166/why-mathematica-cannot-apply-the-fundamental-theorem-of-calculus-automatically

For some reason Mathematica cannot evaluate this definite integral:

$Version 
(* 10.1.0  for Microsoft Windows (64-bit) (March 24, 2015) *) 
 
Integrate[1/(Sqrt[x] Sqrt[1 - x + x^2]), {x, 1, 2}] 
(*  ...

- asked by Vladimir Reshetnikov (8 votes), answered by Dr. Wolfgang Hintze (4 votes)

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

[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___] :=  ...

- asked by Istvan Zachar (71 votes), answered by Sjoerd C. de Vries (38 votes)

—————————-

[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 \(y\) axis. How can I have two different axis?

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

- asked by 500 (84 votes), answered by ArgentoSapiens (77 votes)

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

[ConvexHullMesh sometimes excludes valid points from convex hull] http://mathematica.stackexchange.com/questions/85466/convexhullmesh-sometimes-excludes-valid-points-from-convex-hull

I have a sequence of polytopes that I am trying to visualize, and I find that ConvexHullMesh sometimes excludes points from the convex hull, and it does so inconsistently.

In particular, notice these ...

- asked by Marcus P S (2 votes)

—————————-

[How to specify finite difference approximation order in ‘NDSolve‘] http://mathematica.stackexchange.com/questions/85439/how-to-specify-finite-difference-approximation-order-in-ndsolve

According to here, NDSolve, when using the method of lines, creates partial derivatives in the spacial coordinate (lets talk just about one spacial coordinate for now) using the finite difference ...

- asked by rspencer (1 vote)

—————————-

[Better to have infinities in limits or integrands (‘NIntegrate‘)?] http://mathematica.stackexchange.com/questions/85483/better-to-have-infinities-in-limits-or-integrands-nintegrate

I'm using ListPlot to plot the integral of a function with respect of the function's second variable: 
ListPlot[NIntegrate[integrand[x, #], {x, -Infinity, 0}]&amp;/@Range[10, 20]]. The integral  ...

- asked by Love Learning (2 votes)

6.31 Tuesday, June 2, 2015

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

[Python-style plots in Mathematica] http://mathematica.stackexchange.com/questions/84877/python-style-plots-in-mathematica

I love making plots in Mathematica. And i love to spend a lot of time making high-quality plots that maximize readability and aesthetics. For most cases, mathematica can make very beautiful images, ...

- asked by Pablo Galindo Salgado (28 votes), answered by halirutan (29 votes)

—————————-

[Numerically solving Helmholtz equation in 3D for arbitrary shapes] http://mathematica.stackexchange.com/questions/84726/numerically-solving-helmholtz-equation-in-3d-for-arbitrary-shapes

Context

While studying manifold Learning I got interested in finding the eigenvectors of the Laplacian. (also in connection to this problem of solving the heat equation)

Following this and that ...

- asked by chris (22 votes)

—————————-

[Can A Plot Be Overlayed With A Map?] http://mathematica.stackexchange.com/questions/84598/can-a-plot-be-overlayed-with-a-map

Some brief, only slightly important background. I am doing a research project using the data from NASA’s GRACE mission. I wrote a short Perl script to take two data files and find the change in ...

- asked by disc otter (16 votes), answered by Mr.Wizard (16 votes)

—————————-

[How can we make publication-quality PlotMarkers without version 10?] http://mathematica.stackexchange.com/questions/84857/how-can-we-make-publication-quality-plotmarkers-without-version-10

Suppose that for certain reasons we are not yet using Mathematica version 10, or we have a version with buggy PlotMarkers. It is well known that the default markers are font glyphs, and as a result ...

- asked by Oleksandr R. (15 votes), answered by Oleksandr R. (13 votes)

—————————-

[Eigenfunctions of the Laplacian on an arbitrary mesh] http://mathematica.stackexchange.com/questions/84607/eigenfunctions-of-the-laplacian-on-an-arbitrary-mesh

So, I’ve constructed a mesh over which I’d like to find eigenfunctions of Laplace’s equation with a free boundary (a zero Neumann boundary condition along the edge).

Mostly because I figured an ...

- asked by Michael Lee (14 votes), answered by Michael Lee (4 votes)

—————————-

[Why is ListPlot so slow here?] http://mathematica.stackexchange.com/questions/84739/why-is-listplot-so-slow-here

While examining How can I monitor the progress of a Plot? I was surprised to discover that in some cases ListPlot in version 10.0 and 10.1 is orders of magnitude slower than it is in version 7. This ...

- asked by Mr.Wizard (13 votes)

—————————-

[Is there a way to control which special forms Normal converts?] http://mathematica.stackexchange.com/questions/84783/is-there-a-way-to-control-which-special-forms-normal-converts

Normal documentation reads:

Normal[expr] converts expr to a normal expression, from a variety of special forms.

But is there a way to control which special forms it converts and which it does ...

- asked by Mr.Wizard (11 votes), answered by Mr.Wizard (13 votes)

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

[Get a "step-by-step" evaluation in Mathematica] http://mathematica.stackexchange.com/questions/148/get-a-step-by-step-evaluation-in-mathematica

Is it possible in Mathematica to get a step-by-step evaluation of some functions; that’s to say, outputting not only the result but all the stages that have led to it? If so, how does one do it?

...

- asked by Skydreamer (70 votes), answered by Guess who it is. (57 votes)

—————————-

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

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

- asked by night owl (17 votes), answered by Artes (19 votes)

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

[Why is setting SynchronousUpdating -> True causes mouse motion to pause/freeze Dynamics?] http://mathematica.stackexchange.com/questions/84826/why-is-setting-synchronousupdating-true-causes-mouse-motion-to-pause-freeze-d

When making a Manipulate, I noticed that setting SynchronousUpdating -&gt; True 
have a very annoying side effect. By just moving the mouse anywhere on 
the same cell the Manipulate is running, causes  ...

- asked by Nasser (4 votes)

—————————-

[Using a Mathematica index as a DiscreteVariable in NDSolve when solving a coupled set of ordinary differential equations] http://mathematica.stackexchange.com/questions/84471/using-a-mathematica-index-as-a-discretevariable-in-ndsolve-when-solving-a-couple

Context

Since the explanation below of the problem to be solved is lengthy, let me preamble this by saying that I have code that works to solve the problem, but I don’t know whether (1) it’s ...

- asked by march (6 votes)

—————————-

[Why is Transpose Dataset slow in one direction]http://mathematica.stackexchange.com/questions/84585/why-is-transpose-dataset-slow-in-one-direction

Transpose is faster when it distributes Keys at the 2nd level of a Dataset than when it factors them out.

 ds[len_] := &lt;|"a" -&gt; Range[len], "b" -&gt; (1/Range[len] // N)|&gt; // Dataset

...

- asked by alancalvitti (4 votes)

6.32 Tuesday, May 26, 2015

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

[A bug in Integrate] http://mathematica.stackexchange.com/questions/84089/a-bug-in-integrate

Integrate[(1 + 16 Tan[2 x - y]^2)/(1 + 4 Tan[2 x - y]^2), {x, 0, 2 Pi}]

Mathematica (wrong) output is (tested under versions 8 and 10.0, took   1 minute of CPU time)

10 Pi

The correct value of this ...

- asked by Vaclav Kotesovec (17 votes), answered by Histograms (11 votes)

—————————-

[What is the FrontEnd?] http://mathematica.stackexchange.com/questions/84173/what-is-the-frontend

Can anyone sort out what the Front-End is, how it is structured and what its relationship to the Kernel is. The FrontEnd is mentioned quite often but elusively avoids to be caught and clearly defined. ...

- asked by MathLind (15 votes), answered by Mr.Wizard (12 votes)

—————————-

[Regime Change Stochastic Process] http://mathematica.stackexchange.com/questions/84054/regime-change-stochastic-process

I would like to simulate an Ito process in which the drift and diffusion terms change after hitting a boundary for the first time.

For example, a Geometric Brownian Motion X which has 0 drift and ...

- asked by Shffl (12 votes), answered by Sjoerd C. de Vries (9 votes)

—————————-

[How to speed up Colorize] http://mathematica.stackexchange.com/questions/83967/how-to-speed-up-colorize

I have a list of about 500 images similar to the following:

A = Import["http://i.stack.imgur.com/1bV4O.png"] 
AbsoluteTiming[Colorize[A, ColorFunction -&gt; "AvocadoColors"]]

Gives   0.6 ...

- asked by DarrenM (11 votes), answered by bill s (7 votes)

—————————-

[Does Mathematica have an equivalent of Python’s float.as_integer_ratio?] http://mathematica.stackexchange.com/questions/84234/does-mathematica-have-an-equivalent-of-pythons-float-as-integer-ratio

The Python programming language has a float.as_integer_ratio(x) 
function which exactly converts an IEEE 754 floating-point number 
into a numerator/denominator pair of integers. For example:

...

- asked by David Zhang (10 votes), answered by Guess who it is. (15 votes)

—————————-

[Does Mathematica have an equivalent of C’s nextafter?]http://mathematica.stackexchange.com/questions/84237/does-mathematica-have-an-equivalent-of-cs-nextafter

In C (and many other programming languages), there is a function

double nextafter(double x, double y)

which takes two (IEEE 754) floating-point numbers and returns the next representable ...

- asked by David Zhang (9 votes), answered by Michael E2 (5 votes)

—————————-

[How can I make FilledCurve smoother?]http://mathematica.stackexchange.com/questions/84247/how-can-i-make-filledcurve-smoother

In How can I generate and randomly assign color to annular sectors? J.M. showed an interesting way to create a sector graphic using FilledCurve. Unfortunately it was marred by an inferior rendering ...

- asked by Mr.Wizard (9 votes), answered by Mr.Wizard (9 votes)

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

[Alternatives to Mathematica]http://mathematica.stackexchange.com/questions/28162/alternatives-to-mathematica

Inspired by the recent question Alternatives to LaTeX (currently 58 upvotes) on http://tex.stackexchange.com/:

Are there any paid-for or open source alternatives to Mathematica which produce equal or ...

- asked by akk (28 votes), answered by Sumit (17 votes)

—————————-

[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 ...

- asked by Simpleton Jack (221 votes), answered by mikuszefski (340 votes)

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

[Simplification with absolute value]http://mathematica.stackexchange.com/questions/83933/simplification-with-absolute-value

I have a long expression that has absolute values in the exponent. Some parts of the expression would clearly simplify if one assumes that the power is an odd or even integer. When I give one of this ...

- asked by Jools (1 vote)

—————————-

[Wrong Limit with LaguerreL] http://mathematica.stackexchange.com/questions/84077/wrong-limit-with-laguerrel

Limit[(n!LaguerreL[n,-1]/(n^(n+1/4)/Sqrt[2]/E^(n-2Sqrt[n]+1/2))-1)Sqrt[n],n-&gt;\[Infinity]]

Mathematica (wrong) output

13/16 = 0.8125

The right result is:

31/48 = 0.645833...

But numerically it ...

- asked by Vaclav Kotesovec (5 votes)

—————————-

[Fast construction and reshaping of large tensors]http://mathematica.stackexchange.com/questions/83999/fast-construction-and-reshaping-of-large-tensors

I’m trying to construct a large matrix which is derived from some higher rank tensor (the rank of interest to me changes case by case, so it needs to be a general method). Currently, the process of ...

- asked by user12876 (1 vote)

6.33 Tuesday, May 19, 2015

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

[Why is calling Dot with many arguments so inefficient?] http://mathematica.stackexchange.com/questions/83412/why-is-calling-dot-with-many-arguments-so-inefficient

Say I want to multiply a reasonably large list of symbolic matrices.

tab = 
 Partition[#,4]&amp;/@ 
  Table[ 
   Symbol[CharacterRange["a","z"][[nm]]&lt;&gt;ToString[nn]],{nn,1,12},{nm,1,16}];

...

- asked by murphy (13 votes), answered by Hurkyl (7 votes)

—————————-

[Performance problems in new Sequence functions]http://mathematica.stackexchange.com/questions/83325/performance-problems-in-new-sequence-functions

The new-in-10.1 Sequence* family of functions should provide newly optimized methods for handling sequence problems. Happily in some cases they do! For example Murta reports 28 times faster ...

- asked by Mr.Wizard (12 votes)

—————————-

[What are SparseArray Properties? How and when should they be used?]http://mathematica.stackexchange.com/questions/83721/what-are-sparsearray-properties-how-and-when-should-they-be-used

A strange undocumented form of SparseArray is increasingly used in answers on this site:

SparseArray[(* data *)]["NonzeroPositions"]

What is this, and why would anyone want to use this? Are there ...

- asked by Mr.Wizard (11 votes), answered by Mr.Wizard (12 votes)

—————————-

[A better (but slower) FullSimplify function]http://mathematica.stackexchange.com/questions/83756/a-better-but-slower-fullsimplify-function

I am creating this question and posting an answer to it as a help for those who have problems with Mathematica simplification oddities that appear in many other questions on the site.

First of all, ...

- asked by Giovanni (10 votes), answered by Giovanni (10 votes)

—————————-

[Is there a programmatic equivalent of Edit > Find?]http://mathematica.stackexchange.com/questions/83492/is-there-a-programmatic-equivalent-of-edit-find

Most things that can be done via the front-end interface in Mathematica can also be accomplished by some function. Is that the case for find-and-replacing? That is, is there some code I could execute ...

- asked by thecommexokid (10 votes), answered by Mr.Wizard (10 votes)

—————————-

[Is FullGraphics an abandoned function? Is there an alternative?]http://mathematica.stackexchange.com/questions/83648/is-fullgraphics-an-abandoned-function-is-there-an-alternative

FullGraphics hasn’t worked entirely for a long time and the situation appears to be getting worse instead of better. In Mathematica 10.0 and 10.1 a simple usage throws numerous errors and returns a ...

- asked by Mr.Wizard (10 votes)

—————————-

[How to find all the positions of max value of a list efficiently?]http://mathematica.stackexchange.com/questions/83602/how-to-find-all-the-positions-of-max-value-of-a-list-efficiently

For Example, list=RandomInteger[1,100,2000]. Yes,I know Position[list,Max[list]] can do. But it’s based on pattern matching! Ordering[list,-1] could find one position but not all. So how to ...

- asked by WateSoyan (10 votes), answered by Pickett (14 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 (74 votes), answered by Leonid Shifrin (80 votes)

—————————-

[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  ...

- asked by PeterR (24 votes), answered by Guess who it is. (19 votes)

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

[Indeterminate expression 0(I*Infinity]) on indefinite integrals on first use only]http://mathematica.stackexchange.com/questions/83450/indeterminate-expression-0iinfinity-on-indefinite-integrals-on-first-use-onl

I do not know if this is new or not, I googled before.

Windows 7, 10.1 64 bit: Integrals generate this error message

The strange thing also is that the message shows up the first time the command ...

- asked by Nasser (3 votes)

—————————-

[Undo automatic update] http://mathematica.stackexchange.com/questions/83795/undo-automatic-update

I was working with Predict function (with a neural network and today, and when I executed the same notebook I have been working for some time, Machine Learning package was automatically updated (it ...

- asked by Miguel (2 votes)

—————————-

[How to match the arguments of the function in any order] http://mathematica.stackexchange.com/questions/83396/how-to-match-the-arguments-of-the-function-in-any-order

The issue is the following, with a dumb function with (4) arguments of (4) different heads (for each head is always no grater than one arguments):

func[x_a,y_b,z_c,w_d] := Print[x,y,z,w]

If I type ...

- asked by d555 (3 votes)

6.34 Tuesday, May 12, 2015

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

[Documentation of the frequently-used functions in the context of Internal‘ and Compile‘] http://mathematica.stackexchange.com/questions/82790/documentation-of-the-frequently-used-functions-in-the-context-of-internal-and-c

In this site, I have gradually found out that there is a collection of functions in all kinds of answers. For instance, Compile‘GetElement, Internal‘Bag,etc. However, these functions are undocumented. ...

- asked by Shutao Tang (21 votes), answered by blochwave (12 votes)

—————————-

[Does Mathematica store hidden information for matrix objects?]http://mathematica.stackexchange.com/questions/82854/does-mathematica-store-hidden-information-for-matrix-objects

Bug introduced in 10.0.0 and persisting through 10.1.0 or later

I found a case where calling one built-in function (HermitianMatrixQ) for a given matrix changes the behavior of another built-in ...

- asked by user3126814 (20 votes)

—————————-

[What’s going on with performance of Tally here?]http://mathematica.stackexchange.com/questions/82978/whats-going-on-with-performance-of-tally-here

Observe:

l1 = l2 = RandomInteger[1, 100000, 1000000]; l2[[-1]] = -1; t1 = First@Timing@Tally[l1]; t2 = First@Timing@Tally[l2];

l1 = l2 = RandomInteger[1, 100000, 1000100]; l2[[-1]] = -1; t3 = ...

- asked by ciao (16 votes), answered by Michael E2 (4 votes)

—————————-

[Hightlight all the self-intersections of a Lissajous figure]http://mathematica.stackexchange.com/questions/83118/hightlight-all-the-self-intersections-of-a-lissajous-figure

This graphalso known as a Lissajous figurecontains so many self-intersections.How can I highlight them?

ParametricPlot[{Sin[100 t], Sin[99 t]}, {t, 0, 2 Pi}, 
     PlotRange -&gt; All]

- asked by WateSoyan (13 votes), answered by 2012rcampion (22 votes)

—————————-

[Is MathieuC for moderately large imaginary arguments broken?] http://mathematica.stackexchange.com/questions/83032/is-mathieuc-for-moderately-large-imaginary-arguments-broken

I’m trying to plot MathieuC[-3,0.3,I x] for \(x\in [0,10]\), and here’s what I get (using ListPlot and Table instead of Plot to make computation faster and use a regular grid):

...

- asked by Ruslan (13 votes)

—————————-

[In 10.1.0 BenchmarkPlot doesn’t work?] http://mathematica.stackexchange.com/questions/83226/in-10-1-0-benchmarkplot-doesnt-work

In Mathematica 10.1.0 BenchmarkPlot from the GeneralUtilities package doesn’t work; copying Taliesin Beynon’s initial use of the function on this site:

Needs["GeneralUtilities`"] 
 
myPosIdx[x_] :=  ...

- asked by Mr.Wizard (12 votes), answered by Mr.Wizard (12 votes)

—————————-

[How to ContourPlot a function of the coordinates on the Earth’s surface on a map projection] http://mathematica.stackexchange.com/questions/83050/how-to-contourplot-a-function-of-the-coordinates-on-the-earths-surface-on-a-map

There are two similar questions (this and this), but one is too specific and the other is apparently not clear and has no answers. I’ll try to make the question more complete.

Suppose you have a ...

- asked by unlikely (12 votes), answered by Kuba (13 votes)

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

[Is it possible to export the equations from Mathematica to MATLAB?] http://mathematica.stackexchange.com/questions/14035/is-it-possible-to-export-the-equations-from-mathematica-to-matlab

Is it possible to export the output expressions from Mathematica computations (e.g., equations) in valid MATLAB syntax?

- asked by Seyhmus Gungoren (23 votes), answered by The Toad (30 votes)

—————————-

[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 ...

- asked by Simpleton Jack (216 votes), answered by mikuszefski (337 votes)

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

[Negative accuracy numerics ( 0“-128 notation )] http://mathematica.stackexchange.com/questions/82683/negative-accuracy-numerics-0-128-notation

What does it mean to have a negative accuracy number?

I understand 0“128 to mean "the number zero to 128 decimal points". Mathematica corroborates this:

In[1]:= 0``128 &lt; 1 
(* Out[1]= True *) 
 ...

- asked by jjstankowicz (6 votes)

—————————-

[Orthogonal projection of NURBS surface]http://mathematica.stackexchange.com/questions/82855/orthogonal-projection-of-nurbs-surface

How can one make an orthogonal projection of NURBS surface? For example the one from wolfram demos http://demonstrations.wolfram.com/DesigningACarBodyWithSplines/.

- asked by justartem (2 votes)

—————————-

[DiracDelta and version 10.0.0] http://mathematica.stackexchange.com/questions/83198/diracdelta-and-version-10-0-0

Note: This issue seems to affect version 10.0.0 only and is fixed in 10.0.1, 10.0.2, and 10.1

When evaluating the following two inputs:

Integrate[DiracDelta[1-x] DiracDelta[y-2] Sin[x] Cos[y], x, ...

- asked by Nid (2 votes)

6.35 Tuesday, May 5, 2015

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

[Two, maybe related, issues with ParallelTable] http://mathematica.stackexchange.com/questions/82496/two-maybe-related-issues-with-paralleltable

I will use a very simple example for demonstrating two issues I face with ParallelTable, one with respect to the speed and one with respect to the use of memory. These issues might be related.

Let us ...

- asked by Fred Simons (14 votes), answered by Mr.Wizard (2 votes)

—————————-

[Switch from logarithmic to linear scaling partway along a plot’s axis] http://mathematica.stackexchange.com/questions/82581/switch-from-logarithmic-to-linear-scaling-partway-along-a-plots-axis

In the 2015 Planck satellite results, they give the latest plot of the temperature power spectrum of the cosmic microwave background, which I show below. (I am only interested in the main plot; you ...

- asked by thecommexokid (11 votes), answered by LLlAMnYP (13 votes)

—————————-

[Solving and Animating Three Body Problem] http://mathematica.stackexchange.com/questions/81340/solving-and-animating-three-body-problem

I am attempting to solve a three-body problem using the Lagrange formalism, with a 1/r potential.

I started off by defining T and U (kinetic and potential energy) as follows:

Tx = .5 m1  x1'[t]^2 +  ...

- asked by Puru (11 votes), answered by Vitaliy Kaurov (22 votes)

—————————-

[Analyze touching particles with holes in a microscopic image] http://mathematica.stackexchange.com/questions/81176/analyze-touching-particles-with-holes-in-a-microscopic-image

I am looking for an easy method to count individual particles in a microscopic image. It is quite difficult for Mathematica to detect them, because they are touching each other. I am quite a beginner ...

- asked by Niki (11 votes), answered by nikie (15 votes)

—————————-

[How do I draw a polygon defined by a list of data points?] http://mathematica.stackexchange.com/questions/81191/how-do-i-draw-a-polygon-defined-by-a-list-of-data-points

I am attempting to make a 3D model of a device defined by a list of x,y,z points, digitized from a 2D image. The z coordinate is defined in mma.

What I tried so far:

area = 0, 452.45658, ...

- asked by Peter (10 votes), answered by kguler (7 votes)

—————————-

[Is there a good reason for the removal of this FrameTicks syntax?] http://mathematica.stackexchange.com/questions/82625/is-there-a-good-reason-for-the-removal-of-this-frameticks-syntax

In past versions of Mathematica one could use a terse syntax for FrameTicks:

bottom, left, top, right

In 10.1 this syntax is no longer recognized requiring the addition of two sets of brackets:

...

- asked by Mr.Wizard (8 votes)

—————————-

[How to remove outliers from data] http://mathematica.stackexchange.com/questions/81121/how-to-remove-outliers-from-data

I have a data with noise which some times includes significant outliers. The position of the outliers are random.

For example:

data1 = Table[PDF[NormalDistribution[3.5, .8], i], i, -5, 15, .01] + ...

- asked by Algohi (8 votes), answered by lalmei (8 votes)

================================== 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 \(y\) axis. How can I have two different axis?

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

- asked by 500 (81 votes), answered by ArgentoSapiens (75 votes)

—————————-

[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  ...

- asked by PeterR (24 votes), answered by Guess who it is. (19 votes)

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

[Arrowhead becomes unattached to line in a Graphics3D Manipulate]http://mathematica.stackexchange.com/questions/81306/arrowhead-becomes-unattached-to-line-in-a-graphics3d-manipulate

I’m trying to Manipulate a Graphics3D figure, and am seeing some errors. If I execute the following code, and move the slider, the head on one of arrows bounces around, unattached to the line of the ...

- asked by rhomboidRhipper (2 votes)

—————————-

[How to define \(\operatorname {Mc}\) and \(\operatorname {Ms}\) Mathieu functions in terms of MathieuC and MathieuS?] http://mathematica.stackexchange.com/questions/81395/how-to-define-operatornamemc-and-operatornamems-mathieu-functions-in-t

Reading multiple books about Mathieu functions, I always come across notation like \(\operatorname {ce}_r(z,q)\), \(\operatorname {se}_r(z,q)\) for angular functions and \(\operatorname {Ce}_r(z,q)\), ...

- asked by Ruslan (2 votes)

—————————-

[Partial Differential Formatting by default] http://mathematica.stackexchange.com/questions/82629/partial-differential-formatting-by-default

I read

http://blog.wolfram.com/2011/12/15/mathematica-qa-series-converting-to-conventional-mathematical-typesetting/

and I could use pdConv mentioned there, or

pdConv[f_] :=  TraditionalForm[ f  ...

- asked by Hojin Cho (1 vote)

6.36 Tuesday, April 28, 2015

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

[Removing a histogram’s vertical edges]http://mathematica.stackexchange.com/questions/80949/removing-a-histograms-vertical-edges

Let’s say I have a histogram:

Histogram[RandomVariate[NormalDistribution[10, 2], 500]]

How can I remove vertical lines inside the histogram and keep only the edge?

- asked by moso (18 votes), answered by halirutan (12 votes)

—————————-

[Generating animations of clouds with Mathematica]http://mathematica.stackexchange.com/questions/80486/generating-animations-of-clouds-with-mathematica

I’d like to generate some visually-pleasing animations of clouds, fog or smoke with Mathematica. My idea of "visually-pleasing" is along the lines of one of the images on the Wikipedia article for ...

- asked by blochwave (17 votes), answered by Simon Woods (18 votes)

—————————-

[Better way to visualize cylinder puzzle solution]http://mathematica.stackexchange.com/questions/80902/better-way-to-visualize-cylinder-puzzle-solution

The above puzzle has been a recent source of amusement in my clique.

I decided to provide a visualization to motivate solution (here):

My code:

s[x_] := Piecewise[{{4 Mod[x, 3]/3, 
     ...

- asked by ubpdqn (13 votes), answered by Jens (21 votes)

—————————-

[Mathematica 10.1.0.0 (OS X) high CPU usage even for empty notebook]http://mathematica.stackexchange.com/questions/80630/mathematica-10-1-0-0-os-x-high-cpu-usage-even-for-empty-notebook

Since update to 10.1.0.0 Mathematica has a high CPU usage even when no evaluation is running (even for empty notebook opened). I am running OS X Yosemite 10.10.3 on the following configuration:

...

- asked by Honza Drchal (11 votes), answered by BlBl (0 votes)

—————————-

[Right Ascension and Declination in astronomical functions] http://mathematica.stackexchange.com/questions/80787/right-ascension-and-declination-in-astronomical-functions

In the process of answering this question, I was forced to confront the various astronomical coordinate systems used by Mathematica.

Background

In astronomy, positions of celestial objects (stars, ...

- asked by Virgil (10 votes), answered by Virgil (12 votes)

—————————-

[Can’t inject EncryptedObject] http://mathematica.stackexchange.com/questions/80763/cant-inject-encryptedobject

Here are minimal examples:

encryptedObj = Encrypt["pass", "TestCase"]; 
 
Decrypt["pass", encryptedObj] (*returns correct "TestCase"*) 
 
 
 
With[{x = encryptedObj}, Button["Try with", Decrypt["pass",  ...

- asked by Kuba (10 votes), answered by WReach (7 votes)

—————————-

[Difference between Fitting Algorithms] http://mathematica.stackexchange.com/questions/80998/difference-between-fitting-algorithms

I am new to Mathematica, and I don’t quite understand, what the difference between the fitting algorithms Fit, FindFit, LinearModelFit, NonLinearModelFit are. Why is the syntax so different (\(1,x,x^2\) ...

- asked by Luca Thiede (9 votes), answered by MarcoB (10 votes)

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

[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, a and b, how can I make Jacobian matrix automatically in Mathematica?

$$ a=\left( 
\begin{array}{c} 
 \text{x1}^3+2\text{x2}^2 \\ 
 3\text{x1}^4+7\text{x2} 
\end{array} 
$$

- asked by George Mills (19 votes), answered by Jens (26 votes)

—————————-

[Is there an open source implementation of Mathematica-the-language?] http://mathematica.stackexchange.com/questions/4454/is-there-an-open-source-implementation-of-mathematica-the-language

I’ve seen questions before such as "What is the best open-source equivalent for Mathematica?", but that specific question (and that line of inquiry in general) cares more about the computer algebra ...

- asked by sblom (59 votes), answered by Simon (50 votes)

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

[Easy FindMaximum returns a wrong answer] http://mathematica.stackexchange.com/questions/81065/easy-findmaximum-returns-a-wrong-answer

FindMaximum in region is a new function in mma10,but when I tried the following example:

region = Polygon[{{0, 0}, {10, 0}, {10, 5}, {5, 5}, {5, 10}, {0, 10}}] 
FindMaximum[{x + y, {x, y} \[Element]  ...

- asked by WateSoyan (2 votes)

—————————-

[Diverging solution to coupled second order ODEs from NDSolve] http://mathematica.stackexchange.com/questions/80692/diverging-solution-to-coupled-second-order-odes-from-ndsolve

For a physics application I am considering the radial Bogoliubov-de Gennes equations in two dimensions. In dimensionless form they read as follows

$$ 
\begin{cases} 
 ...

- asked by Funzies (3 votes)

—————————-

[Does "FiniteRingData" or something like that exists?] http://mathematica.stackexchange.com/questions/81009/does-finiteringdata-or-something-like-that-exists

I want to find a function like FiniteGroupData but for finite rings. Does something like that exists?

- asked by kp9r4d (1 vote)

6.37 Tuesday, April 21, 2015

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

[Bug in MovingMap (breaking change between version 10.1 and 10.0.2)?] http://mathematica.stackexchange.com/questions/79931/bug-in-movingmap-breaking-change-between-version-10-1-and-10-0-2

The MovingMap window spec has been changed between version 10.1 and 10.0.2.

Version 10.0.2

MovingMap[h, a, b, c, d, e, f, 2] (* h[a, b], h[b, c], h[c, d], h[d, e], h[e, f] *)

Here we ...

- asked by Edmund (18 votes), answered by Stefan R (9 votes)

—————————-

[Analogue for Maple’s dchange - change of variables in differential expressions] http://mathematica.stackexchange.com/questions/80241/analogue-for-maples-dchange-change-of-variables-in-differential-expressions

Maple owns an interesting function called dchange which can change the variables of differential equations, but there seems to be no such function in Mathematica.

Has any one ever tried to write ...

- asked by xzczd (16 votes), answered by Kuba (18 votes)

—————————-

[Finding the period of an array of integers] http://mathematica.stackexchange.com/questions/80163/finding-the-period-of-an-array-of-integers

A simple array of integers is given. The problem is to detect if a pattern is repeatedly occurring in the array, and find the length of that pattern.

For example, for

19, 6, 19, 6, 19, 6, 19, 6, ...

- asked by VividD (12 votes), answered by Chris Degnen (6 votes)

—————————-

[How to have one or multiple Boxed graphics, mixed with non Boxed, in the same Graphics3D] http://mathematica.stackexchange.com/questions/80380/how-to-have-one-or-multiple-boxed-graphics-mixed-with-non-boxed-in-the-same-gr

In the following example, I would like to Boxed only the RegionPlot3D, and not the Sphere.

That is, to obtain this:

instead of this:

Here’s the sample code:

Show[ 
  RegionPlot3D[x^2 + y^3 -  ...

- asked by P. Fonseca (8 votes), answered by kguler (3 votes)

—————————-

[How to access an already opened Excel file in Mathematica?] http://mathematica.stackexchange.com/questions/80186/how-to-access-an-already-opened-excel-file-in-mathematica

This post 4594 shows how to open a existent Excel file with Mathematica. And this 6686886 shows how to do what I need, but in C#. This 12282310 is another related one.

How can I connect to a ...

- asked by Murta (8 votes), answered by Murta (8 votes)

—————————-

[JoinAcross on nested association by nested key] http://mathematica.stackexchange.com/questions/80311/joinacross-on-nested-association-by-nested-key

I would like to join two associations on nested keys. Is this possible?

first = {&lt;|"away" -&gt; &lt;|"name" -&gt; "bob", "money" -&gt; 10 |&gt;, "home" -&gt; &lt;|"name" -&gt; "Sue", "money"  ...

- asked by Ray Troy (7 votes), answered by WReach (8 votes)

—————————-

[How to synchronize the display of dynamic objects?] http://mathematica.stackexchange.com/questions/80027/how-to-synchronize-the-display-of-dynamic-objects

I was looking at this question, which asks to keep the orientation of some 3D graphics objects constant (relative to the viewer) while rotating the rest with the mouse. I thought that maybe the ...

- asked by Szabolcs (7 votes), answered by Gerli (3 votes)

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

[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 ...

- asked by Simpleton Jack (214 votes), answered by mikuszefski (335 votes)

—————————-

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

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

- asked by night owl (15 votes), answered by Artes (16 votes)

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

[MoonPosition and TimeZone support] http://mathematica.stackexchange.com/questions/80269/moonposition-and-timezone-support

With this question, I noticed some some weird results of MoonPosition. Consider the following code:

dateSunEclipse = DateObject[{2015,03,20,10,32,09},TimeZone-&gt;1]; 
dateSunEclipse0 =  ...

- asked by unlikely (5 votes)

—————————-

[I can create an H2 database with the H2 Console, but I can’t find the database with MMA] http://mathematica.stackexchange.com/questions/80408/i-can-create-an-h2-database-with-the-h2-console-but-i-cant-find-the-database-w

I can create an H2(Server) database using the tool that H2 provides,

but although i can create a memory based H2 database with the Database Explorer, when I try to create a connection to the ...

- asked by George Wolfe (1 vote)

—————————-

[Empty Blank regression in v10.1] http://mathematica.stackexchange.com/questions/80090/empty-blank-regression-in-v10-1

In v10.1.0.0 on Linux, when Blank[] is used in Alternatives with pattern that can match a sequence, whole pattern unexpectedly matches sequences of any length.

ClearAll[matchLists] 
matchLists[patt_]  ...

- asked by jkuczm (5 votes)

6.38 Tuesday, April 14, 2015

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

[many indefinite integrals do not evaluate in 10.1, looking for the cause] http://mathematica.stackexchange.com/questions/79367/many-indefinite-integrals-do-not-evaluate-in-10-1-looking-for-the-cause

Many integrals no longer evaluate in V 10.1 when they did in 10.0.2

Here are some 23 integrals as an example, that all produced results in V 10.0.2, but now all returns unevaluated!

I am hoping ...

- asked by Nasser (19 votes)

—————————-

[Why does a comma insert a line break in a comment?] http://mathematica.stackexchange.com/questions/79463/why-does-a-comma-insert-a-line-break-in-a-comment

I like to include capital letters and punctuation in my comments. But when I put a comma into a Mathematica comment of the (* ... *) type, it usually causes the comment line to break, with a new line ...

- asked by Ralph Dratman (17 votes), answered by sacratus (7 votes)

—————————-

[Why do lookup times in Dataset and Association differ by orders of magnitude?] http://mathematica.stackexchange.com/questions/79522/why-do-lookup-times-in-dataset-and-association-differ-by-orders-of-magnitude

Consider the following three data structures: a list of rules, an association, and a dataset:

 n = 1000000; 
 list = (ToString[#] -&gt; #) &amp; /@ Range[n]; 
 assoc = Association@list; 
 dataset =  ...

- asked by verse (14 votes), answered by WReach (10 votes)

—————————-

[How to get the directory of a package?] http://mathematica.stackexchange.com/questions/79510/how-to-get-the-directory-of-a-package

I have a package that I have placed in the $BaseDirectory
Applications directory so that Needs can find it. I have a logo in the directory that I will return when a function is called. However, when ...

- asked by Edmund (10 votes), answered by Szabolcs (10 votes)

—————————-

[RegionPlot returning a number] http://mathematica.stackexchange.com/questions/79572/regionplot-returning-a-number

Introduced in 10.0, persists in 10.1.

I had updated my mathematica to version 10 few days ago. And I had been shocked by the following fact:

s = FunctionInterpolation[Sin[x], x, 0, 1]; ...

- asked by WateSoyan (10 votes)

—————————-

[Why does Plot try symbolic values?] http://mathematica.stackexchange.com/questions/79573/why-does-plot-try-symbolic-values

I have the following code:

Test[a_] := (Print[a]; a*2) 
 
Plot[Test[a], {a, 0, 10}, PlotPoints -&gt; 5, MaxRecursion -&gt; 0]

This should plot a*2 for five points between a = 0 and a = 10, and print ...

- asked by Matthew (10 votes), answered by Simon Woods (9 votes)

—————————-

[Most efficient way of making pair list from a list] http://mathematica.stackexchange.com/questions/79622/most-efficient-way-of-making-pair-list-from-a-list

I have a bunch of datasets which looks like:

3 7 1 6 5 8 2 4 1 2 8 1 5 2 5 ...

and I need to make a list of pairs such that the first element makes a pair with other elements in the same line.

3 7 ...

- asked by Mahdi (9 votes), answered by Kuba (11 votes)

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

[List of compilable functions] http://mathematica.stackexchange.com/questions/1096/list-of-compilable-functions

Is there somewhere a list on the functions that Compile can compile, or the cases in which a particular function can be compiled that I haven’t found? I’d be glad even with a list of some of them ...

- asked by Rojo (83 votes), answered by Oleksandr R. (92 votes)

—————————-

[How to use Mathematica functions in Python programs?] http://mathematica.stackexchange.com/questions/4643/how-to-use-mathematica-functions-in-python-programs

I’d like to know how can I call Mathematica functions from Python.

I appreciate a example, for example, using the Mathematica function Prime.

I had search about MathLink but how to use it in Python ...

- asked by GarouDan (29 votes), answered by GarouDan (11 votes)

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

[Strange Integrate messages $RecursionLimit being ignored] http://mathematica.stackexchange.com/questions/79801/strange-integrate-messages-recursionlimit-being-ignored

Introduced in 10.1.0

The following behavior was observed in Mathematica 10.1 (Windows 64 bit)

When attempting to evaluate the following integral, Mathematica outputs several messages which appear ...

- asked by Nick (2 votes)

—————————-

[ListConvolve Memory Hemorrhage] http://mathematica.stackexchange.com/questions/79340/listconvolve-memory-hemorrhage

I wrote a routine that convolves an impulse response array with a test array and checks for the RMS difference between that convolution and a data array. I do this iteratively so that I can modify the ...

- asked by A. McEvoy (6 votes)

—————————-

[SystemException[MemoryAllocationFailure] with Memoized function] http://mathematica.stackexchange.com/questions/79378/systemexceptionmemoryallocationfailure-with-memoized-function

Version 10.1 Win7x64 Enterprise.

This is more of a report than a question but others may have seen the same / have insights.

I have some code (that I can’t really post as it’s too big) with a large ...

- asked by Ymareth (1 vote)

6.39 Tuesday, April 7, 2015

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

[String-manipulation bugs in v10.1] http://mathematica.stackexchange.com/questions/78884/string-manipulation-bugs-in-v10-1

The new version 10.1 has introduced some strange (possibly buggy) behaviour compared to v10.0:

StringCases["1472", Except["0", DigitCharacter]]

(* v10.0 *) "1","4","7","2" (* v10.1 *) "1"

...

- asked by Istvan Zachar (25 votes), answered by Stefan R (8 votes)

—————————-

[What are the cool kids talking about when they use ##&[]?] http://mathematica.stackexchange.com/questions/78910/what-are-the-cool-kids-talking-about-when-they-use

All the cool kids are apparently using

##&amp;[]

for

Unevaluated @ Sequence[]

but I have no idea what either means.

Please explain what these things are so I can be a cool kid!

- asked by raxacoricofallapatorius (23 votes), answered by rasher (18 votes)

—————————-

[Mathematical morphology: removing text features from image, while keeping connectivity] http://mathematica.stackexchange.com/questions/79066/mathematical-morphology-removing-text-features-from-image-while-keeping-connec

I have this image of London’s road networks.

img = Image[ Import["https://maps.googleapis.com/maps/api/staticmap?center=+51.5+ ...

- asked by andandandand (17 votes), answered by mm.Jang (12 votes)

—————————-

[What is the difference between Composition (@*) and sequential applications (@)?] http://mathematica.stackexchange.com/questions/78979/what-is-the-difference-between-composition-and-sequential-applications

What is the difference between

f@*g@*h@x

and

f@g@h@x

Both evaluate to

f[g[h[x]]]

If they’re the same, why introduce Composition as a new feature?

- asked by raxacoricofallapatorius (15 votes), answered by Szabolcs (22 votes)

—————————-

[Random polyhedra walk] http://mathematica.stackexchange.com/questions/79099/random-polyhedra-walk

I would like to recreate ssch’s random polyhedra random walk, which he posted in the chat. For convenience here it is again:

Since it’s been one and a half year since then I’ve certainly had time ...

- asked by Pickett (14 votes)

—————————-

[Plot a partition of the sphere given vertices of polygons] http://mathematica.stackexchange.com/questions/78705/plot-a-partition-of-the-sphere-given-vertices-of-polygons

I saw in this question that Mathematica can draw spherical triangles. I guess something similar can be done to plot a spherical polygon. I am interested in something similar:

I have a set of ...

- asked by Beni Bogosel (12 votes), answered by Taiki (14 votes)

—————————-

[Why is a symbol still found after changing its context?] http://mathematica.stackexchange.com/questions/78926/why-is-a-symbol-still-found-after-changing-its-context

It seems that we can change the context of symbols:

In[1]:= x = 1 Out[1]= 1

In[2]:= Context[x] = "foo‘";

But then x is still interpreted as foo‘x (and not Global‘x) even though foo‘ is not in ...

- asked by Szabolcs (8 votes), answered by penguin77 (0 votes)

================================== 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 ...

- asked by J.M. (339 votes), answered by faysou (314 votes)

—————————-

[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 ...

- asked by Simpleton Jack (212 votes), answered by mikuszefski (333 votes)

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

[short cut entry in KeyEventTranslations.tr works on V 10.0.2 but does not work in V 10.1] http://mathematica.stackexchange.com/questions/79195/short-cut-entry-in-keyeventtranslations-tr-works-on-v-10-0-2-but-does-not-work-i

I added 2 useful key shortcuts to my V 10.0.2 KeyEventTranslations.tr to allow adding [[ and ]] using ctrl-[ and ctrl-] (thanks to this post by Szabolcs at WRI community some time ago) and these ...

- asked by Nasser (1 vote)

—————————-

[Compile, "global variables" and recursion] http://mathematica.stackexchange.com/questions/78768/compile-global-variables-and-recursion

I am trying to do something similar to this, namely to make a Compile’d function outer that itself calls a Compile’d function inner which accesses a variable defined in outer. Copy-pasting the example ...

- asked by Marius Ladegard Meyer (3 votes)

—————————-

[Issues reproducing reversible CA from NKS] http://mathematica.stackexchange.com/questions/78931/issues-reproducing-reversible-ca-from-nks

I want to recreate the output of the reversible cellular automaton described in this page of the NKS book.

The book specifies that this is a modified version of R214, where the new state (step+1) ...

- asked by andandandand (1 vote)

6.40 Tuesday, March 31, 2015

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

[How to sort digits in a string while keeping other characters untouched?] http://mathematica.stackexchange.com/questions/78464/how-to-sort-digits-in-a-string-while-keeping-other-characters-untouched

Now there is a string with digits and letters, for instance, "95uge678r3gi89hgfe30kgh063d51". And the expected output is "00uge133r3gi55hgfe66kgh788d99".

I am able to do it in this way

...

- asked by Felix (12 votes), answered by Mr.Wizard (8 votes)

—————————-

[Expansion of a hypergeometric function takes ages with Mathematica 9 and 10 (regression?)] http://mathematica.stackexchange.com/questions/78534/expansion-of-a-hypergeometric-function-takes-ages-with-mathematica-9-and-10-reg

Mathematica 8 (Linux version) can evaluate

AbsoluteTiming[Series[Hypergeometric2F1[1, 1 - eps/2, 3 - eps, 1/2], eps, 0, 0]]

in no time. On one of the university machines the result is

0.175840, ...

- asked by vsht (10 votes), answered by Eric Towers (4 votes)

—————————-

[Opposite of StringSplit]http://mathematica.stackexchange.com/questions/78405/opposite-of-stringsplit

What is an appropriate command that does the opposite of the following.

StringSplit["a b c d e f g"," "]

- asked by William (10 votes), answered by Pickett (16 votes)

—————————-

[Why can I not replace a Dataset using a rule?]http://mathematica.stackexchange.com/questions/78131/why-can-i-not-replace-a-dataset-using-a-rule

Simple replacement of a Dataset object does not seem to follow the expected behavior...

Dataset[{}] /. _Dataset-&gt;1

Returns the empty Dataset not 1 as I would have expected.

Whereas...

- asked by Ymareth (9 votes), answered by WReach (11 votes)

—————————-

[Turning a set of random walk data 45 degrees] http://mathematica.stackexchange.com/questions/78347/turning-a-set-of-random-walk-data-45-degrees

I have a set of data that is just a "random" (generated by me, not by computer) sequence of length 2000 of 1’s and (-1)’s. I used it to plot a 1-D random walk where +1 is step up, (-1) is step down, ...

- asked by Solarmew (8 votes), answered by Karsten 7. (4 votes)

—————————-

[Unexpected slowness checking for empty list?] http://mathematica.stackexchange.com/questions/78155/unexpected-slowness-checking-for-empty-list

I thought I had a firm understanding of the differences between Equal and SameQ, but this has me puzzled:

test = RandomInteger[100000000, 10000000]; == test // AbsoluteTiming === test // ...

- asked by rasher (8 votes), answered by Mr.Wizard (9 votes)

—————————-

[Mathematica on Raspberry Pi] http://mathematica.stackexchange.com/questions/78319/mathematica-on-raspberry-pi

Can I develop BSD/MIT open-source library for Mathematica using free non-commercial version on Raspberry Pi?

To state it differently: does the non-commercial limitation of Mathematica on RPi limit ...

- asked by denfromufa (7 votes), answered by denfromufa (3 votes)

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

[Divide all but the maximal element in a list by 10?]http://mathematica.stackexchange.com/questions/69547/divide-all-but-the-maximal-element-in-a-list-by-10

I have a list of numerical data, and I want to write a program that will keep the maximum as it is, but reduce the rest by certain factor (such as 10). For example:

input = 2, 3, 1, -3, -5, 9, 2, 6, ...

- asked by Paul (13 votes), answered by WReach (20 votes)

—————————-

[Division by zero is slow]http://mathematica.stackexchange.com/questions/64247/division-by-zero-is-slow

Suppose I have two arrays of data, which I want to divide:

n = 1000; a = RandomInteger[1, 9, n, n]; b = RandomInteger[1, 9, n, n]; First @ AbsoluteTiming @ (a/b)

0.637064

But suppose ...

- asked by wxffles (12 votes), answered by Michael E2 (6 votes)

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

[Display of ConfusionMatrixPlot depends on Stylesheet] http://mathematica.stackexchange.com/questions/78229/display-of-confusionmatrixplot-depends-on-stylesheet

I’m using Classify and do the testing via ClassifierMeasurements. Now I observed that ConfusionMatrixPlot is not shown correctly when using StyleSheet Report(default). Maybe you can reproduce (example ...

- asked by mgamer (2 votes)

—————————-

[How to restart a Clock] http://mathematica.stackexchange.com/questions/78677/how-to-restart-a-clock

The code below is to demonstrate color afterimages. The user chooses a color, fixates the changing numbers at the center until they reach 30 (seconds), then manually switches to white to observer the ...

- asked by abwatson (1 vote)

—————————-

[NDSolve Poisson PDE for rectangle with hole] http://mathematica.stackexchange.com/questions/78624/ndsolve-poisson-pde-for-rectangle-with-hole

When I solved the Poisson PDE with function NDSolve in a rectangular domain with hole in the center, and search the first derivative with x and y why appear these protrusions on the diagram around the ...

- asked by wlkyr (1 vote)

6.41 Tuesday, March 24, 2015

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

[Faster position list construction from a "take instructions" list] http://mathematica.stackexchange.com/questions/77542/faster-position-list-construction-from-a-take-instructions-list

Take some list, e.g., 1,2,3,4,5, and a "take instructions" list, say 1,1,2,1,1.

The latter is read as "take the first element from the list, drop it from the list, take the first element of the ...

- asked by rasher (16 votes), answered by 2012rcampion (9 votes)

—————————-

[Capturing Data from an Android Phone] http://mathematica.stackexchange.com/questions/77514/capturing-data-from-an-android-phone

Is there a way to capture Data from an android phone to be later analyzed in Mathematica?

- asked by Zviovich (10 votes), answered by Zviovich (10 votes)

—————————-

[Match opening and closing parentheses?] http://mathematica.stackexchange.com/questions/77779/match-opening-and-closing-parentheses

Suppose I have a List of the form:

lst="(", "(", "(", ")", "(", ")", ")", ")"

By running Position[lst, "("] and Position[lst, ")"], I can get the positions of the opening and closing parentheses ...

- asked by becko (8 votes), answered by Simon Woods (12 votes)

—————————-

[Segmenting Sections of Lines in an Image] http://mathematica.stackexchange.com/questions/77972/segmenting-sections-of-lines-in-an-image

I have taken several gps readings while driving around town.

gpsPositions=GeoPosition[33.657, -84.5197, 33.6687, -84.4977, 33.692, -84.4907, 33.7057, -84.4287, 33.7431, -84.4027, ...

- asked by Zviovich (7 votes), answered by nikie (8 votes)

—————————-

[Flatten nested lists]http://mathematica.stackexchange.com/questions/78030/flatten-nested-lists

I have a list as follows

lis= a, b, c,d,e, f, g,h,i

which I would like to flatten to

flattenLis=a,b,c,d,e,f,g,h,i

Does anyone have a hint. All my flatten attempts did not ...

- asked by Phadreus (7 votes), answered by Kuba (7 votes)

—————————-

[How to make a binary function associative? (Or define an n-ary function?)]http://mathematica.stackexchange.com/questions/77913/how-to-make-a-binary-function-associative-or-define-an-n-ary-function

Suppose I have a simple function that I assign to an operator

f[a_, b_] := a + b 
CirclePlus = f

Then I want to write

1 (+) 2 (+) 3

But it doesn’t work, because it’s trying to evaluate f[1,2,3].

...

- asked by Noon Silk (7 votes), answered by halirutan (9 votes)

—————————-

[Strange answer from StringReplace] http://mathematica.stackexchange.com/questions/77771/strange-answer-from-stringreplace

I have a list of strings and I would check if there is an empty string element, that’s "", because I need to replace it with a "0". I try the following

StringReplace[{"90", "", "20"}, "" -&gt; "0"]

...

- asked by bobknight (7 votes), answered by Sjoerd C. de Vries (8 votes)

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

[How to use Mathematica functions in Python programs?] http://mathematica.stackexchange.com/questions/4643/how-to-use-mathematica-functions-in-python-programs

I’d like to know how can I call Mathematica functions from Python.

I appreciate a example, for example, using the Mathematica function Prime.

I had search about MathLink but how to use it in Python ...

- asked by GarouDan (28 votes), answered by GarouDan (10 votes)

—————————-

[A one line proof that one is zero using Mathematica 10] http://mathematica.stackexchange.com/questions/65624/a-one-line-proof-that-one-is-zero-using-mathematica-10

a = (Sqrt[2] + 1) (Sqrt[2] - 1) - 1; a/a, Simplify[a]/a, b/b == Simplify[b]/b

1, 0, True

This one line "proof" that one equals zero is disturbing (and could possibly lead to wrong results ...

- asked by Gregoire Nicollier (11 votes), answered by Szabolcs (24 votes)

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

[How to simplify an expression with a radical sign nesting in a radical sign] http://mathematica.stackexchange.com/questions/77902/how-to-simplify-an-expression-with-a-radical-sign-nesting-in-a-radical-sign

Is there a function can simplify an expression with a radical sign nesting in a radical sign in Mathematica? I use V9.

RatDenmon is a function that can rationalize the denominator.

- asked by user27189 (1 vote)

—————————-

[Plotting data with four variables; two labels for one of the axes] http://mathematica.stackexchange.com/questions/77727/plotting-data-with-four-variables-two-labels-for-one-of-the-axes

I am having difficulty related to 3D plotting task. I have a set of data points in the following form :

data=1x, 1y1,1y2,1z, 2x,2y1,2y2,2z,....nx,ny1,ny2,nz

The set of points ...

- asked by user91411 (2 votes)

—————————-

[Lisp Interpreter] http://mathematica.stackexchange.com/questions/77661/lisp-interpreter

What is the cleanest way to build a lisp interpreter inside Mathematica.

I’m not looking for all the functions to be implemented but instead just the basic syntax.

- asked by William (3 votes)

6.42 Tuesday, March 17, 2015

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

[White balance correction with Mathematica] http://mathematica.stackexchange.com/questions/77235/white-balance-correction-with-mathematica

Does Mathematica include a function to correct the white balance of an image? ImageAdjust would seem to be the first go-to choice, but I haven’t found a way to correct white balance without changing ...

- asked by shrx (12 votes), answered by Karsten 7. (11 votes)

—————————-

[Inline documentation of "Properties"] http://mathematica.stackexchange.com/questions/77056/inline-documentation-of-properties

Context

I find the documentation has become a bit of a maze, in particular given the more recent convention of having keywords has strings rather than Mathematica Keywords.

For instance,

...

- asked by chris (10 votes), answered by halirutan (15 votes)

—————————-

[What is the fastest way to get the nth distinct permutation of a list?] http://mathematica.stackexchange.com/questions/77443/what-is-the-fastest-way-to-get-the-nth-distinct-permutation-of-a-list

What is the fastest way to write a function nthPermutation[xs_List, n_Integer] which is equivalent to Permutations[xs][[n]] but does not explicitly compute all the permutations of xs? This feature ...

- asked by David Zhang (8 votes), answered by 2012rcampion (6 votes)

—————————-

[Area of Self-Intersecting Polygon with Repeated Vertices] http://mathematica.stackexchange.com/questions/76999/area-of-self-intersecting-polygon-with-repeated-vertices

So Mathematica uses an even-odd rule for self-intersecting polygons, both when rendering them and when calculating their area:

poly = Polygon@0., 0, 3, 0, 3, 2, 1, 2, 1, 1, 2, 1, 2, 3, ...

- asked by Martin Buttner (8 votes), answered by Michael E2 (7 votes)

—————————-

[Why does cropping an image improve TextRecognize so much?] http://mathematica.stackexchange.com/questions/76993/why-does-cropping-an-image-improve-textrecognize-so-much

I am trying to use the TextRecognize function to extract data from certain screenshots. This is already a cropped version.

Using TextRecognize on this yields 12 Catherine FicktEuSC|'\A|V|K. Not 
...

- asked by timvermeulen (8 votes)

—————————-

[How to evaluate a function on a list until stable?] http://mathematica.stackexchange.com/questions/77403/how-to-evaluate-a-function-on-a-list-until-stable

I need to evaluate a function func on a range of integers (NOT recursively, just sequentially) until the result is stable enough. I can write a not very clever step-by-step program using While:

...

- asked by Ziofil (7 votes), answered by Pickett (6 votes)

—————————-

[How to programmatically covert a function-like rule to a pure function?] http://mathematica.stackexchange.com/questions/77436/how-to-programmatically-covert-a-function-like-rule-to-a-pure-function

Is there a programmatic way to convert a Mathematica rule that acts like a typical mathematical function of one variable into the equivalent pure function? For example, the code should convert

f[x_]  ...

- asked by ibeatty (7 votes), answered by rasher (7 votes)

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

[List of compilable functions] http://mathematica.stackexchange.com/questions/1096/list-of-compilable-functions

Is there somewhere a list on the functions that Compile can compile, or the cases in which a particular function can be compiled that I haven’t found? I’d be glad even with a list of some of them ...

- asked by Rojo (82 votes), answered by Oleksandr R. (91 votes)

—————————-

[Having used Mathematica as a "gateway" language, where to from here?] http://mathematica.stackexchange.com/questions/25702/having-used-mathematica-as-a-gateway-language-where-to-from-here

I have been using Mathematica for about a year. It is the first language that I have attempted to learn. I’m still very much a newbie, but there are moments I feel more like I am waving than drowning. ...

- asked by geordie (42 votes), answered by Leonid Shifrin (47 votes)

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

[What is the "Origin" rule for in a Dataset?] http://mathematica.stackexchange.com/questions/77186/what-is-the-origin-rule-for-in-a-dataset

Take an innocuous Dataset.

d= Dataset[List[ Association[Rule["A","K1"],Rule["B",6.‘]], Association[Rule["A","K1"],Rule["B",1.‘]], Association[Rule["A","K2"],Rule["B",1.‘]], ...

- asked by Ymareth (1 vote)

—————————-

[Running Java with Wolfram Workbench on a parallel kernel] http://mathematica.stackexchange.com/questions/77137/running-java-with-wolfram-workbench-on-a-parallel-kernel

I’m trying to load my package on a parallel kernel while debugging in Wolfram Workbench 2.0. My project is set up as a Java project and parts of it use Java functions located in jar files. The java ...

- asked by faysou (1 vote)

—————————-

[Fitting data to a derivative model]http://mathematica.stackexchange.com/questions/77345/fitting-data-to-a-derivative-model

I just started using Mathematica. I would like to use Mathematica to do non-linear regression. My model equation is :

...

- asked by Asd (1 vote)

6.43 Tuesday, March 10, 2015

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

[Different floating-point numbers equal?] http://mathematica.stackexchange.com/questions/76896/different-floating-point-numbers-equal

Let’s define two different numbers.

x = 1. 
y = 1. + 2^-52 (* equivalently, 1 + $MachineEpsilon *) 
 
 
Let's make sure they're different with FullForm: 
 
x // FullForm (* 1.` *) 
y // FullForm (*  ... 

- asked by 2012rcampion (12 votes), answered by Karsten 7. (8 votes)

—————————-

[Major slowdown when using a ColorFunction with more than one named scheme] http://mathematica.stackexchange.com/questions/76610/major-slowdown-when-using-a-colorfunction-with-more-than-one-named-scheme

Earlier Kuba noted a major slowdown with code Simon Woods posted. Here is a simplified example.

First a color function using two different named gradient schemes:

fn = ColorData[If[# &lt; 0.5,  ...

- asked by Mr.Wizard (12 votes), answered by Mr.Wizard (15 votes)

—————————-

[Min, Max are slow on TimeObjects]http://mathematica.stackexchange.com/questions/76652/min-max-are-slow-on-timeobjects

There’s something wrong with how Min and Max are implemented for TimeObject:

times = TimeObject[List[0, 14, 55.99‘]], TimeObject[List[0, 14, 57.8‘]], TimeObject[List[0, 14, 59.09‘]], ...

- asked by alancalvitti (12 votes), answered by Mr.Wizard (10 votes)

—————————-

[How to properly inject iterators into table?]http://mathematica.stackexchange.com/questions/76917/how-to-properly-inject-iterators-into-table

Goofing off on a prior question, I was fiddling with other methods, which led me to the need to inject a constructed set of iterators into a table construct.

Now,

ClearAll[a, b, z, z2]

z = a, 2, ...

- asked by rasher (8 votes), answered by Kuba (7 votes)

—————————-

[How to make a movie from a complex demonstration?]http://mathematica.stackexchange.com/questions/76832/how-to-make-a-movie-from-a-complex-demonstration

I have a complex Manipulate-based demonstration containing a few sliders and a Setterbar.

I would like to make a movie out of it, avi, or whatever else. The movie will then be used for a journal ...

- asked by Alexei Boulbitch (8 votes), answered by Karsten 7. (6 votes)

—————————-

[Mathematica not honoring the distributive property of multiplication?] http://mathematica.stackexchange.com/questions/76457/mathematica-not-honoring-the-distributive-property-of-multiplication

Reduce[ ForAll[ multiplicant, summandA, summandB, Element[multiplicant, summandA, summandB, Reals], multiplicant*summandA - multiplicant*summandB == multiplicant*(summandA - ...

- asked by gaazkam (8 votes), answered by Adam Strzebonski (10 votes)

—————————-

[How to Map a function with HoldAll attribute]http://mathematica.stackexchange.com/questions/76558/how-to-map-a-function-with-holdall-attribute

First of all, I’m not sure about the title of this question, so please correct me if there is any title more sensible than mine. The problem is the following: I have a function f that checks if a ...

- asked by bobknight (7 votes), answered by kguler (5 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 (71 votes), answered by Leonid Shifrin (71 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 (49 votes), answered by Vitaliy Kaurov (21 votes)

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

[How to force the writing of buffers onto disk?]http://mathematica.stackexchange.com/questions/76351/how-to-force-the-writing-of-buffers-onto-disk

Usually, buffering is good; except when you critically need to write data to disk. Is there a way to force the writing of buffers onto disk? (I’m using a binary file)

I believe a Close[ ] followed ...

- asked by richard (4 votes)

—————————-

[Trouble using Solve and NSolve with functions involving Erf]http://mathematica.stackexchange.com/questions/76429/trouble-using-solve-and-nsolve-with-functions-involving-erf

I have the following functions:

R[k_, x_, t_] := -.5*(k - x)*(1 + Erf[-(k - x)/t]) 
L[k_, c_, x_, t_] := .5*c*(k - x)*(1 + Erf[(k - x)/t])

I’m interested in finding the k that solves some equation ...

- asked by Pburg (1 vote)

—————————-

[Packages and Notebooks as a Databin]http://mathematica.stackexchange.com/questions/76474/packages-and-notebooks-as-a-databin

The new Data Drop product sounds interesting. Can I use Databin to share Packages and Notebooks?

If yes. How? Something like:

bin = CreateDatabin[] 
DatabinAdd[bin, &lt;|"myPack" -&gt; "???"|&gt;]

...

- asked by Murta (1 vote)

6.44 Tuesday, March 3, 2015

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

[Finding a function that fits the shape of an image]http://mathematica.stackexchange.com/questions/75855/finding-a-function-that-fits-the-shape-of-an-image

How can I find a function that fits the given shape of an image? Or instead extract a point set from the shape and then find an interpolating function fits the shape.

An example image is attached.

- asked by Mikayel (12 votes), answered by belisarius (21 votes)

—————————-

[Adding Trace produces error messages]http://mathematica.stackexchange.com/questions/76082/adding-trace-produces-error-messages

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

- asked by Nasser (11 votes), answered by WReach (9 votes)

—————————-

[How can I define or use a new coordinate system in Mathematica?]http://mathematica.stackexchange.com/questions/75815/how-can-i-define-or-use-a-new-coordinate-system-in-mathematica

I want to use the dipole coordinate system as defined in this paper: http://arxiv.org/abs/physics/0606044

I see that Mathematica can do all kinds of vector analysis using different kinds of ...

- asked by jvriesem (7 votes), answered by Itai Seggev (0 votes)

—————————-

[Inconsistent behavior of undocumented Encode->Import->StringToStream->Get on password-locked stream]http://mathematica.stackexchange.com/questions/76085/inconsistent-behavior-of-undocumented-encode-import-stringtostream-get-on-pas

Let’s save a definition. Encode it with password/key and Get it again.

We will not use Get directly on directory but with combination of Get+StringToStream+Import.

Get works with streams since V9.0 ...

- asked by Kuba (7 votes), answered by Jinxed (1 vote)

—————————-

[Ghost trails with Animate?]http://mathematica.stackexchange.com/questions/75936/ghost-trails-with-animate

What are some approaches to integrate Ghost trails methods with Animate, which otherwise seem more suited for exporting individual frames?

For example, given this rootPlot function, how can trails ...

- asked by alancalvitti (7 votes), answered by Pickett (9 votes)

—————————-

[how to build matrix from set of vectors and other matrices using ArrayFlatten]http://mathematica.stackexchange.com/questions/76311/how-to-build-matrix-from-set-of-vectors-and-other-matrices-using-arrayflatten

I want to build a 6 by 3 matrix, from the following: one vector is 3 by 1, then a matrix, which is 3 by 2. These will go to the top 3 rows. Now the bottom 3 rows, I’ll have 3 vectors each is 3 by 1. ...

- asked by Nasser (6 votes), answered by Kuba (5 votes)

—————————-

[Computing launch parameters for hitting a point in 3D with projectile under influence of wind]http://mathematica.stackexchange.com/questions/75945/computing-launch-parameters-for-hitting-a-point-in-3d-with-projectile-under-infl

The end goal of this problem is to compute functions which describe the launch parameters which are needed to hit a specified goal in 3D in the presence of wind disturbances. This is as far I have ...

- asked by Julian (6 votes), answered by belisarius (7 votes)

================================== 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 ...

- asked by J.M. (333 votes), answered by faysou (308 votes)

—————————-

[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 ...

- asked by Simpleton Jack (209 votes), answered by mikuszefski (327 votes)

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

[FindMinimum’s WorkingPrecision behaviour]http://mathematica.stackexchange.com/questions/76259/findminimums-workingprecision-behaviour

I discovered the following behaviour when using FindMinimum for constrained optimization:

Clear@f 
f[x_?NumericQ] := (Print@Precision@x; x^2) 
FindMinimum[{f[x], x &lt; 1}, {x, 1}, WorkingPrecision  ...

- asked by sebhofer (1 vote)

—————————-

[Font style in Mathematica and .tex file]http://mathematica.stackexchange.com/questions/76250/font-style-in-mathematica-and-tex-file

I am using Mathematica 8. I want to label the axes of figure in "Times" font.

Plot[Sin[z], {z, -2 Pi, 2 Pi}, Frame -&gt; True, 
FrameLabel -&gt; {"z", "a(z)"}, 
LabelStyle -&gt; Directive[FontSize  ...

- asked by zenith (3 votes)

—————————-

[ParametricNDSolveValue over a region]http://mathematica.stackexchange.com/questions/75887/parametricndsolvevalue-over-a-region

I’m getting the following behavior I don’t understand when using ParametricNDSolveValue over a region. You can reproduce the behavior considering Poisson’s equation as shown below

The below works as ...

- asked by user2162855 (1 vote)

6.45 Tuesday, February 17, 2015

Tuesday, February 24, 2015

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

[Can Mathematica’s random number generation be improved?]http://mathematica.stackexchange.com/questions/75303/can-mathematicas-random-number-generation-be-improved

Performance on Random Number generation is intolerable. Whenever you need many deviates from the same distribution but with different parameters it takes forever.

Here is a thread on Poisson ...

- asked by JEP (11 votes), answered by JEP (4 votes)

—————————-

[The efficiency compare between Flatten[#, 1] & and Join @@ #&] http://mathematica.stackexchange.com/questions/75590/the-efficiency-compare-between-flatten-1-and-join

Err..Often I met the situation to join lists at the first level and I 
used to just Flatten[#, 1] &amp;@ them. However, I found(when glance 
over the mathematica.stackexchange.com) someone else prefer  ...

- asked by Harry (11 votes), answered by Michael E2 (8 votes)

—————————-

[Is Mathematica ‘ContourPlot‘ function really so efficient?] http://mathematica.stackexchange.com/questions/75352/is-mathematica-contourplot-function-really-so-efficient

I wanted to find the roots of the function \(f(x,y)=\sin (3.2x)\sin (1.3y)-2.1 \sin (1.3x)\sin (3.2y)\). This is what the function looks like:

f[x_, y_] = Sin[3.2 x]*Sin[1.3*y] - 2.1*Sin[1.3*x]*Sin[3.2*y] 
...

- asked by anderstood (11 votes), answered by george2079 (16 votes)

—————————-

[How to randomly select subsets]http://mathematica.stackexchange.com/questions/75431/how-to-randomly-select-subsets

I have a list of around 300 elements. I want to sample subsets of length 25 such that my samples are all distinct. My first inclination was to use something like RandomSample[Subsets[list, 25], ...

- asked by mtiano (7 votes), answered by Mr.Wizard (8 votes)

—————————-

[Prevent Export from overwriting files]http://mathematica.stackexchange.com/questions/75745/prevent-export-from-overwriting-files

Export["filepath1",Expression1] works for me, but if filepath1 already exists, it will be overwritten. I’d like Export to notify me and ask for a confirmation, if it tries to overwrite filepath1.

I ...

- asked by user1541776 (6 votes), answered by Mr.Wizard (11 votes)

—————————-

[How trustworthy is NMaximize?]http://mathematica.stackexchange.com/questions/75668/how-trustworthy-is-nmaximize

Suppose I solve a constrained optimisation problem using NMaximize. How confident can I be of the accuracy of the result?

For concreteness, suppose that F,G are (exactly known) functions (say, ...

- asked by Feanor (6 votes), answered by mikeagibson (8 votes)

—————————-

[Mathematica and POV-Ray workflow: ListContourPlot3D]http://mathematica.stackexchange.com/questions/75497/mathematica-and-pov-ray-workflow-listcontourplot3d

I have the following function describing a molecular electronic Orbital.

f[r_] = E^-((r - R0)/\[CapitalDelta]r)^2; 
 
r = Sqrt[x^2 + y^2 + z^2]; 
cosphi[x_, y_, z_] := If[x == 0 &amp;&amp;  y == 0  ...

- asked by DPengel (6 votes)

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

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

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

What is your best code for generating ...

- asked by Peltio (100 votes), answered by Silvia (132 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. (333 votes), answered by faysou (308 votes)

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

[Precision loss in FourierDCT]http://mathematica.stackexchange.com/questions/75292/precision-loss-in-fourierdct

I have high precision data that I want to do Fourier transform with, but it looks like the precision is lost dramatically.

data = ...

- asked by xslittlegrass (2 votes)

—————————-

[Can I use Mathematica 9.0 to open an MX file produced by Mathematica 10?]http://mathematica.stackexchange.com/questions/75581/can-i-use-mathematica-9-0-to-open-an-mx-file-produced-by-mathematica-10

I have used Mathematica 10 installed on a workstation of university’s lab to run a NDSlove code that produced a .mx file. Then I copy the .mx file to my laptop which has Mathematica 9.0. When I try to ...

- asked by lxy (1 vote)

—————————-

[Is it possible to circumvent this overflow?]http://mathematica.stackexchange.com/questions/75329/is-it-possible-to-circumvent-this-overflow

I’m trying to evaluate the following function numerically:

$ 
f(A,B)=\frac{2A\pi ^{5/2} (-1)^B}{(A!)^2B!} \, 
_4\tilde{F}_3\left({\frac{1}{2},1-A,1-A,1-B\atop  ...

- asked by Ziofil (1 vote)

6.46 Tuesday, February 17, 2015

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

[Change Values in Dataset under Condition]http://mathematica.stackexchange.com/questions/74165/change-values-in-dataset-under-condition

I have the following Dataset:

ds = Dataset@*Map[AssociationThread[{"ID", "VAL1", "VAL2", "VAL3", 
"Type"} -&gt; #] &amp;]@ 
{{"C09", 18.5, 18.5, 18.5, "FE"}, {"C11", 21, 21, 21, "FE"}, 
{"C10",  ...

- asked by Lea (10 votes), answered by WReach (6 votes)

—————————-

[Drawing a Gradient Between Two Circular Arcs]http://mathematica.stackexchange.com/questions/73928/drawing-a-gradient-between-two-circular-arcs

Suppose I wanted to use Mathematica graphics primitives to create a gradient of colors between two circular arcs. It’s easy enough to make an area between two circles a solid color, but what if I ...

- asked by Noah Rubin (10 votes), answered by ybeltukov (11 votes)

—————————-

[How to search Dataset to find all keys share same Value]http://mathematica.stackexchange.com/questions/74200/how-to-search-dataset-to-find-all-keys-share-same-value

If I have the following Dataset

ds=Dataset[{ 
&lt;|"a" -&gt; 1, "b" -&gt; "x", "c" -&gt; 6|&gt;, 
&lt;|"a" -&gt; 2, "b" -&gt; "y", "c" -&gt; {2, 3}|&gt;, 
&lt;|"a" -&gt; "x", "b" -&gt; "z", "c"  ...

- asked by Algohi (8 votes), answered by Leonid Shifrin (5 votes)

—————————-

[Windows command line arguments, stdin & stdout] http://mathematica.stackexchange.com/questions/74032/windows-command-line-arguments-stdin-stdout

Is it possible to utilize all three: commandline arguments, stdin, and stdout all at once in script for Windows? Unix is fairly esay, but I can’t get the following to work with Windows.

Using the ...

- asked by William (8 votes), answered by WReach (7 votes)

—————————-

[How can I replace the Greek symbols in an expression with their plain text names?]http://mathematica.stackexchange.com/questions/74047/how-can-i-replace-the-greek-symbols-in-an-expression-with-their-plain-text-names

Suppose I have an expression with Greek symbols in it. How would I convert that expression to another expression where the Greek symbols have been replaces with their names in plain text? I’ve ...

- asked by jmbejara (8 votes), answered by Mr.Wizard (11 votes)

—————————-

[Convert number to word]http://mathematica.stackexchange.com/questions/73717/convert-number-to-word

I have a big number like: 123 456 789. Now I’ll to writ it like this

123 million 456 thousand 789

I’ve search on the internet but nothing found that works.

How can you do that? Thanks.

- asked by Luis (8 votes), answered by Mr.Wizard (10 votes)

—————————-

[Why does an inert ReplaceAll modify this Dataset?]http://mathematica.stackexchange.com/questions/73855/why-does-an-inert-replaceall-modify-this-dataset

I cannot see any reason for this behavior besides a bug, but I’ve been wrong before so I put it before the community:

ds = Dataset[{ 
&lt;|"ID" -&gt; "Alpha", "v1" -&gt; 1, "v2" -&gt; 0|&gt;, 
...

- asked by Mr.Wizard (7 votes), answered by Leonid Shifrin (7 votes)

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

[Image processing: Floor plan - detecting rooms’ borders (area) and room names’ texts]http://mathematica.stackexchange.com/questions/19546/image-processing-floor-plan-detecting-rooms-borders-area-and-room-names-t

Here is a simple building floor plan. I would like to derive the rooms as (rectangular) components and the names of the rooms. This is very common representation of building floor plans.

The ...

- asked by s.s.o (39 votes), answered by nikie (39 votes)

—————————-

[Generating visually pleasing circle packs]http://mathematica.stackexchange.com/questions/40334/generating-visually-pleasing-circle-packs

EDIT: (my conclusion and thank you note) I want to thank you all guys for this unexpected intellectual and artistic journey. Hope you had fun and enjoyed it the same as I did.

I would like to ...

- asked by VividD (70 votes), answered by level1807 (42 votes)

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

[Exclusion disappears but style doesn’t work]http://mathematica.stackexchange.com/questions/73894/exclusion-disappears-but-style-doesnt-work

Consider this code:

f[x_]:=(6 + 4 x + x^2 - x^3)/(x-2) 
Plot[f[x], {x, -10, 10}, 
Exclusions -&gt; {2}, 
ExclusionsStyle -&gt; Directive[Red, Dashed]]

It produces this image.

Note that the vertical ...

- asked by David (4 votes)

—————————-

[What is Association[Rule["ID",number ] and how it is used]http://mathematica.stackexchange.com/questions/74197/what-is-associationruleid-number-and-how-it-is-used

I am trying to understand the structure and the use of Dataset and I came across something new to me.

First check this example:

ds1=Dataset[{ 
&lt;|"a" -&gt; 1, "b" -&gt; "x", "c" -&gt; 6|&gt;, 
...

- asked by Algohi (4 votes)

—————————-

[Can I get a symbol cross-reference of a Mathematica Notebook?]http://mathematica.stackexchange.com/questions/73927/can-i-get-a-symbol-cross-reference-of-a-mathematica-notebook

Is there a way to get a cross reference listing for a notebook or set of notebooks?

- asked by Ralph Dratman (1 vote)

6.47 Tuesday, February 10, 2015

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

[Messages leak out from Block]http://mathematica.stackexchange.com/questions/73458/messages-leak-out-from-block

When assigning message to a symbol localized by Block, I would expect that this message is not accessible outside of Block, but I observe different behavior:

ClearAll[x] Block[x, x::test1 = ...

- asked by jkuczm (12 votes), answered by Mr.Wizard (6 votes)

—————————-

[Copy Built-in function to new name]http://mathematica.stackexchange.com/questions/73454/copy-built-in-function-to-new-name

It is know that some built-in functions are system function and changing their properties may cause trouble.

Suppose for example I want to change features of Cases:

SetAttributes[Cases, HoldFirst]

...

- asked by Algohi (10 votes), answered by Mr.Wizard (8 votes)

—————————-

[Possible bug: Quantity[2,"meters"] returns 2 None meters]http://mathematica.stackexchange.com/questions/73259/possible-bug-quantity2-meters-returns-2-none-meters

I’m using 10.0 for Linux.

Trial 1:

Quantity[2,"meters"] 2 None meters

Trial 2:

Quantity[2,"Meters"] 2 meters

Trial 3:

Quantity[2,"meters"] //InputForm Quantity[2*None, "Meters"]

It seems ...

- asked by Jacob Schwartz (10 votes)

—————————-

[How does $CellContext‘ work?] http://mathematica.stackexchange.com/questions/73530/how-does-cellcontext-work

The only official info about $CellContext‘ I was able to find is:

placeholder for the context of a symbol inside Dynamic

from StandardNamespaces

I have some intuitive understanding how it works ...

- asked by Kuba (9 votes), answered by Kuba (5 votes)

—————————-

[Solve a PDE over a region defined by a Bezier patch]http://mathematica.stackexchange.com/questions/73350/solve-a-pde-over-a-region-defined-by-a-bezier-patch

I am using NDSolve to find the solution to a PDE over an arbitrary domain. The domain is specified by a Bezier patch.

pts = 10, 0, 0, 30, 15, 10, 8, 30, 25, 37, 20, 37, 35, ...

- asked by cfdguy (9 votes), answered by Michael E2 (3 votes)

—————————-

[Triangular mesh of random points on a sphere] http://mathematica.stackexchange.com/questions/73354/triangular-mesh-of-random-points-on-a-sphere

My employer with a new logo (shown below). I do not have information on how this was created (as it was done by an outside company), though I’m fairly sure it was not done in any formal mathematical ...

- asked by user1375062 (9 votes), answered by ybeltukov (15 votes)

—————————-

[Slow work of SQLInsert with MS SQL Server in V10] http://mathematica.stackexchange.com/questions/73444/slow-work-of-sqlinsert-with-ms-sql-server-in-v10

This question is very similar to: Slow work of SQLInsert with SQLite, but for MS SQL Server. Unfortunately the use of SQLBeginTransaction and SQLCommitTransaction do not improved the performance as in ...

- asked by Murta (8 votes), answered by Murta (8 votes)

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

[How to use Mathematica functions in Python programs?] http://mathematica.stackexchange.com/questions/4643/how-to-use-mathematica-functions-in-python-programs

I’d like to know how can I call Mathematica functions from Python.

I appreciate a example, for example, using the Mathematica function Prime.

I had search about MathLink but how to use it in Python ...

- asked by GarouDan (28 votes), answered by GarouDan (10 votes)

—————————-

[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?

- asked by niklasfi (27 votes), answered by Artes (24 votes)

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

[Problem with DiscretizeRegion] http://mathematica.stackexchange.com/questions/73470/problem-with-discretizeregion

R = RegionUnion[Disk[{0, 0}, 1, {0, Pi}], Disk[{1/2, 0}, 1/2]] // 
RegionDifference[#, RegionUnion[Disk[{1/2, 0}, 1/6], Disk[{-1/2, 0}, 
1/2]]] &amp; 
(dr = DiscretizeRegion[R]) // Timing

If you run ...

- asked by Apple (6 votes)

—————————-

[How to get the correct latitude and longitude coordinates using FindGeoLocation on street addresses] http://mathematica.stackexchange.com/questions/73656/how-to-get-the-correct-latitude-and-longitude-coordinates-using-findgeolocation

Have a list of street addresses:

addresses = {"123 D st, Davis, CA 95616", 
"140 B St, Davis, CA 95616", "212 E st, Davis, CA 95616", 
"325 G St, Davis, CA 95616"};

I used FindGeoLocation to ...

- asked by Rebecca (2 votes)

—————————-

[Why does Mathematica provide incosistent convergence conditions?]http://mathematica.stackexchange.com/questions/73652/why-does-mathematica-provide-incosistent-convergence-conditions

In[1]:= Clear[a, n] 
In[2]:= SumConvergence[(n^(n - 2))/((a^n)*(n!)), n] 
Out[2]= Abs[a] &gt; E 
In[3]:= SumConvergence[(n^(n - 2))/((E^n)*(n!)), n] 
Out[3]= True

All right. So, according to Out[2], the ...

- asked by gaazkam (2 votes)

6.48 Tuesday, February 3, 2015

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

[Mathematica and POV-Ray workflow (Q&A)] http://mathematica.stackexchange.com/questions/72899/mathematica-and-pov-ray-workflow-qa

A couple of years ago, Alexey Popkov asked this question: Which ray tracing software is compatible with Graphics3D? It is my opinion, for various reasons, that out of the many ray tracing programs ...

- asked by Kim Fierens (18 votes), answered by xslittlegrass (17 votes)

—————————-

[Confused about how Partition works] http://mathematica.stackexchange.com/questions/72740/confused-about-how-partition-works

I have a problem about the padding list about Partition command. For instance,

Partition[a, b, c, d, e, f, g, 3, 1, -2, 1, x, y, z]

z, a, b, a, b, c, b, c, d, c, d, e, d, e, f, ...

- asked by ShutaoTang (16 votes), answered by Mr.Wizard (15 votes)

—————————-

[I define a variable as local to a module BUT then the module uses its global value! Why?] http://mathematica.stackexchange.com/questions/72758/i-define-a-variable-as-local-to-a-module-but-then-the-module-uses-its-global-val

I have a question about modules and local variables.

Here’s my example:

h = 5; 
 
Module[{a, h}, a[h_]= h^2; a[4]] 
 
(*Out[2] = 25*)

I expected the module to return 16 and not 25! I believed h to be ...

- asked by pan_e_gaban (12 votes), answered by Leonid Shifrin (13 votes)

—————————-

[Floating point operations division vs multiplication; how do they affect accuracy?] http://mathematica.stackexchange.com/questions/72801/floating-point-operations-division-vs-multiplication-how-do-they-affect-accur

Given two functions:

f[x_] := x ((x + 1)^(1/2) - x^(1/2)) 
g[x_] := x/((x + 1)^(1/2) + x^(1/2))

Which one is more accurate?

Side note: If you could explain why, that would really help me out, I ...

- asked by Claire Blackman (10 votes), answered by DumpsterDoofus (8 votes)

—————————-

[A better "VisibleSpectrum" function?] http://mathematica.stackexchange.com/questions/73161/a-better-visiblespectrum-function

Since ColorData["VisibleSpectrum"] is wrong I would like to have a more accurate function to use. Can this information be extracted from Mathematica itself?

- asked by Mr.Wizard (9 votes), answered by Mr.Wizard (10 votes)

—————————-

[Why can AppendTo modify a referenced list in-place but Part cannot?] http://mathematica.stackexchange.com/questions/72624/why-can-appendto-modify-a-referenced-list-in-place-but-part-cannot

Part, AppendTo, PrependTo, AddTo, etc. allow in-place modification of a list, but only Part requires that the list be referenced through a simple symbol, e.g. the following all does what you’ld ...

- asked by Eric Parker (9 votes), answered by Leonid Shifrin (11 votes)

—————————-

[Is there a way to identify a symbolic fraction?] http://mathematica.stackexchange.com/questions/73075/is-there-a-way-to-identify-a-symbolic-fraction

Is there a way to use Head to detect a symbolic fraction? In particular I find,

Head[a/b] Head[1/5]

Times

Rational

where I would like to get Head[a/b] = Rational. I want to test if a ...

- asked by JeffDror (8 votes), answered by ybeltukov (11 votes)

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

[Division by zero is slow] http://mathematica.stackexchange.com/questions/64247/division-by-zero-is-slow

Suppose I have two arrays of data, which I want to divide:

n = 1000; a = RandomInteger[1, 9, n, n]; b = RandomInteger[1, 9, n, n]; First @ AbsoluteTiming @ (a/b)

0.637064

But suppose ...

- asked by wxffles (12 votes), answered by Michael E2 (6 votes)

—————————-

[Alternatives to procedural loops and iterating over lists in Mathematica]http://mathematica.stackexchange.com/questions/7924/alternatives-to-procedural-loops-and-iterating-over-lists-in-mathematica

While there are some cases where a For loop might be reasonable, it’s a general mantra one I subscribe to myself that "if you are using a For loop in Mathematica, you are probably doing it wrong". ...

- asked by Mr.Wizard (101 votes), answered by Mr.Wizard (66 votes)

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

[Extra spaces when exporting strings into pdf (bug, linux)]http://mathematica.stackexchange.com/questions/72896/extra-spaces-when-exporting-strings-into-pdf-bug-linux

Rationale: Imagine you would like to create a publication quality figure in Mathematica, from under Linux. Naturally, it will contain text/labels.

Problem: Here is a simple string "Amin,new".

...

- asked by Alexey Bobrick (1 vote)

—————————-

[LayeredGraphPlot Vertex Spacing]http://mathematica.stackexchange.com/questions/72847/layeredgraphplot-vertex-spacing

For anyone who has used LayeredGraphPlot, you have probably seen that the vertex spacing is consistent throughout, that vertices have the same minimum unit of spacing in the vertical and horizontal ...

- asked by iwantmyphd (1 vote)

—————————-

[Header and footer banners in Slide Show style]http://mathematica.stackexchange.com/questions/72903/header-and-footer-banners-in-slide-show-style

I would like to create Mathematica slide shows that contain several tailored, fixed banners as headers and footers, much as MS Powerpoint, MS Word, Apple Pages, and LaTeX documents allow one to ...

- asked by David G. Stork (3 votes)

6.49 Tuesday, January 27, 2015

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

[Can Mathematica solve Plateau’s problem (finding a minimal surface with specified boundary)?] http://mathematica.stackexchange.com/questions/72203/can-mathematica-solve-plateaus-problem-finding-a-minimal-surface-with-specifie

Given a closed curve \(\mathcal C\) in three dimensions, is it possible to use Mathematica’s built-in functionality to compute a minimal surface whose boundary is \(\mathcal C\)? For simplicity, let us ...

- asked by Rahul (20 votes), answered by ybeltukov (17 votes)

—————————-

[Maximize[Cos[x - 1], x] is not evaluated] http://mathematica.stackexchange.com/questions/72444/maximizecosx-1-x-is-not-evaluated

No explanation needed:

Maximize[Cos[x + 1], x] Maximize[Cos[x - 1], x]

producing

{1, {x -&gt; -1 + 2 Pi}}

Maximize[Cos[1 - x], x]

Needless to say, this is pretty amusing.

Does anyone know why ...

- asked by DumpsterDoofus (18 votes), answered by Michael E2 (8 votes)

—————————-

[Reading from a socket stream] http://mathematica.stackexchange.com/questions/72551/reading-from-a-socket-stream

I noticed an undocumented socket package (SocketLink) in Mathematica (Using version 10, not sure when it was actually added) and wrote a barebones HTTP responder using it:

&lt;&lt;SocketLink` 
host =  ...

- asked by MBryn (10 votes)

—————————-

[For a given expression: if it appears, remove it, but if it is absent, add it] http://mathematica.stackexchange.com/questions/72380/for-a-given-expression-if-it-appears-remove-it-but-if-it-is-absent-add-it

While reformatting Szabolcs’s code from (42660) I noticed this interesting operation:

expr/.{{-\[Infinity],mid___,\[Infinity]}:&gt;{mid},{-\[Infinity],mid___}:&gt;{mid,\[Infinity]},{mid___,\[Infinity]}

- asked by Mr.Wizard (10 votes), answered by Mr.Wizard (5 votes)

—————————-

[Unexpected pattern matching behaviour: PatternSequence vs. Optional]http://mathematica.stackexchange.com/questions/72290/unexpected-pattern-matching-behaviour-patternsequence-vs-optional

Consider the following pattern-matching expressions:

MatchQ[{1, 2}, {a_, b_}]                     (* True *) 
MatchQ[{1, 2}, {a_, b_:0}]                   (* True *) 
MatchQ[{1, 2},  ...

- asked by WReach (10 votes)

—————————-

[Incorrect use of Scaled causes crash]http://mathematica.stackexchange.com/questions/72560/incorrect-use-of-scaled-causes-crash

Bug introduced in 8.0 and persisting through 10.0.2 or later

While playing with Scaled, I made a syntax error which caused a crash instead of an error message ...

Do you get the same ? (I have ...

- asked by SquareOne (9 votes)

—————————-

[Using map projections with astronomical data]http://mathematica.stackexchange.com/questions/72426/using-map-projections-with-astronomical-data

I noticed that all important "Geoprojections" are available in projections for a spherical reference models: GeoProjectionData function;

1 - I am trying using the sinusoidal projection for ...

- asked by locometro (8 votes), answered by Kuba (7 votes)

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

[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 ...

- asked by Margus (46 votes), answered by Daniel Lichtblau (45 votes)

—————————-

[Alternatives to procedural loops and iterating over lists in Mathematica]http://mathematica.stackexchange.com/questions/7924/alternatives-to-procedural-loops-and-iterating-over-lists-in-mathematica

While there are some cases where a For loop might be reasonable, it’s a general mantra one I subscribe to myself that "if you are using a For loop in Mathematica, you are probably doing it wrong". ...

- asked by Mr.Wizard (101 votes), answered by Mr.Wizard (66 votes)

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

[Is there a notebook to create entries for OEIS?]http://mathematica.stackexchange.com/questions/72451/is-there-a-notebook-to-create-entries-for-oeis

Is there a notebook to create entries for OEIS?

I seem to recall something like this a few years ago, but I haven’t been able to find one. It might be from MathWorld. Any suggestions?

Edit If I had ...

- asked by Fred Kline (2 votes)

—————————-

[SumConvergence fails in version 10] http://mathematica.stackexchange.com/questions/72361/sumconvergence-fails-in-version-10

SumConvergence[(-1)^(n + 1) ((Cos[n^2] + Sin[n + 2])/7^n), n]

Mathematica fails to provide a result (true/false) but wolfram alpha works. What should I do ?

It gives ...

- asked by Parhs (5 votes)

—————————-

[How can I detect certain letters by shape in an image?] http://mathematica.stackexchange.com/questions/72497/how-can-i-detect-certain-letters-by-shape-in-an-image

I have a website where people can post Flipbook animations, called Flipnotes. Unfortunately, most of the Popular flipnotes are in the following categories:

MV (Music Video) AV (Audio Video) AMV ...

- asked by Austin Burk (1 vote)

6.50 Tuesday, January 20, 2015

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

[Excessive memory use by Mathematica kernel in 10.0.2 after executing simple commands] http://mathematica.stackexchange.com/questions/71889/excessive-memory-use-by-mathematica-kernel-in-10-0-2-after-executing-simple-comm

Warning: the code below may hang your system if you have the Suggestions Bar enabled.

When issuing the following simple statements to Mathematica, it responds with a valid answer. However, ...

- asked by Simon (18 votes), answered by Simon (8 votes)

—————————-

[What is the purpose of Internal‘LocalizedBlock?]http://mathematica.stackexchange.com/questions/71881/what-is-the-purpose-of-internallocalizedblock

I have come across the (internal) use of of the function:

Internal‘LocalizedBlock

I am trying to determine its purpose. It seem to behave like Internal‘InheritedBlock except that a starting value ...

- asked by Mr.Wizard (14 votes), answered by Dan Fortunato (19 votes)

—————————-

[Least effort to handle a point source inside the domain of PDE(s)]http://mathematica.stackexchange.com/questions/71902/least-effort-to-handle-a-point-source-inside-the-domain-of-pdes

By point source I mean a constrained condition at one point inside the domain of PDE(s). For example:

$$\frac{\partial ^2u(t,x,y)}{\partial t^2}=\frac{\partial 
^2u(t,x,y)}{\partial  ...

- asked by xzczd (13 votes), answered by Rahul (10 votes)

—————————-

[Partitioning with constraints on subsets]http://mathematica.stackexchange.com/questions/71827/partitioning-with-constraints-on-subsets

Given the following data:

constraints = 11, 2, 11, 3, 11, 4, 11, 6, 11, 9, 1, 6, 5, 6, 2, 5;

weights = 3, 7, 3, 2, 4, 2, 2, 2, 3, 2, 1;

I wish to partition the integers from 1 ...

- asked by Simon Woods (13 votes), answered by ybeltukov (6 votes)

—————————-

[Filling to Axis as Arrow]http://mathematica.stackexchange.com/questions/72002/filling-to-axis-as-arrow

In version 9 I could do the following with the output as shown.

ListPlot[Table[{x, x^2}, {x, 0, 1, 0.1}], PlotRange -&gt; All, 
Filling -&gt; Axis, FillingStyle -&gt; (Arrow[#] &amp;)]

Now in ...

- asked by Hugh (11 votes), answered by Mr.Wizard (9 votes)

—————————-

[Label multiple edges between same vertices]http://mathematica.stackexchange.com/questions/72003/label-multiple-edges-between-same-vertices

I have a simple graph with multiple edges between two vertices, say:

Graph[{ 
Labeled[a -&gt; b, "A"], 
Labeled[a -&gt; b, "B"] 
}]

Unfortunately, Mathematica labels both edges "A".

How can I ...

- asked by Thomas Fankhauser (9 votes), answered by kguler (6 votes)

—————————-

[Synchronizing the camera view of multiple Image3D panels within a Manipulate interface]http://mathematica.stackexchange.com/questions/71653/synchronizing-the-camera-view-of-multiple-image3d-panels-within-a-manipulate-int

I’m trying to synchronize the camera view of multiple Image3D panels displayed within a Manipulate interface.

A random 3D image will do for demonstration purposes.

theimg = Image3D[RandomReal[1, ...

- asked by Matt (9 votes), answered by bobthechemist (8 votes)

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

[How to use Mathematica functions in Python programs?]http://mathematica.stackexchange.com/questions/4643/how-to-use-mathematica-functions-in-python-programs

I’d like to know how can I call Mathematica functions from Python.

I appreciate a example, for example, using the Mathematica function Prime.

I had search about MathLink but how to use it in Python ...

- asked by GarouDan (27 votes), answered by GarouDan (10 votes)

—————————-

[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 (67 votes), answered by Leonid Shifrin (70 votes)

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

[How to rewrite a nested loop with Reap and Sow]http://mathematica.stackexchange.com/questions/71838/how-to-rewrite-a-nested-loop-with-reap-and-sow

I was wondering if anyone know how to rewrite the following nested loop but using Reap and Sow. I need to reduce the execution time. Thank you.

list = ; AbsoluteTiming[ Do[ AppendTo[list, ]; ...

- asked by Paul (1 vote)

—————————-

[PlotRange->Automatic the exact function used to calculate outliers]http://mathematica.stackexchange.com/questions/71808/plotrange-automatic-the-exact-function-used-to-calculate-outliers

I know that PlotRange-&gt;Automatic does the following:

"the distribution of coordinate values is found, and any points sufficiently far out in the distribution are dropped. Such points are often ...

- asked by Nick (2 votes)

—————————-

[How to reduce a quartic form to a quadratic form with equal roots]http://mathematica.stackexchange.com/questions/72083/how-to-reduce-a-quartic-form-to-a-quadratic-form-with-equal-roots

Preface: To clear the theoretical background this question is cross-posted on math.stackexchange here.

I have a polynomial in \(n\) variables of the form

...

- asked by E.O. (3 votes)

6.51 Tuesday, January 13, 2015

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

[Why is my data 10 times slower than random data when doing matrix multiplication] http://mathematica.stackexchange.com/questions/71377/why-is-my-data-10-times-slower-than-random-data-when-doing-matrix-multiplication

I have some data generated from some program, and it appears that matrix multiplication on these data are about 10 times slower than on some random data:

Get["tb.dat"];

xls = Range[-500, 500, ...

- asked by xslittlegrass (14 votes), answered by DumpsterDoofus (10 votes)

—————————-

[What happens when you divide by ##?] http://mathematica.stackexchange.com/questions/71348/what-happens-when-you-divide-by

I’ve been playing around with sequences a bit. In particular with using ## with unary and binary operators.

Let’s start simple, the following all make some kind of sense:

+ ## &amp; [a,b] (* a + b  ...

- asked by Martin Buttner (13 votes), answered by Pickett (11 votes)

—————————-

[How can FactorInteger be so slow if PrimeQ is fast?] http://mathematica.stackexchange.com/questions/71489/how-can-factorinteger-be-so-slow-if-primeq-is-fast

My 8th grade son had a homework problem to find a prime factor of 99!-1. I thought to be clever/lazy and used FactorInteger[99!-1], but it takes forever. PrimeQ[99!-1] very quickly gives False. It ...

- asked by Martin Rommel (11 votes), answered by sn6uv (16 votes)

—————————-

[Orderless pattern matching] http://mathematica.stackexchange.com/questions/71463/orderless-pattern-matching

The MMA docs state that "In matching patterns with Orderless functions, all possible orders of arguments are tried".

Why then does the following not work?

plus[x__Integer, y__Real] := x+y 
...

- asked by sn6uv (9 votes), answered by Mr.Wizard (11 votes)

—————————-

[Why is this evaluation halved when adding units?] http://mathematica.stackexchange.com/questions/71496/why-is-this-evaluation-halved-when-adding-units

Why does this strange behavior occur when dealing with units and quantities?

A[t_] := A0 Exp[-b t / (2m)] 
 
FullSimplify[A[Quantity[0, "Seconds"]]]

A0 – ...

- asked by WChargin (8 votes)

—————————-

[Multiple bwspec for BoxWhiskerChart] http://mathematica.stackexchange.com/questions/71478/multiple-bwspec-for-boxwhiskerchart

If I want to make a horizontal boxplot (with outliers) for y:

y = {5.5, 5.61, 4.88, 5.07, 5.42, 5.55, 5.36, 5.29, 5.58, 5.65, 5.57, 
5.53, 5.62, 5.29, 5.44, 5.34, 5.79, 5.1, 5.27, 5.39, 5.42, 5.47,  ...

- asked by shidangai (7 votes), answered by m_goldberg (6 votes)

—————————-

[The longest run of at most k different elements in a list] http://mathematica.stackexchange.com/questions/71587/the-longest-run-of-at-most-k-different-elements-in-a-list

I have a long list with ca. 500K elements. The list contains about 10K different elements.

For simplicity lets assume the list is of the following form:

list={a,c,b,a,a,a,b,c,e,f,b,a,e,e,e,a}

I ...

- asked by stat_facts (6 votes), answered by Mr.Wizard (5 votes)

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

[What are the most common pitfalls awaiting new users?] http://mathematica.stackexchange.com/questions/18393/what-are-the-most-common-pitfalls-awaiting-new-users

As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...

- asked by belisarius (188 votes), answered by Michael E2 (101 votes)

—————————-

[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?

- asked by stevenvh (17 votes), answered by Artes (10 votes)

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

[Extracting an equation from an interpolated function] http://mathematica.stackexchange.com/questions/71595/extracting-an-equation-from-an-interpolated-function

Im trying to use LibraryLink to do some calculations in C but part of the expression i want to calculate is an Interpolating Function. C cant use that obviously so I’m trying to shift it to a data ...

- asked by Nicholas Gaffney-Henderson (3 votes)

—————————-

[Input `Reduce[Mod[a + x, l] == 0, x]' and output `x == -a + kl`?] http://mathematica.stackexchange.com/questions/71365/input-reducemoda-x-l-0-x-and-output-x-a-kl

Reduce[a + x == k l &amp;&amp; k &gt; 0, x] 
(* k &gt; 0 &amp;&amp; x == -a + k l *) 
 
 
I think a + x == k l and Mod[a + x, l] == 0 are equivalent, but when I 
replace a + x == k l by Mod, Mathematica  ...

- asked by LoveRight (1 vote)

—————————-

[ListPlot3D keeps crashing] http://mathematica.stackexchange.com/questions/71559/listplot3d-keeps-crashing

I have some data, and I want to plot it by ListPlot3D:

image1 = Import["image1.dat", "TSV"]; 
image1 // Dimensions 
(* -&gt; {150000, 3} *) 
 
 
I used: 
 
ListPlot3D[image1[[1 ;; 50000]], MaxPlotPoints  ...

- asked by yashar (1 vote)

6.52 Tuesday, January 6, 2015

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

[Generating 250 random points crashes the kernel, but not 249] http://mathematica.stackexchange.com/questions/69891/generating-250-random-points-crashes-the-kernel-but-not-249

Consider the following function, which generates uniformly random points on the surface of the 2-sphere:

randSphere[] := Block[{z = RandomReal[{-1, 1}, 3]}, 
If[Total[z^2] &gt; 1, randSphere[],  ...

- asked by David Zhang (23 votes), answered by Szabolcs (22 votes)

—————————-

[How to add lines in TableForm] http://mathematica.stackexchange.com/questions/69970/how-to-add-lines-in-tableform

m = { 
{3, 5, 5, 5, 5, 5, 5, 5}, 
{3, 6, 8, 8, 8, 8, 8, 8}, 
{3, 6, 10, 11, 11, 11, 11, 11}, 
{3, 6, 10, 14, 14, 14, 14, 14}, 
{3, 6, 10, 15, 17, 17, 17, 17}, 
{3, 6, 10, 15,  ...

- asked by Chen Stats Yu (17 votes), answered by kguler (10 votes)

—————————-

[Gap in a continuous plot] http://mathematica.stackexchange.com/questions/69976/gap-in-a-continuous-plot

Why do I get a gap in the plot below and how can I fix it? (If you are interested in it, you can see a new related question: How to plot an implicit value funtion, which is also a little chanlenging)

...

- asked by ben (13 votes), answered by kguler (9 votes)

—————————-

[Max element of a list with a custom ordering function] http://mathematica.stackexchange.com/questions/69971/max-element-of-a-list-with-a-custom-ordering-function

I need a function to find max element of a list according to some custom ordering function, assuming that the function implements a total order (elements being compared might not even be numbers). ...

- asked by Vladimir Reshetnikov (10 votes), answered by Mr.Wizard (8 votes)

—————————-

[Choose between ‘Apply‘ and ‘Map‘] http://mathematica.stackexchange.com/questions/70201/choose-between-apply-and-map

Even though this might be too general question(or not answerable), I want to get some advice here. I apologize in advance if it is not a relevant question.

I frequently have to process large list of ...

- asked by Sungmin (8 votes)

—————————-

[Collatz optimization] http://mathematica.stackexchange.com/questions/69902/collatz-optimization

I’m VERY new to Mathematica programming (and by new I mean two days), and was solving Project Euler question 12, which states:

Which starting number, under one million, produces the longest ...

- asked by globby (8 votes), answered by mgamer (9 votes)

—————————-

[How to connect discrete points and make them become continuous curve?] http://mathematica.stackexchange.com/questions/70102/how-to-connect-discrete-points-and-make-them-become-continuous-curve

Given that I have two variables \(\theta ,t\), for the varible \(t\), \(\theta \) always owns several values. Namely, \[\{t,\theta _1,\theta _2,\theta _3,\theta _4...\}\] where \(t\) in the interval\([0,1]\) and ...

- asked by ShutaoTang (7 votes), answered by Yi Wang (12 votes)

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

[Image processing: Floor plan - detecting rooms’ borders (area) and room names’ texts] http://mathematica.stackexchange.com/questions/19546/image-processing-floor-plan-detecting-rooms-borders-area-and-room-names-t

Here is a simple building floor plan. I would like to derive the rooms as (rectangular) components and the names of the rooms. This is very common representation of building floor plans.

The ...

- asked by s.s.o (37 votes), answered by nikie (38 votes)

—————————-

[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 \(y\) axis. How can I have two different axis?

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

- asked by 500 (77 votes), answered by ArgentoSapiens (70 votes)

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

[How to control pedestrians to enter the simulation region with random functions?] http://mathematica.stackexchange.com/questions/70173/how-to-control-pedestrians-to-enter-the-simulation-region-with-random-functions

I am working on simulating crowds of a cross-typed region, given that pedestrians entering from 4 gates of north, east, west and south,

spacesize = 100;width = Floor[0.1 spacesize]; 
npeople =  ...

- asked by Andy Huang (2 votes)

—————————-

[Why does Mathematica show 4095/4096 terms in TrigExpand?] http://mathematica.stackexchange.com/questions/70092/why-does-mathematica-show-4095-4096-terms-in-trigexpand

Clear[x, n]; 
expr = Cos[x]^(n - 2) (1 - Cos[x]^2 + Sin[x]); 
r=TrigExpand[expr]

Where do those 4095/4096 comes from? It is correct, but it seems very strange way to represent the result.

...

- asked by Nasser (3 votes)

—————————-

[How to get the SIFT features of an image?] http://mathematica.stackexchange.com/questions/70165/how-to-get-the-sift-features-of-an-image

According to the documentation, the function KeyPoints[] computes features only using SURF, but what about SIFT or FAST features?

- asked by M.R. (1 vote)

Chapter 7
Year 2014

7.1 Tuesday, December 30, 2014
7.2 Tuesday, December 16, 2014
7.3 Tuesday, December 16, 2014
7.4 Tuesday, December 9, 2014
7.5 Tuesday, December 2, 2014
7.6 Tuesday, November 25, 2014
7.7 Tuesday, November 18, 2014
7.8 Tuesday, November 11, 2014
7.9 Tuesday, November 4, 2014
7.10 Tuesday, October 28, 2014
7.11 Tuesday, October 21, 2014
7.12 Tuesday, October 14, 2014
7.13 Tuesday, October 7, 2014
7.14 Tuesday, September 30, 2014
7.15 Tuesday, September 23, 2014
7.16 Tuesday, September 16, 2014
7.17 Tuesday, September 9, 2014
7.18 September 2, 2014
7.19 August 26, 2014
7.20 August 19, 2014
7.21 August 12, 2014
7.22 August 5, 2014
7.23 July 29, 2014
7.24 July 22, 2014
7.25 July 15, 2014
7.26 July 8,2014
7.27 July 1, 2014
7.28 June 24, 2014
7.29 June 17, 2014
7.30 June 10, 2014
7.31 June 3, 2014
7.32 May 27 2014
7.33 May 20 2014
7.34 May 13, 2014
7.35 May 6, 2014
7.36 April 15, 2014
7.37 April 1, 2014
7.38 March 25, 2014
7.39 March 18, 2014
7.40 March 11, 2014
7.41 March 4, 2014
7.42 February 25, 2014
7.43 February 18, 2014
7.44 February 11, 2014
7.45 February 4, 2014
7.46 January 28, 2014
7.47 January 21, 2014
7.48 January 14, 2014
7.49 January 7, 2014

7.1 Tuesday, December 30, 2014

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

[How would I return a random Mathematicacommand?] http://mathematica.stackexchange.com/questions/69627/how-would-i-return-a-random-mathematica-command

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

I’m looking for ...

- asked by Alexander Gruber (10 votes), answered by bill s (16 votes)

—————————- [Rendering thousands ofpoints] http://mathematica.stackexchange.com/questions/69774/rendering-thousands-of-points

I am trying to render an image with some 120,000 Points. Technically it’s just 10,000 points, plus their reflection, plus 5 rotations of both of those sets, but I’m not sure that’s relevant. The code ...

- asked by Martin Buttner (9 votes), answered by Sjoerd C. de Vries (11 votes)

—————————-

[Truncating a list once all members of a set have appeared?] http://mathematica.stackexchange.com/questions/69613/truncating-a-list-once-all-members-of-a-set-have-appeared

Consider if you would the case where we have some list of elements:

list0 = 54, 4, 7, 9, 3, 54, 4, 20, 2, 456, 2, 3;

And we have some target list:

targetList = 2, 3, 4, 7;

We’d like to scan ...

- asked by GreenField (9 votes), answered by Mr.Wizard (4 votes)

—————————-

[Find the minimum integer r such that \((10^r - 1)/37\) is an integer] http://mathematica.stackexchange.com/questions/69811/find-the-minimum-integer-r-such-that-10r-1-37-is-an-integer

I know Element[(10^r - 1)/37, Integers] tests the condition.

So what is the command that gives me the minimum integer value r such that the condition is true?

- asked by LoveRight (7 votes), answered by Oleksandr R. (10 votes)

—————————-

[Definite integral incorrectly giving a nonreal value] http://mathematica.stackexchange.com/questions/69718/definite-integral-incorrectly-giving-a-nonreal-value

In Mathematica 10.0, when I enter

N[Integrate[Sqrt[1+x^3],{x,-1,3}]] 
 
, I get a nonreal value.  (I.e., the imaginary part is nonzero.)  Why? 
 
This arose when I was seeing if Sqrt[1_x^3] has an  ... 

- asked by Stephen Herschkorn (7 votes), answered by Nasser (6 votes)

—————————-

[LetterCharacter for Cyrillic symbols]http://mathematica.stackexchange.com/questions/69728/lettercharacter-for-cyrillic-symbols

Why does the code

StringMatchQ["bl", LetterCharacter]

return False?

Probably because:

StringMatchQ[bl", LetterCharacter] // HoldForm // FullForm 
...

- asked by molekyla777 (7 votes), answered by Karsten 7. (7 votes)

—————————-

[How discretize a region placing vertices on a specific non-uniform grid] http://mathematica.stackexchange.com/questions/69584/how-discretize-a-region-placing-vertices-on-a-specific-non-uniform-grid

Given a generic region, for example:

\[CapitalOmega] = ImplicitRegion[((2*x^2 + 3*y^2 + 2*x*y - 2 & )*lt; ) = (0^x^2 + y^2 & )*gt; 0.1, {x, y}]; 
 
and a non-uniform grid, for example: 
 
\[CapitalOmega]b = RegionBounds[\[CapitalOmega]]; 
{xg, yg} =  ...

- asked by unlikely (6 votes), answered by kguler (9 votes)

================================== 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?

- asked by stevenvh (17 votes), answered by Artes (10 votes)

—————————-

[What are the most common pitfalls awaiting new users?] http://mathematica.stackexchange.com/questions/18393/what-are-the-most-common-pitfalls-awaiting-new-users

As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...

- asked by belisarius (184 votes), answered by Michael E2 (99 votes)

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

[DSolve versus DSolveValue] http://mathematica.stackexchange.com/questions/69793/dsolve-versus-dsolvevalue

I’ve just discovered the new command DSolveValue in Mathematica 10. Is this new command now the preferred instead of DSolve? Is it the better command to teach to students? Same question for ...

- asked by David (2 votes)

—————————-

[Font rendering difference between .jpg & .pdf] http://mathematica.stackexchange.com/questions/69825/font-rendering-difference-between-jpg-pdf

I have some planar graphics involving lines and text, produced by Line[] and Text[], accepting the default font on the latter. When I Save Graphics as .jpg, it looks fine, left below. When I save as ...

- asked by Joseph O’Rourke (2 votes)

—————————-

[Regular Polyhedra coordinate points generation] http://mathematica.stackexchange.com/questions/69839/regular-polyhedra-coordinate-points-generation

Is it possible to get all points on a Polyhedron surface using two surface parameters, say

\( \phi ,\theta \) spherical co-ordinates?

Just like in ParametricPlot3D, can we start with PolyhedronData ...

- asked by Narasimham (1 vote)

7.2 Tuesday, December 16, 2014

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

[Buying a new computer (specifically for Mathematica)] http://mathematica.stackexchange.com/questions/69404/buying-a-new-computer-specifically-for-mathematica

My current computer is a MacBook Air, the mid-2011 version: 4 GB RAM, 1.7 GHz Intel dual core. It runs Mathematica 9 smoothly, but a bit too slowly for my taste. I use Mathematica almost exclusively ...

- asked by Kim Fierens (14 votes), answered by halirutan (15 votes)

—————————-

[Difference between Association and Dispatch] http://mathematica.stackexchange.com/questions/69291/difference-between-association-and-dispatch

In the example below, Association has a different behavior from Dispatch:

{1, 2, 3} /. Association@{1 -&gt; "test",2 -&gt; "test" , _Integer -&gt; 
Null} 
{1, 2, 3} /. Dispatch@{1 -&gt; "test" ,2 -&gt;  ...

- asked by Murta (13 votes), answered by Leonid Shifrin (15 votes)

—————————-

[Real Numbers in the Wolfram Language] http://mathematica.stackexchange.com/questions/69525/real-numbers-in-the-wolfram-language

This is more of a request for advice and input than a solution to a programming challenge, but I thought it might be useful to raise here nonetheless.

I am wondering if Mathematica and the Wolfram ...

- asked by David Carraher (11 votes)

—————————-

[InverseFourierTransform of simple function takes forever] http://mathematica.stackexchange.com/questions/69477/inversefouriertransform-of-simple-function-takes-forever

i’m quite new to Mathematica. I’m trying to do something along the lines of:

InverseFourierTransform[1/(w^2 - I*w*b + c) , w, t, FourierParameters 
-&gt; {1, -1}, Assumptions -&gt; {b &gt; 0, c &gt;  ...

- asked by pnjun (9 votes), answered by bbgodfrey (8 votes)

—————————-

[Divide all but the maximal element in a list by 10?] http://mathematica.stackexchange.com/questions/69547/divide-all-but-the-maximal-element-in-a-list-by-10

I have a list of numerical data, and I want to write a program that will keep the maximum as it is, but reduce the rest by certain factor (such as 10). For example:

input = {2, 3, 1, -3, -5, 9, 2, 6,  ...

- asked by Paul (8 votes), answered by WReach (10 votes)

—————————-

[Select a particular rules out of a list] http://mathematica.stackexchange.com/questions/69299/select-a-particular-rules-out-of-a-list

rule = {beta -&gt; 4, alpha -&gt; 2, x -&gt; 4, z -&gt; 2, w -&gt; 0.8} 
Select[rule, beta] 
Select[rule, beta &amp;] 
Select[rule, beta -&gt; _ &amp;]

How would I select the rule that applies to beta ...

- asked by Chen Stats Yu (8 votes), answered by kguler (12 votes)

—————————-

[10.0.2 another Dataset type system (inference?) warning] http://mathematica.stackexchange.com/questions/69542/10-0-2-another-dataset-type-system-inference-warning

Bug introduced in 10.0.2

The warning below seems unrelated to these issues: Did 10.0.2 break some forms for named slots? and 10.0.2 mapping Association to Dataset warning.

First noticed w/ ...

- asked by alancalvitti (7 votes), answered by Stefan R (11 votes)

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

[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 ...

- asked by Margus (45 votes), answered by Daniel Lichtblau (43 votes)

—————————-

[How to create animated snowfall?] http://mathematica.stackexchange.com/questions/16881/how-to-create-animated-snowfall

Well, the title is self-explanatory. What sorts of snowfall can we generate using Mathematica? There are two options I suggest to consider:

1) Continuous GIF animations with smallest possible number ...

- asked by faleichik (30 votes), answered by Simon Woods (35 votes)

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

[How to execute code on FrontEnd quit?] http://mathematica.stackexchange.com/questions/69385/how-to-execute-code-on-frontend-quit

I would like to execute a block of code whenever the FrontEnd quits. I know about $Epilog, but it seems that this would execute every time the kernel quits, which is not what I want. Does anyone know ...

- asked by rdjain1 (4 votes)

—————————-

[Logarithmic vertex placement in large tree graphs] http://mathematica.stackexchange.com/questions/69555/logarithmic-vertex-placement-in-large-tree-graphs

This question about graph layout is fairly general, but can be illustrated in the case of the Collatz Conjecture. Collatz created the following function over positive integers: If the integer n is ...

- asked by David G. Stork (1 vote)

—————————-

[Background color does not display in InputField unless Appearance option is also specified] http://mathematica.stackexchange.com/questions/69446/background-color-does-not-display-in-inputfield-unless-appearance-option-is-also

I get the same behavior for v.10.0.2 and v.9 with OS X (10.9.5) :

No background color is displayed in InputField if I just set properly the option. For example, the background just remains white if ...

- asked by SquareOne (2 votes)

7.3 Tuesday, December 16, 2014

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

[Bug in ArcLength?]http://mathematica.stackexchange.com/questions/69122/bug-in-arclength

With Mathematica 10.0.2:

ArcLength[Line[{{0, 0}, {1, 0}, {2, 0}}]] 
ArcLength[Line[{{0}, {1}, {2}}]] 
(* 2 *) 
(* 2 *) 
 
 
However, 
 
ArcLength[Line[{{0, 0}, {1, 0}, {2.0, 0}}]] 
ArcLength[Line[{{0}, {1},  ...

- asked by qwerty (15 votes)

—————————-

[Save as pdf broken in version 10.0.2?] http://mathematica.stackexchange.com/questions/68893/save-as-pdf-broken-in-version-10-0-2

It looks like the save as pdf is broken after I update to version 10.0.2. The labels in the plot become a mess.

Are there ways to fix it? The Export function works well though.

Here is a screenshot

...

- asked by xslittlegrass (12 votes)

—————————-

[What does f_[whoCalled]^:=f really mean?] http://mathematica.stackexchange.com/questions/68823/what-does-f-whocalled-f-really-mean

I came across the following post by John Doty in this Google Groups discussion:

On Friday, January 11, 2013 8:23:16 PM UTC-7, amzoti wrote:

It is clear the Mathematica uses Lisp as one ...

- asked by Shredderroy (11 votes), answered by Chris Degnen (1 vote)

—————————-

[10.0.2 mapping Association to Dataset warning] http://mathematica.stackexchange.com/questions/68875/10-0-2-mapping-association-to-dataset-warning

In 10.0.2

ExampleData[{"Dataset", "Titanic"}][All, &lt;| "gender" -&gt; #sex|&gt; 
&amp;] 
 
 
Outputs the expected result, but also throws: 
 
 
MapAt::partw: Part {1,All,2} of 
...

- asked by alancalvitti (10 votes), answered by Taliesin Beynon (12 votes)

—————————-

[Sampling phase space uniformly for a given energy] http://mathematica.stackexchange.com/questions/69029/sampling-phase-space-uniformly-for-a-given-energy

For example, for the 1D harmonic oscillator, the energy is given by: \[ E = \frac {1}{2 m} p^2 + \frac {m \omega ^2}{2} x^2 \] where x is position and p is the momentum.

I would like to sample phase ...

- asked by user29165 (8 votes), answered by bbgodfrey (5 votes)

—————————-

[representation of custom deformation on a meshgrid] http://mathematica.stackexchange.com/questions/69132/representation-of-custom-deformation-on-a-meshgrid

I am trying to represent 2D deformations on a rectangular grid. In Mathematica 10, there is a method to solve the elastic differential equations and then represent the deformation as presented here:

...

- asked by Botond (7 votes), answered by Michael E2 (9 votes)

—————————-

[Processing a circular rainbow in an image] http://mathematica.stackexchange.com/questions/69092/processing-a-circular-rainbow-in-an-image

I was flying cross country last week. We were at about 35000 feet with a complete cloud deck below us. I looked down and saw a complete circular rainbow above the clouds. It was in view about 10 ...

- asked by Rob (7 votes), answered by bill s (9 votes)

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

[How to find the domain and range of a function with Mathematica?] http://mathematica.stackexchange.com/questions/8016/how-to-find-the-domain-and-range-of-a-function-with-mathematica

I’m studying calculus and in some exercises I am asked to find the domain and range of a function. Does Mathematica have already a built-in function for this?

I can imagine some ways of doing so, ...

- asked by Vyska (17 votes), answered by Szabolcs (18 votes)

—————————-

[How to ask Mathematica to imitate Andy Warhol’s pop-art painting?] http://mathematica.stackexchange.com/questions/59132/how-to-ask-mathematica-to-imitate-andy-warhols-pop-art-painting

I tried to ask Mathematica to imitate Andy Warhol, let it convert a Marilyn Monroe’s portrait so that it looks like Warhol’s world famous pop-art painting. However, the result shown below is far from ...

- asked by Putterboy (37 votes), answered by belisarius (41 votes)

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

[Linux: Mathematica crashes when clicking documentation links very fast] http://mathematica.stackexchange.com/questions/68927/linux-mathematica-crashes-when-clicking-documentation-links-very-fast

Can someone confirm the following behavior: Open a new Mathematica and go to the documentation. Navigate to any reference page (I used RegionPlot) and click repeatedly and very fast the RegionPlot ...

- asked by halirutan (5 votes)

—————————-

[Import/Export a FIT file, Fitness file created by Garmin GPS’s and others] http://mathematica.stackexchange.com/questions/69085/import-export-a-fit-file-fitness-file-created-by-garmin-gpss-and-others

A FIT file is a binary replacement for GPX and TCX text files containing GPS and fitness data (heart monitors, etc.). Mathematica reads GPX and TCX files and represents them as XML. I would like to ...

- asked by Douglas Kubler (1 vote)

—————————-

[Creating REST Web Service with webMathematica] http://mathematica.stackexchange.com/questions/69021/creating-rest-web-service-with-webmathematica

Someone knows how can I implement a REST Web Service with webMathematica?

The SOAP service is well documented here and in the webMathematica User Guide.

I saw that is possible to create a REST ...

- asked by Murta (4 votes)

7.4 Tuesday, December 9, 2014

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

[Where is the old option TraceInternal->True?] http://mathematica.stackexchange.com/questions/67305/where-is-the-old-option-traceinternal-true

Already at least in version 2 (I think), the function Solve calls the function Roots. At that time, I had a rather dirty trick, that still works, to verify this:

Unprotect[Roots]; 
Roots[x___] /;  ...

- asked by Fred Simons (14 votes), answered by WReach (13 votes)

—————————-

[What are the purposes of functions in FrontEnd‘ context which are duplicates of those in System‘?] http://mathematica.stackexchange.com/questions/67179/what-are-the-purposes-of-functions-in-frontend-context-which-are-duplicates-of

I noticed that for notebook-related heads, there are usually a pair of same functions, one in System context, another in FrontEnd context. I filtered out a list of functions of this kind:

candidates ...

- asked by Naitree (9 votes), answered by Naitree (6 votes)

—————————-

[Modify existing color scheme] http://mathematica.stackexchange.com/questions/67212/modify-existing-color-scheme

I am using the "TemperatureMap" color scheme for image processing. How can I set the lowest color value to Black?

Generally speaking, is it possible to exchange a specific color (at a certain value ...

- asked by Milenko Rubin-Zuzic (8 votes), answered by rm -rf (13 votes)

—————————-

[Get rational and irrational parts] http://mathematica.stackexchange.com/questions/67293/get-rational-and-irrational-parts

Consider an expression of the form \(a + b \sqrt {2}\), where \(a,b \in \mathbb {Q}\). How can I extract \(b\) (or equivalently \(a\)) from this expression?

- asked by Tyson Williams (8 votes), answered by Michael E2 (6 votes)

—————————-

[Implementation of Partial Least Squares (PLS)?] http://mathematica.stackexchange.com/questions/67282/implementation-of-partial-least-squares-pls

I’m looking for a PLS implementation for Wolfram Mathematica. I just cant seem to find any implementation for it - do you know one? In general, I’m a bit confused that there exist only so few ...

- asked by tim (6 votes)

—————————-

[A short notation to fix the assumption that all involved parameters are, say, positive] http://mathematica.stackexchange.com/questions/67601/a-short-notation-to-fix-the-assumption-that-all-involved-parameters-are-say-po

Often I make simplifications or other operations with assumptions. Sometimes the assumptions simply state that all parameters involved are positive.

I wonder, if there is a short notation for such a ...

- asked by Alexei Boulbitch (5 votes), answered by kguler (2 votes)

—————————-

[Why are TimeSeries objects reported with head "TemporalData"?] http://mathematica.stackexchange.com/questions/67597/why-are-timeseries-objects-reported-with-head-temporaldata

I am quite surprised to find that

ts = TimeSeries[ {1,2,3,4}, {{1,2,3,4}}]; 
Head @ ts 
 
 
returns 
 
(* TemporalData *)

I do find this quite inconsistent as the object is also reported with ...

- asked by gwr (5 votes)

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

[Even Fibonacci numbers] http://mathematica.stackexchange.com/questions/37266/even-fibonacci-numbers

Today, I found the Euler Project. Problem #2 is

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:

1, ...

- asked by ShutaoTang (24 votes), answered by rcollyer (31 votes)

—————————-

[Implementing efficient multiple undo] http://mathematica.stackexchange.com/questions/1953/implementing-efficient-multiple-undo

At the time this question was asked, version 10 was not out yet. The Front End of Mathematica 10 does have multiple undo, see the answer by John Fultz.

The Mathematica Front End’s built-in Undo ...

- asked by Rojo (112 votes), answered by John Fultz (38 votes)

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

[The CorrelationMatrix is equal to corrcoef of Matlab?] http://mathematica.stackexchange.com/questions/67348/the-correlationmatrix-is-equal-to-corrcoef-of-matlab

I know that my question imply to know matlab, and this is not the right place, but i’m a physics student and i don’t quite yet understand this concepts. When i make a LinearModelFit i can get a ...

- asked by Kafkarudo (2 votes)

—————————-

[How to assemble and disassemble a function into steps] http://mathematica.stackexchange.com/questions/67325/how-to-assemble-and-disassemble-a-function-into-steps

I’ve watched many programmers (both novice and expert) write functions in Mathematica and have observed a common behavioral pattern. This pattern has many elements that would be automated and thus ...

- asked by user5601 (3 votes)

—————————-

[Mathematica 10 and Mac] http://mathematica.stackexchange.com/questions/67552/mathematica-10-and-mac

This might be a the wrong place to post the question, but I am sure that there would be few places where I would find people who would know more about how mathematica works.

I am looking to buy a new ...

- asked by ALEXANDER (2 votes)

7.5 Tuesday, December 2, 2014

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

[Wind Map Artwork] http://mathematica.stackexchange.com/questions/66936/wind-map-artwork

I would like some help generating an image like the one seen below.

The image above is an art piece called Wind Map by artists Fernanda Viegas and Martin Wattenberg.

I would like to take wind ...

- asked by James Rohal (15 votes), answered by Silvia (10 votes)

—————————-

[Visual representation of a Ranking over time (image provided)] http://mathematica.stackexchange.com/questions/66581/visual-representation-of-a-ranking-over-time-image-provided

[Disclaimer: I initially posted this question on stackOverflow 2 months ago and think it might be better suited for this forum (link to original question)]

The graph below shows a ranking of ...

- asked by Seb (15 votes), answered by belisarius (17 votes)

—————————-

[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.

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

- asked by mathe (12 votes), answered by Bob Hanlon (7 votes)

—————————-

[Mathematica, animations, and external ray tracing programs] http://mathematica.stackexchange.com/questions/66638/mathematica-animations-and-external-ray-tracing-programs

As much as I enjoy and admire Mathematica’s animation capabilities, I would like to take my animations to the next level by exporting the geometry of every frame to an external ray tracing program ...

- asked by Kim Fierens (11 votes), answered by Alexey Popkov (4 votes)

—————————-

[Combine Stereographic "Entity" Plot of Arctic Sea with Contour Plot] http://mathematica.stackexchange.com/questions/66562/combine-stereographic-entity-plot-of-arctic-sea-with-contour-plot

In the announcement of Mathematica 10 there were some very cool features for every geo-related researcher. Like this one

what i’m trying to do is to overlay an ContourPlot onto this beautiful arctic ...

- asked by Julian Carpenter (10 votes), answered by FJRA (3 votes)

—————————-

[Generating Random Real numbers with certain numbers not included] http://mathematica.stackexchange.com/questions/66756/generating-random-real-numbers-with-certain-numbers-not-included

I’m writing a program that i need 1000 real number between -3 and 6. the code that I used for generating and saving them was

l = RandomReal[-3, 6, 1000]

But I want to be sure none of these ...

- asked by user2838619 (9 votes), answered by belisarius (9 votes)

—————————-

[Detect implicit grid in image with monospaced characters] http://mathematica.stackexchange.com/questions/66886/detect-implicit-grid-in-image-with-monospaced-characters

I’m trying to detect the monospaced-grid in a possibly slightly deformed image of a receipt. Example input (full size here)

My idea is to obtain the centroids or bounding boxes of all components ...

- asked by Thijs (8 votes), answered by belisarius (9 votes)

================================== 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?

- asked by stevenvh (16 votes), answered by Artes (10 votes)

—————————-

[Generating visually pleasing circle packs] http://mathematica.stackexchange.com/questions/40334/generating-visually-pleasing-circle-packs

EDIT: (my conclusion and thank you note) I want to thank you all guys for this unexpected intellectual and artistic journey. Hope you had fun and enjoyed it the same as I did.

I would like to ...

- asked by VividD (67 votes), answered by level1807 (42 votes)

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

[Lists for built-in functions that can work without brackets] http://mathematica.stackexchange.com/questions/67039/lists-for-built-in-functions-that-can-work-without-brackets

I just noticed that Exit and Quit can work without brackets i.e. a single

Exit

or

Quit

will quit the kernel. Quite surprising!

This isn’t mentioned in the document of them. Is there a list for ...

- asked by xzczd (3 votes)

—————————-

[ImportString JSON possible bug] http://mathematica.stackexchange.com/questions/67076/importstring-json-possible-bug

My problem is when I catch up some json output of  whatever method and 
process it with ImportString[%, "JSON"], The first time when it 
executes, it works and then without doing anything, it stops  ...

- asked by d555 (4 votes)

—————————-

[Fractals or other patterns in the quadruple linked pendulum] http://mathematica.stackexchange.com/questions/67012/fractals-or-other-patterns-in-the-quadruple-linked-pendulum

This will seem like a physics question, but I’m looking for something to do in Mathematica specifically. I’ve successfully modeled a quadruple linked pendulum by setting up the ODEs and solving them ...

- asked by Lonely Mathematician (3 votes)

7.6 Tuesday, November 25, 2014

================================== 
Top new questions this week: 
================================== 
 
[Is it possible to draw really thin lines in 
Mathematica?]\url{http://mathematica.stackexchange.com/questions/66177/is-i 
t-possible-to-draw-really-thin-lines-in-mathematica} 
 
I want to have in Mathematica the same result I have in Python: 
 
 
I have this nice effect simply by using very thin lines. But it seems in 
Mathematica thickness property has some limit and i just got  ... 
 
- asked by funnypony (18 votes), answered by Alexey Popkov (18 votes) 
 
---------------------------- 
 
[How to write Morse code into Plot 
Dashing?]\url{http://mathematica.stackexchange.com/questions/66267/how-to-w 
rite-morse-code-into-plot-dashing} 
 
How can we define a dashing pattern in a plot such that it reads 
arbitrary text in Morse code? 
 
For instance 
 
Graphics[{DotDashed, Line[{{0, 0}, {5, 0}}]}] 
 
 
 
 
 
 
this could be interpreted as ".-"  ... 
 
- asked by rhermans (14 votes), answered by rhermans (20 votes) 
 
---------------------------- 
 
[How do I draw a pair of 
buttocks?]\url{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  ... 
 
- asked by Simpleton Jack (11 votes), answered by gpap (20 votes) 
 
---------------------------- 
 
[Automatically execute command after 
save]\url{http://mathematica.stackexchange.com/questions/66239/automaticall 
y-execute-command-after-save} 
 
I want to run some code automatically after saving my notebook. Is there 
a $ variable or setting for this? 
 
 
- asked by Giovanni (10 votes), answered by funnypony (13 votes) 
 
---------------------------- 
 
[Minesweeper beta : How to Dynamic a lot of graphics with high-speed] 
\url{http://mathematica.stackexchange.com/questions/66133/minesw 
eeper-beta-how-to-dynamic-a-lot-of-graphics-with-high-speed} 
 
Recently I want to write a game,Minesweeper.Here is my completed code. 
 
Clear["Global`*"] 
path = "http://i.stack.imgur.com//" &lt;&gt; # &amp;; 
filenames1 = {"P22Go.jpg", "Zh27M.jpg", "vKZZr.jpg",  ... 
 
- asked by Chenminqi (8 votes) 
 
---------------------------- 
 
[Is plot polluting my 
context?]\url{http://mathematica.stackexchange.com/questions/66255/is-plot- 
polluting-my-context} 
 
Whenever I plot something 3 temporary variables get added to my current 
context. 
 
Example (fresh Kernel): 
 
Plot[x, {x, -1, 1}]; 
Names["Global`*"] 
 
 
Output: 
 
{"x", "$3", "$4", "$5"} 
 
 
When I do the  ... 
 
- asked by Max1 (8 votes) 
 
---------------------------- 
 
[How to subtract one list from another, treating each elements as 
distinct?]\url{http://mathematica.stackexchange.com/questions/66079/how-to- 
subtract-one-list-from-another-treating-each-elements-as-distinct} 
 
Suppose that I have 
 
a = {"A", "A", "A", "B", "B", "C"} 
b = {"A", "B"} 
 
 
How can I subtract b from a such that the result is {"A", "A", "B", 
"C"}? 
 
One solution I can think of is to use 
 
... 
 
- asked by Taiki (8 votes), answered by Kuba (8 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Get a "step by step" evaluation in Mathematica] 
\url{http://mathematica.stackexchange.com/questions/148/get-a-s 
tep-by-step-evaluation-in-mathematica} 
 
Is it possible in Mathematica to get a step-by-step evaluation of some 
functions; that's to say, outputting not only the result but all the 
stages that have led to it? 
 
Example : Let's say I want to  ... 
 
- asked by Skydreamer (60 votes), answered by J.M. (51 votes) 
 
---------------------------- 
 
[How to create a new "person 
curve"?]\url{http://mathematica.stackexchange.com/questions/17704/how-to-cr 
eate-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 (48 votes), answered by Vitaliy Kaurov (21 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Mod[1.2, 0.2] is not equal to 
zero]\url{http://mathematica.stackexchange.com/questions/66386/mod1-2-0-2-i 
s-not-equal-to-zero} 
 
I'm new to mathematica but this doesn't seem to make any sence 
 
In[1]:=Mod[1.2, 0.2] 
Out[1]=0.2 
 
 
Why is it not zero? 
 
Edit: 
 
This is what I wanted to do: 
 
xgrid = Table[{i,If[Mod[i, 0.2] == 0 ,  ... 
 
- asked by Patrick Chin (2 votes) 
 
---------------------------- 
 
[Parsing RLink RObject for 
summary.aovlist]\url{http://mathematica.stackexchange.com/questions/66506/p 
arsing-rlink-robject-for-summary-aovlist} 
 
There's some slightly similar requests out there (e.g. Getting R textual 
output into Mathematica ) but I'm wondering if anyone has put together a 
more general purpose solution to parsing RObject[]  ... 
 
- asked by flip (1 vote) 
 
---------------------------- 
 
[Implement a piecewise function elegantly and 
efficiently]\url{http://mathematica.stackexchange.com/questions/66209/imple 
ment-a-piecewise-function-elegantly-and-efficiently} 
 
Given that 
$$ 
g(x)= 
\begin{cases} 
max(x_{min},x-m) &amp; 0.5x \leq max(x_{min},x-m) \\ 
0.5x &amp; max(x_{min},x-m)&lt;0.5x&lt;min(1,x+m) \\ 
min(1,x+m) &amp; min(1,x+m)\leq 0.5x 
\end{cases}$$ 
... 
 
- asked by ShutaoTang (4 votes) 

7.7 Tuesday, November 18, 2014

================================== 
Top new questions this week: 
================================== 
 
[How to extract a list of available 
Method-s]\url{http://mathematica.stackexchange.com/questions/65680/how-to-e 
xtract-a-list-of-available-method-s} 
 
The option Methodapplies for several functions, such as NDSolve, 
FindRoot, NIntegrate and some others. It is difficult, however, to find 
a list of Methods for a given function. By digging through  ... 
 
- asked by Alexei Boulbitch (16 votes), answered by Nasser (18 votes) 
 
---------------------------- 
 
[How to programmatically extract mathematical formulas from Word with 
Mathematica 
9?]\url{http://mathematica.stackexchange.com/questions/65666/how-to-program 
matically-extract-mathematical-formulas-from-word-with-mathematica} 
 
I have a bunch of(1000+) Microsoft Word document in .Docx format. How 
can I programmatically extract the mathematical formulas from MS Word 
using Mathematica 9? 
 
This is what example looks like (or  ... 
 
- asked by Xiang Li (15 votes), answered by WolframFan (15 votes) 
 
---------------------------- 
 
[Why is TextString[-0.5] a positive 
number?]\url{http://mathematica.stackexchange.com/questions/65600/why-is-te 
xtstring-0-5-a-positive-number} 
 
I want to format numbers in decimal notation and chose TextString for 
this task. But today, when looking at the final result of my 3-weeks 
measurement, the sign seemed odd. I traced it to the  ... 
 
- asked by Martin J.H. (14 votes), answered by Szabolcs (10 votes) 
 
---------------------------- 
 
[Quickly test if all element in list is the 
same]\url{http://mathematica.stackexchange.com/questions/65782/quickly-test 
-if-all-element-in-list-is-the-same} 
 
I'm running a Monte Carlo simulation. At the end, I want to count how 
many simulations return a list of same element. 
 
My problem: 
 
SimulationResult = (* n x m matrix of real numbers *) 
c =  ... 
 
- asked by Zoff Dino (12 votes), answered by Michael E2 (9 votes) 
 
---------------------------- 
 
[Efficient way to compare animated images to tell if they are the 
same]\url{http://mathematica.stackexchange.com/questions/65794/efficient-wa 
y-to-compare-animated-images-to-tell-if-they-are-the-same} 
 
I have a Student license for Mathematica, and felt like I wasn't making 
full use of the wonderful toolkit that it is; so I looked into things 
like its image processing capabilities. Now, I made and  ... 
 
- asked by Austin Burk (11 votes), answered by Pickett (7 votes) 
 
---------------------------- 
 
[A one line proof that one is zero using Mathematica 
10]\url{http://mathematica.stackexchange.com/questions/65624/a-one-line-pro 
of-that-one-is-zero-using-mathematica-10} 
 
a = (Sqrt[2] + 1) (Sqrt[2] - 1) - 1; 
{a/a, Simplify[a]/a, b/b == Simplify[b]/b} 
 
 
 
{1, 0, True} 
 
 
 
This one line "proof" that one equals zero is disturbing (and could 
possibly lead to wrong results  ... 
 
- asked by Gregoire Nicollier (11 votes), answered by Szabolcs (22 
votes) 
 
---------------------------- 
 
[Curve fitting by running through hundreds of models and return the one 
with best 
fit]\url{http://mathematica.stackexchange.com/questions/65757/curve-fitting 
-by-running-through-hundreds-of-models-and-return-the-one-with-best} 
 
In the past, I used to solve a lot of my regression analysis (curve 
fitting) problems with a program called DataFit which runs on Windows. 
It has hundreds of regression models which it runs through in  ... 
 
- asked by MathLind (9 votes), answered by kguler (17 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[How to create a new "person 
curve"?]\url{http://mathematica.stackexchange.com/questions/17704/how-to-cr 
eate-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 (47 votes), answered by Vitaliy Kaurov (20 votes) 
 
---------------------------- 
 
[Numerically solving Helmholtz equation in 2D for arbitrary 
shapes]\url{http://mathematica.stackexchange.com/questions/56305/numericall 
y-solving-helmholtz-equation-in-2d-for-arbitrary-shapes} 
 
I would like to solve the Helmholtz equation with dirichlet boundary 
conditions in 2 dimensions for an arbitrary shape. (for a qualitative 
comparison of the eigenstates to periodic orbits in the  ... 
 
- asked by Julian S. (35 votes), answered by Mark McClure (30 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Find d'Alembertian in the output and convert into Einstein summation 
convention 
form]\url{http://mathematica.stackexchange.com/questions/65469/find-dalembe 
rtian-in-the-output-and-convert-into-einstein-summation-convention} 
 
I am trying to do field variations in Mathematica and would like some 
nice formatting. My output is in the form 
 
$ -\frac{1}{c^2}V^{(1,0,0,0)}[t,x,y,z] +  ... 
 
- asked by SlipStream (2 votes) 
 
---------------------------- 
 
[remote kernel through 
SSH]\url{http://mathematica.stackexchange.com/questions/65953/remote-kernel 
-through-ssh} 
 
Is it possible to setup connection to remote kernels through ssh? 
 
I'm able to SSH into the remote server(linux) and start a kernel in the 
terminal, but it can't connect back to my local front end. I  ... 
 
- asked by xslittlegrass (3 votes) 
 
---------------------------- 
 
[Understanding polyharmonic 
splines]\url{http://mathematica.stackexchange.com/questions/65763/understan 
ding-polyharmonic-splines} 
 
Raul Narain and J.M. gives implementation of the thin plate polyharmonic 
splines in this post. Raul Narian's method is clear. J.M.'s is 
convenient to reuse. But J.M. used too many  ... 
 
- asked by xibinke (1 vote)

7.8 Tuesday, November 11, 2014

 
================================== 
Top new questions this week: 
================================== 
 
[Exclude data from a 
list]\url{http://mathematica.stackexchange.com/questions/65246/exclude-data 
-from-a-list} 
 
Let's create some random sample data 
 
data = Table[{RandomReal[{-10, 10}], RandomReal[{-10, 10}]}, {i, 1, 
300}]; 
 
 
Then we plot them using ListPlot 
 
L0 = ListPlot[data, Frame -&gt; True, Axes -&gt;  ... 
 
- asked by Vaggelis_Z (13 votes), answered by kguler (15 votes) 
 
---------------------------- 
 
[How do I understand ListCorrelate(contains $\{k_L,k_R\}$) when it works 
for 2-dimentional 
data?]\url{http://mathematica.stackexchange.com/questions/64925/how-do-i-un 
derstand-listcorrelatecontains-k-l-k-r-when-it-works-for-2-di} 
 
Two months ago, I asked a question here 
 
And @nikie give me a solution: 
 
 
The intuitive way to understand ListCorrelate is that the kernel is 
"moved" to every position in the array, and the sum of  ... 
 
- asked by ShutaoTang (12 votes), answered by Simon Woods (11 votes) 
 
---------------------------- 
 
[Using 0 to create new columns in a list with 
Part]\url{http://mathematica.stackexchange.com/questions/65200/using-0-to-c 
reate-new-columns-in-a-list-with-part} 
 
I just discovered a nice way to create intermediary columns in a list, 
and I would like to know if I can have some problem with it. It Works 
like this: 
 
Imagine I have this list, 5x3: 
 
SeedRandom[0] 
... 
 
- asked by Murta (10 votes), answered by Mr.Wizard (12 votes) 
 
---------------------------- 
 
[Glitch in 
Filling?]\url{http://mathematica.stackexchange.com/questions/64988/glitch-i 
n-filling} 
 
I ran into a problem while plotting and I was able to narrow it to this. 
Before I start "spelunking" I'd like to know if I am overlooking 
something or if this is a problem others have worked through. 
... 
 
- asked by Mr.Wizard (9 votes), answered by ybeltukov (5 votes) 
 
---------------------------- 
 
[Multiple-colored regions on a Sphere in 
Mathematica]\url{http://mathematica.stackexchange.com/questions/65174/multi 
ple-colored-regions-on-a-sphere-in-mathematica} 
 
The problem: I would like to draw a sphere where the bottom half is one 
color, and the top half is split into 3 equal regions, each with its own 
color. 
 
I have come up with the following code, by  ... 
 
- asked by Nick Lassonde (8 votes), answered by Michael E2 (8 votes) 
 
---------------------------- 
 
[Is there a way to control V10's undo 
length?]\url{http://mathematica.stackexchange.com/questions/65055/is-there- 
a-way-to-control-v10s-undo-length} 
 
This may be a duplicate (if so I will remove this), but I was having 
trouble finding the relevant bit of documentation to fix it. I noticed 
that my FrontEnd memory use was growing out of control when  ... 
 
- asked by DumpsterDoofus (8 votes), answered by rm -rf (6 votes) 
 
---------------------------- 
 
[What is the best way to draw a shaded 
table?]\url{http://mathematica.stackexchange.com/questions/65356/what-is-th 
e-best-way-to-draw-a-shaded-table} 
 
I'm trying to format a raster-style table with row and column headings 
and in which each cell is shaded according to the value in the cell, and 
the value of the cell is displayed in as text in a  ... 
 
- asked by raxacoricofallapatorius (6 votes), answered by Arnoud Buzing 
(7 votes) 
 
 
================================== 
 
Greatest hits from previous weeks: 
================================== 
 
[Get a "step by step" evaluation in Mathematica] 
\url{http://mathematica.stackexchange.com/questions/148/get-a-s 
tep-by-step-evaluation-in-mathematica} 
 
Is it possible in Mathematica to get a step-by-step evaluation of some 
functions; that's to say, outputting not only the result but all the 
stages that have led to it? 
 
Example : Let's say I want to  ... 
 
- asked by Skydreamer (58 votes), answered by J.M. (50 votes) 
 
---------------------------- 
 
[Why round to even integers?] 
\url{http://mathematica.stackexchange.com/questions/2116/why-roun 
d-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  ... 
 
- asked by wxffles (26 votes), answered by Per Alexandersson (22 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Sizing elements correctly in a DistributionChart with custom 
ChartElementFunction]\url{http://mathematica.stackexchange.com/questions/65 
395/sizing-elements-correctly-in-a-distributionchart-with-custom-chartel 
ementfunctio} 
 
This is a follow-up question to Histogram scale error when using 
DistributionChart; Weird output of DistributionChart is also related. 
I'd like to make a DistributionChart where the elements are  ... 
 
- asked by Daniel Weissman (1 vote) 
 
---------------------------- 
 
[Capturing microphone 
data]\url{http://mathematica.stackexchange.com/questions/65276/capturing-mi 
crophone-data} 
 
How to capture current microphone data, just like using the function 
CurrentImage[] for capturing image? 
 
For example, this captures an image: 
 
Dynamic [x = CurrentImage []; EdgeDetect [x, 3]] 
 
 
But I  ... 
 
- asked by Dragan Mrakovic (3 votes) 
 
---------------------------- 
 
[How to download and combine S&P 500 stock 
prices]\url{http://mathematica.stackexchange.com/questions/65386/how-to-dow 
nload-and-combine-sp-500-stock-prices} 
 
I want to download historical S&amp;P 500 stock prices and combined them 
into one big file, having only one column of date referencing all 
stocks. Here is what I have do so far. 
 
stdate =  ... 
 
- asked by rka (5 votes)

7.9 Tuesday, November 4, 2014

================================== 
Top new questions this week: 
================================== 
 
[DumpsterDoofus's captivating generative 
art]\url{http://mathematica.stackexchange.com/questions/64492/dumpsterdoofu 
ss-captivating-generative-art} 
 
How can I render these beautiful images that DumpsterDoofus posted? 
 
- asked by Mr.Wizard (23 votes), answered by DumpsterDoofus (24 votes) 
 
---------------------------- 
 
[Is there an easy way to use Matteo Niccoli's perceptual color maps for 
2D plots in 
Mathematica?]\url{http://mathematica.stackexchange.com/questions/64513/is-t 
here-an-easy-way-to-use-matteo-niccolis-perceptual-color-maps-for-2d-plo 
ts} 
 
I have been using the ubiquitous Jet color palette for 2D plots for some 
time now, and don't really care for it.  Then I came across the series 
of blog posts, The rainbow is dead...long live the  ... 
 
- asked by Jason B (22 votes), answered by Jason B (20 votes) 
 
---------------------------- 
 
[How to wrap a plot around a 
circle?]\url{http://mathematica.stackexchange.com/questions/64534/how-to-wr 
ap-a-plot-around-a-circle} 
 
Consider the code 
 
a = Table[BesselJ[i, x], {i, 0, 3}] 
Plot[a, {x, 0, 20}, Axes -&gt; False] 
 
 
producing 
 
 
 
I'd like to transform the plot into a circle. In other words, I'd like 
to wrap the plot  ... 
 
- asked by Sigur (14 votes), answered by Junho Lee (15 votes) 
 
---------------------------- 
 
[Which Mathematica function has the longest name (by character 
length?)]\url{http://mathematica.stackexchange.com/questions/64718/which-ma 
thematica-function-has-the-longest-name-by-character-length} 
 
I came across DamerauLevenshteinDistance[u,v] in the documentation 
center so that got me thinking: 
 
Which documented Mathematica function has the longest name? 
 
Also, is there is a limit to the length  ... 
 
- asked by QuantumDot (11 votes), answered by Artes (18 votes) 
 
---------------------------- 
 
[Phase portrait on a 
cylinder]\url{http://mathematica.stackexchange.com/questions/64407/phase-po 
rtrait-on-a-cylinder} 
 
It is very nice and very easy to make a sketch of a phase portrait with 
StreamPlot. For example, for the classical pendulum, defined by 
$$ 
\dot x=y,\\ 
\dot y=-\sin x, 
$$ 
The code 
 
StreamPlot[{y,  ... 
 
- asked by Artem (10 votes), answered by Kuba (12 votes) 
 
---------------------------- 
 
[Why does the documentation call functions 
"pure"?]\url{http://mathematica.stackexchange.com/questions/64577/why-does- 
the-documentation-call-functions-pure} 
 
Clearly, functions in mathematica are not pure functions according to 
the definition on Wikipedia (no side effects - basically implementabe 
with table lookups): 
 
x = 4; 
y = 1; 
a = Function[y = 0; x +  ... 
 
- asked by masterxilo (9 votes), answered by WReach (7 votes) 
 
---------------------------- 
 
[Rasterize: Resolution option not working 
properly]\url{http://mathematica.stackexchange.com/questions/64758/rasteriz 
e-resolution-option-not-working-properly} 
 
Something about Rasterize which doesn't seem to work as intended. 
 
Recipe: 
 
 
Make some simple vector graphics: 
 
Test = Graphics[Circle[{0, 0} 1]] 
 
Try to rasterize it having defined ImageSize and  ... 
 
- asked by Alexey Bobrick (8 votes), answered by Alexey Popkov (5 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[How can I draw the Olympic rings with 
Mathematica?]\url{http://mathematica.stackexchange.com/questions/8885/how-c 
an-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 (33 votes), answered by cormullion (15 
votes) 
 
---------------------------- 
 
[Why round to even 
integers?]\url{http://mathematica.stackexchange.com/questions/2116/why-roun 
d-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  ... 
 
- asked by wxffles (26 votes), answered by Per Alexandersson (22 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Dependent probabilities 
distributions?]\url{http://mathematica.stackexchange.com/questions/64719/de 
pendent-probabilities-distributions} 
 
What's the best way to model situations with dependencies--I pick a 
world state, then pick a distribution to draw samples from based on that 
state. Here's a concrete version: 
 
 
If I choose a 6-sided  ... 
 
- asked by Victor Shnayder (1 vote) 
 
---------------------------- 
 
[How to get data from DB into dataset with 
keys]\url{http://mathematica.stackexchange.com/questions/64391/how-to-get-d 
ata-from-db-into-dataset-with-keys} 
 
I'm a Mathematica newbie and I have the following problem: I connect to 
a Oracle DB and read out a set of variables, further on I want to 
histogram some of the variables. A Dataset seems to be the  ... 
 
- asked by Lea (4 votes) 
 
---------------------------- 
 
[Max iterations in K-means clustering 
algorithm]\url{http://mathematica.stackexchange.com/questions/64343/max-ite 
rations-in-k-means-clustering-algorithm} 
 
I want to use k-means for clustering. I have used the 
ClusteringComponents function but I said how can I control the 
max-iteration for k-means ? 
 
 
- asked by Developer2000 (2 votes) 

7.10 Tuesday, October 28, 2014

================================== 
Top new questions this week: 
================================== 
 
[Why do big-O terms disappear in definite integrals since Mathematica 
9?]\url{http://mathematica.stackexchange.com/questions/64318/why-do-big-o-t 
erms-disappear-in-definite-integrals-since-mathematica-9} 
 
In Mathematica 8, when I computed the following input: 
 
Integrate[Series[Cos[x], {x, 0, 2}], {x, 0, a}] 
 
 
Mathematica returned an expression that had a O[a^4] in it. (In other 
words, the result had  ... 
 
- asked by Martin J.H. (4 votes) 
 
---------------------------- 
 
[How to track Part of Symbol or How to symbolize Parts of Symbol without 
copying 
data]\url{http://mathematica.stackexchange.com/questions/64312/how-to-track 
-part-of-symbol-or-how-to-symbolize-parts-of-symbol-without-copying} 
 
Let's create simple function: 
 
SetAttributes[h, HoldFirst]; 
h[data_] := Dynamic[Grid[data], TrackedSymbols :&gt; {data}] 
 
test = RandomReal[1, {2, 2}]; 
h[test] 
 
 
Now you can evaluate somewhere else: 
 
... 
 
- asked by Kuba (1 vote) 
 
---------------------------- 
 
[Unimportant change in 
Dynamic]\url{http://mathematica.stackexchange.com/questions/64310/unimporta 
nt-change-in-dynamic} 
 
I just observed an unimportant change in version 10 with respect to 
Dynamic. 
 
The command 
 
x=0; Dynamic[x=x+1] 
 
 
returns a cell showing an infinite loop for the value of x. 
 
Before Mathematica 10,  ... 
 
- asked by Fred Simons (2 votes) 
 
---------------------------- 
 
[Classify Function : Sentiment 
Polarity]\url{http://mathematica.stackexchange.com/questions/64306/classify 
-function-sentiment-polarity} 
 
I have been working on a project involving the new Classify[] function. 
More specifically, the sentiment analysis function. 
It works perfectly well, as in the documentation: 
 
Classify["Sentiment", {  ... 
 
- asked by afentis (1 vote), answered by rcollyer (0 votes) 
 
---------------------------- 
 
[User defined functions and decimal places 
displayed]\url{http://mathematica.stackexchange.com/questions/64284/user-de 
fined-functions-and-decimal-places-displayed} 
 
I have a couple of complicated user-defined functions, one which calls 
the other, and I wish to control the number of decimal places displayed 
when I call the "mother" function. I have tried the  ... 
 
- asked by Freakalien (1 vote), answered by Mr.Wizard (1 vote) 
 
---------------------------- 
 
[aligning the axeslabel in a 3D list 
plot]\url{http://mathematica.stackexchange.com/questions/64280/aligning-the 
-axeslabel-in-a-3d-list-plot} 
 
I have the following code 
 
plot = ListPlot3D[mydata5, DataRange -&gt; {{0, 6}, {0, 6}}, 
PerformanceGoal -&gt; "Quality", BoxRatios -&gt; {1, 1, .7}, AxesLabel 
-&gt; {Style[Subscript[t, l], FontSize  ... 
 
- asked by Seyhmus Gungoren (1 vote), answered by xzczd (1 vote) 
 
---------------------------- 
 
[Solving system of differential equations using 
loops]\url{http://mathematica.stackexchange.com/questions/64278/solving-sys 
tem-of-differential-equations-using-loops} 
 
I have $F$ system of differential equations. Out of those $F$ equations 
except for first and last I have general form for the remaining 
equations (say $ dP_{i}/dt)$. 
Let $dP_0/dt,dP_F/dt$  denotes the  ... 
 
- asked by user1659936 (1 vote), answered by Michael E2 (1 vote) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Implementing efficient multiple 
undo]\url{http://mathematica.stackexchange.com/questions/1953/implementing- 
efficient-multiple-undo} 
 
At the time this question was asked, version 10 was not out yet. The 
Front End of Mathematica 10 does have multiple undo, see the answer by 
John Fultz. 
 
The Mathematica Front End's built-in Undo  ... 
 
- asked by Rojo (111 votes), answered by John Fultz (34 votes) 
 
---------------------------- 
 
[Programming paradigm 
change]\url{http://mathematica.stackexchange.com/questions/45829/programmin 
g-paradigm-change} 
 
I'm new to Mathematica, I've been learning by myself, and, being a Java 
developer for some time, it makes it hard to adapt. 
 
I've tried to solve a Reddit challenge, and I came up with this 
solution: 
 
... 
 
- asked by MHero (29 votes), answered by WReach (49 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[FindSequenceFunction for sum of hypergeometric 
terms]\url{http://mathematica.stackexchange.com/questions/64168/findsequenc 
efunction-for-sum-of-hypergeometric-terms} 
 
Mathematica's built-in function FindSequenceFunction is quite good at 
recognizing hypergeometric terms, i.e. terms $c_k$ for which 
$c_{k+1}/c_k$ is a rational function of $k$. 
 
For instance. 
 
... 
 
- asked by Eckhard (4 votes) 
 
---------------------------- 
 
[Finding the minimum vertex cut of a 
graph]\url{http://mathematica.stackexchange.com/questions/63783/finding-the-minimum-vertex-cut-of-a-graph} 
 
It seems that Mathematica is not correctly finding the smallest set of 
vertices that will disconnect a graph. Here is an example: 
 
g = GraphData[{"Cycle", 5}] 
FindVertexCut[g]; 
HighlightGraph[g, %] 
... 
 
- asked by Lonely Mathematician (3 votes) 
 
---------------------------- 
 
[NMaximize gives wrong answer when using high 
precision] 
\url{http://mathematica.stackexchange.com/questions/64256/nmaximize-gives-wrong-answer-when-using-high-precision} 
 
I'm using NMaximize to find the maximum of a function under constrain, 
but it seems to gives wrong answer when using high precisions. 
 
f[t_, t1_] := (Cos[2 Pi t] - Cos[2 Pi t1] + 2 Pi (t - t1) Sin[2 Pi  ... 
 
- asked by xslittlegrass (1 vote) 

7.11 Tuesday, October 21, 2014

================================== 
Top new questions this week: 
================================== 
 
[Total much slower in version 
10]\url{http://mathematica.stackexchange.com/questions/63209/total-much-slo 
wer-in-version-10} 
 
Compilation nowadays may give very fast functions. Here is an example 
for finding the sum of a list of machine numbers, just as the built-in 
function Total: 
 
myTotal =   Compile[{{lst, _Real, 1}}, 
... 
 
- asked by Fred Simons (15 votes), answered by Karsten 7. (5 votes) 
 
---------------------------- 
 
[Drawing the schematic diagram of 
algorithm]\url{http://mathematica.stackexchange.com/questions/63471/drawing 
-the-schematic-diagram-of-algorithm} 
 
The B-Spline function used the alogrithm as shown below: 
 
 
 
 
 
I would like to draw it in Mathematica (Although this is my first time 
to use TreePlot) 
 
TreePlot[ 
{1 -&gt; 2, 1 -&gt; 3, 2 -&gt; 4,  ... 
 
- asked by ShutaoTang (14 votes), answered by kguler (9 votes) 
 
---------------------------- 
 
[How can I evaluate only a single step of a recursive 
function?]\url{http://mathematica.stackexchange.com/questions/63256/how-can 
-i-evaluate-only-a-single-step-of-a-recursive-function} 
 
Let's say have a simple recursive function for the Fibonacci sequence 
 
f[0] := 1 
f[1] := 1 
f[n_] := f[n - 1] + f[n - 2] 
 
 
but I want to see how it will expand in a given number of steps, but not 
all  ... 
 
- asked by Jakub Arnold (12 votes), answered by Daniel Lichtblau (16 
votes) 
 
---------------------------- 
 
[How to build a 3D graph from a 3D 
matrix?]\url{http://mathematica.stackexchange.com/questions/63428/how-to-bu 
ild-a-3d-graph-from-a-3d-matrix} 
 
Following this 
and that question 
and the corresponding answers, Mathematica can build 2D graph from 2D 
matrices. 
 
 
 
Question 
 
 
How to make the corresponding 3D graphs from 3D cubes? 
 
 
Attempt 
 
... 
 
- asked by chris (11 votes), answered by kguler (5 votes) 
 
---------------------------- 
 
[Listable functions thread over Associations; is this 
documented?]\url{http://mathematica.stackexchange.com/questions/63293/lista 
ble-functions-thread-over-associations-is-this-documented} 
 
Thanks to a somewhat misapplied use of MapThread I learned of this 
behavior: 
 
&lt;|a -&gt; 1, b -&gt; 2|&gt; + &lt;|a -&gt; 5, b -&gt; 6|&gt; 
 
 
 
&lt;|a -&gt; 6, b -&gt; 8|&gt; 
 
 
 
Furthermore this  ... 
 
- asked by Mr.Wizard (10 votes), answered by m_goldberg (3 votes) 
 
---------------------------- 
 
[Bug(?) in version 10: Tooltip and 
ListPointPlot3D]\url{http://mathematica.stackexchange.com/questions/63667/b 
ug-in-version-10-tooltip-and-listpointplot3d} 
 
Bug introduced in 10.0.0 
 
 
 
The coordinates of a point in a three dimensional graph can be shown in 
a tooltip: 
 
ListPointPlot3D[Tooltip[RandomReal[{0, 1}, {50, 3}]], PlotStyle -&gt; 
{PointSize[.02]}] 
 
... 
 
- asked by Fred Simons (9 votes) 
 
---------------------------- 
 
[How to align rotated BarChart 
labels?]\url{http://mathematica.stackexchange.com/questions/63263/how-to-al 
ign-rotated-barchart-labels} 
 
I'd like to use long text labels for a simple BarChart, but when I apply 
a rotation to label strings with different lengths the end of the text 
is no longer aligned with the bars in the chart: 
 
... 
 
- asked by dionys (9 votes), answered by Brett Champion (10 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[How to make use of 
Associations?]\url{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 (53 votes), answered by Leonid Shifrin (54 votes) 
 
---------------------------- 
 
[Programming paradigm 
change]\url{http://mathematica.stackexchange.com/questions/45829/programmin 
g-paradigm-change} 
 
I'm new to Mathematica, I've been learning by myself, and, being a Java 
developer for some time, it makes it hard to adapt. 
 
I've tried to solve a Reddit challenge, and I came up with this 
solution: 
 
... 
 
- asked by MHero (28 votes), answered by WReach (48 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Visualise sets giving some relations on those 
sets]\url{http://mathematica.stackexchange.com/questions/63391/visualise-se 
ts-giving-some-relations-on-those-sets} 
 
I'm not very experienced with wolfram, but I'm searching for a function 
that can basicly do the following. 
 
Giving some sets $A,B,C$ and some relations for example $B \subset 
A$,$C\subset B$. I would  ... 
 
- asked by Kasper (1 vote) 
 
---------------------------- 
 
[StyleSheet for custom 
application]\url{http://mathematica.stackexchange.com/questions/63313/style 
sheet-for-custom-application} 
 
I'm working on a package that for some reasons needs to be installed 
into a "non standard" path, that means neither $BaseDirectory or 
$UserBaseDirectory 
I added the package's path to the variable   ... 
 
- asked by bobknight (1 vote) 
 
---------------------------- 
 
[ListContourPlot in 
V10]\url{http://mathematica.stackexchange.com/questions/63653/listcontourpl 
ot-in-v10} 
 
It seems that I obtain different results when using ListContourPlot 
under V9 and V10. 
 
Using this datafile http://pastebin.com/2p4ew0NJ (modified to use 
pastebin), this code: 
 
ListContourPlot[cm,  ... 
 
- asked by alessandro (1 vote)

7.12 Tuesday, October 14, 2014

================================== 
Top new questions this week: 
================================== 
 
[Assign a randomly generated list to 
variable]\url{http://mathematica.stackexchange.com/questions/62921/assign-a 
-randomly-generated-list-to-variable} 
 
I don't know if this is a silly question, but it really baffles me. So 
please help me understand this behavior. 
 
list=RandomInteger[100,100] 
 
 
I interpret the (silly) code above as randomly generating  ... 
 
- asked by Naitree (19 votes), answered by rhermans (5 votes) 
 
---------------------------- 
 
[Dataset seems unable to handle ListDensityPlot and 
ListContourPlot]\url{http://mathematica.stackexchange.com/questions/61572/d 
ataset-seems-unable-to-handle-listdensityplot-and-listcontourplot} 
 
If I create a Dataset: 
 
dataSet = Dataset[ 
AssociationThread[{"a", "b", "c", "d", "e"} -&gt; #] &amp; /@ 
RandomReal[{-1, 1}, {1000, 5}] 
]; 
 
 
It should be easy to use a plotting function on it 
 
... 
 
- asked by gpap (15 votes), answered by RunnyKine (14 votes) 
 
---------------------------- 
 
[Make my data-structure 
atomic]\url{http://mathematica.stackexchange.com/questions/61587/make-my-da 
ta-structure-atomic} 
 
Lately, and by lately I mean since version 7 or so, the number of atomic 
expressions in Mathematica constantly grew. In former times only the 
native types like integers and optimised arrays were  ... 
 
- asked by halirutan (14 votes), answered by Leonid Shifrin (10 votes) 
 
---------------------------- 
 
[Applying different functions to different columns of a 
Dataset]\url{http://mathematica.stackexchange.com/questions/61710/applying- 
different-functions-to-different-columns-of-a-dataset} 
 
Suppose I have different functions: Total, Mean and Max and the 
following Dataset 
 
SeedRandom[0] 
dataSet = Dataset[AssociationThread[{"a", "b", "c", "d"} -&gt; #] &amp; 
/@ RandomReal[4, {10, 4}]] 
 
 
 
 
... 
 
- asked by smayhem (13 votes), answered by RunnyKine (9 votes) 
 
---------------------------- 
 
[Sorting Lists of lists of arbitrary 
length]\url{http://mathematica.stackexchange.com/questions/61560/sorting-li 
sts-of-lists-of-arbitrary-length} 
 
I'm trying to sort a list of lists.  The sublists are defined in length, 
but the length of the list containing it varies. 
 
A simplified set might be: 
 
{{1, 2, 3}, {7, 1, 4}, {3, 5, 6}, {10, 7, 1}} 
 
 
... 
 
- asked by Rick R (10 votes), answered by RunnyKine (11 votes) 
 
---------------------------- 
 
[Best way to find permutation with specific 
total]\url{http://mathematica.stackexchange.com/questions/62956/best-way-to 
-find-permutation-with-specific-total} 
 
Can anyone suggest a good way to find permutations of 12 digits, 0 to 4, 
totalling 24. 
 
I.e. two such permutations:- 
 
{2, 1, 4, 1, 2, 2, 2, 2, 2, 2, 1, 3} // Total 
 
 
 
24 
 
 
{4, 4, 4, 4, 4, 4, 0, 0,  ... 
 
- asked by Chris Degnen (9 votes), answered by thils (6 votes) 
 
---------------------------- 
 
[Segmentation of a microscopy image with uneven 
illumination]\url{http://mathematica.stackexchange.com/questions/62976/segm 
entation-of-a-microscopy-image-with-uneven-illumination} 
 
I am trying to do a little image segmentation on some cells taken from 
microscopy images that have uneven illumination.  I am having trouble 
getting the background of the image cleaned up after  ... 
 
- asked by user13999 (9 votes), answered by bobthechemist (4 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Alternatives to procedural loops and iterating over lists in 
Mathematica]\url{http://mathematica.stackexchange.com/questions/7924/altern 
atives-to-procedural-loops-and-iterating-over-lists-in-mathematica} 
 
While there are some cases where a For loop might be reasonable, it's a 
general mantra  one I subscribe to myself  that "if you are using a 
For loop in Mathematica, you are probably doing it wrong".  ... 
 
- asked by Mr.Wizard (91 votes), answered by Mr.Wizard (59 votes) 
 
---------------------------- 
 
[How to make use of 
Associations?]\url{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 (53 votes), answered by Leonid Shifrin (54 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Error messages from TensorContract and 
TensorReduce]\url{http://mathematica.stackexchange.com/questions/61719/erro 
r-messages-from-tensorcontract-and-tensorreduce} 
 
I am struggling with a few errors when using symbolic tensors. 
I am using mathematica 9.0.1.0, linux x86. 
 
The following code generates what seems to me an incorrect tensor, this 
is the smallest  ... 
 
- asked by Artur Gower (4 votes) 
 
---------------------------- 
 
[Oddify an even function and vice 
versa?]\url{http://mathematica.stackexchange.com/questions/62957/oddify-an- 
even-function-and-vice-versa} 
 
I want to know how to construct a function in Mathematica which would 
produce even analog of odd function and vice versa in closed form? 
 
The mathematical definitions are as follows: 
 
... 
 
- asked by Anixx (2 votes) 
 
---------------------------- 
 
[Create SQL Database on a manually specified 
directory]\url{http://mathematica.stackexchange.com/questions/61568/create- 
sql-database-on-a-manually-specified-directory} 
 
I am inserting lots of data into the preinstalled SQL Database in MM: 
 
con= OpenSQLConnection["demo"] > SQLCreateTable[con, 
SQLTable["anyname"], SQLcolums] > ... 
 
I am running out of disk space on my  ... 
 
- asked by Patrick Bernhard (2 votes) 

7.13 Tuesday, October 7, 2014

================================== 
Top new questions this week: 
================================== 
 
[Visualisation of a recursive 
function]\url{http://mathematica.stackexchange.com/questions/61323/visualis 
ation-of-a-recursive-function} 
 
Is there a way to nicely visualize recursive functions? (diagrams/plots) 
 
More specifically I'm looking for a way to make contrast (visually) 
between e.g. the cosine function which if continuously  ... 
 
- asked by Phonon (16 votes), answered by ybeltukov (23 votes) 
 
---------------------------- 
 
[Using an Image as the Fill/Texture (not background) of a Plot (not 
polygon)]\url{http://mathematica.stackexchange.com/questions/61341/using-an 
-image-as-the-fill-texture-not-background-of-a-plot-not-polygon} 
 
Is it possible to use an image, rather than a color, or ColorFunction, 
as the filling for a plot? 
 
For instance, I want to make a plot using DateListPlot, and have set 
Filling-&gt;Axis, and would like  ... 
 
- asked by iwantmyphd (11 votes), answered by Jens (4 votes) 
 
---------------------------- 
 
[Intelligently formatting 
PDFs]\url{http://mathematica.stackexchange.com/questions/61209/intelligentl 
y-formatting-pdfs} 
 
I'm exporting a Grid[] to a PDF. It's working, but it's real ugly. Here 
is an example of what it looks like: 
 
 
 
Possibly the first problem is the reason I posted a picture of (rather 
than sharing) the  ... 
 
- asked by F dot Floss (11 votes), answered by Lou (5 votes) 
 
---------------------------- 
 
[How to show matrix multiplication step by 
step?]\url{http://mathematica.stackexchange.com/questions/61377/how-to-show 
-matrix-multiplication-step-by-step} 
 
Given a matrix, A: 
 
A = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; 
 
 
How can I do the matrix multiplication A times A step by step? 
 
 
- asked by Mats Granvik (8 votes), answered by ybeltukov (22 votes) 
 
---------------------------- 
 
[How to deal with recursion formula in 
Mathematica?]\url{http://mathematica.stackexchange.com/questions/61050/how- 
to-deal-with-recursion-formula-in-mathematica} 
 
In engineering problems, I am always seeing many recursion formula. 
 
For instance, In the book "The NURBS book", I discovered many recursion 
formula 
 
 
Fibonacci $$f(n+2)=f(n+1)+f(n)$$ 
deCasteljau  ... 
 
- asked by Tangshutao (8 votes), answered by Igor Rivin (6 votes) 
 
---------------------------- 
 
[Is there a way to revert to the built-in function after overwritting it 
using 
Unprotect]\url{http://mathematica.stackexchange.com/questions/61472/is-ther 
e-a-way-to-revert-to-the-built-in-function-after-overwritting-it-using-u 
n} 
 
When using Unprotect, we can overwrite a functions definition: 
 
Unprotect[Sqrt] 
Sqrt[x_]="blahblah" 
Protect[Sqrt] 
 
 
Once this is done, can we revert to the built-in version of Sqrt? 
 
 
- asked by user13675 (7 votes), answered by eldo (8 votes) 
 
---------------------------- 
 
[Why PlotStyle->Dashed make everything 
dashed?]\url{http://mathematica.stackexchange.com/questions/61058/why-plots 
tyle-dashed-make-everything-dashed} 
 
Bug introduced in 10.0.0 -- appears to affect Linux only. 
 
 
 
It has been really strange for me. I am not sure it's regression after 
v10.0.1, or something went wrong with my system. After running this  ... 
 
- asked by Yi Wang (7 votes), answered by Neven Caplar (2 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Are you interested in purchasing David Wagner's "Power programming with 
Mathematica"?]\url{http://mathematica.stackexchange.com/questions/16485/are 
-you-interested-in-purchasing-david-wagners-power-programming-with-mathe 
mat} 
 
I recently contacted McGraw-Hill to see if they have a mechanism in 
place for printing out-of-print books that are still of interest. 
Specifically, I asked about "Power programming with Mathematica"  ... 
 
- asked by Todd Allen (109 votes), answered by Todd Allen (159 votes) 
 
---------------------------- 
 
[How should I reproduce this colorful swirling 
gif?]\url{http://mathematica.stackexchange.com/questions/47597/how-should-i 
-reproduce-this-colorful-swirling-gif} 
 
Surfing on the web, I came upon this cool gif: 
 
 
 
Does any one know how to reproduce this in Mathematica? I have some 
ideas myself, so I will try to answer this question as well. 
 
 
- asked by Ali (10 votes), answered by Kuba (23 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[How to update bundled SQLite library (or driver?) in V10 for OS 
X]\url{http://mathematica.stackexchange.com/questions/61116/how-to-update-b 
undled-sqlite-library-or-driver-in-v10-for-os-x} 
 
I've been using undocumented Database functions with Mathematica V9 to 
acces my SQLite database, which is a Firefox-generated database that 
contains cookies. 
 
db = Database`OpenDatabase[ 
... 
 
- asked by shrx (3 votes) 
 
---------------------------- 
 
[Is it possible to implement symbolic sub 
matrices?]\url{http://mathematica.stackexchange.com/questions/61442/is-it-p 
ossible-to-implement-symbolic-sub-matrices} 
 
The accepted answer in the following link: 
 
http://stackoverflow.com/questions/5708208/symbolic-matrices-in-mathemat 
ica-with-unknown-dimensions 
 
provides a functionality to create symbolic matrices  ... 
 
- asked by Kagaratsch (1 vote) 
 
---------------------------- 
 
[Format Mathematica complex number for fortran code 
use]\url{http://mathematica.stackexchange.com/questions/61432/format-mathem 
atica-complex-number-for-fortran-code-use} 
 
I'm using Mathematica 10. I am trying to write into a file complex 
number output to then be read by a Fortran code. 
 
But when I do : 
 
Print[comp, "  ", FortranForm[comp]] 
 
 
I get this : 
 
 
... 
 
- asked by berhan (1 vote)

7.14 Tuesday, September 30, 2014

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

[Join lists with nested list] http://mathematica.stackexchange.com/questions/60666/join-lists-with-nested-list

Is there a way of smarter way of joining list of the form

l1 = a,b,c; l2 = d,e,f; l3 = g,h,i;

To obtain

a,d,g,b,c,e,f,h,i

The code I have is

{Sequence @@ #1, Flatten[#2]}  ...

- asked by mete (14 votes), answered by Junho Lee (9 votes)

—————————-

[Different results between V9 and V10 when using Style with Listplot]http://mathematica.stackexchange.com/questions/60929/different-results-between-v9-and-v10-when-using-style-with-listplot

Consider this example:

data = Table[{x, x^2}, {x, -2, 2, 0.1}]; 
ListPlot[Style[{#1, #2}, PointSize[Abs[#2]/50], Hue[#2]] &amp; @@@ data]

the results from V9 and V10 are as follows:

V9

V10

It ...

- asked by Algohi (13 votes), answered by Brett Champion (7 votes)

—————————-

[Bug in Operator Form of StringCases]http://mathematica.stackexchange.com/questions/60871/bug-in-operator-form-of-stringcases

According to the documentation there’s an operator form for StringCases

?StringCases

Here is the normal form

StringCases["abcadcacb", "a" ~~ x_ ~~ "c"] 
 
 
 
{"abc", "adc"}

Now, the operator ...

- asked by RunnyKine (12 votes), answered by WReach (8 votes)

—————————-

[Around the Clock]http://mathematica.stackexchange.com/questions/60728/around-the-clock

I want to produce with Mathematica something like this

Or this

12 hours should be arranged in a pleasing ("rotated") style around / within a rectangle. I don’t ask for the hands - depending on ...

- asked by eldo (12 votes), answered by belisarius (15 votes)

—————————-

[How to assign a list of numbers into letter grades]http://mathematica.stackexchange.com/questions/60497/how-to-assign-a-list-of-numbers-into-letter-grades

Here is my list:

collection = 76.6256, 51.9264, 50.238, 14.4203, 80.9205, 12.2036, 2.39568, 38.2747, 12.4422, 29.9621

collection /. {x_ /; x &lt; 50 -&gt; "F"}

and this gives me

...

- asked by Lonely Mathematician (12 votes), answered by belisarius (14 votes)

—————————-

[Joining ordered set of points with splines in spiral]http://mathematica.stackexchange.com/questions/60619/joining-ordered-set-of-points-with-splines-in-spiral

I have a collection of points

-0.137445, -0.0103507, -0.0452845, 0.0343154, 0.30498, -0.0118266, -0.0224633, 0.0197979, -0.168469, -0.0197066, 0.0973217, 0.0478612, -0.0441388, ...

- asked by martin (11 votes), answered by Rahul Narain (11 votes)

—————————-

[Fitting ellipse to 5 given points on the plane]http://mathematica.stackexchange.com/questions/60779/fitting-ellipse-to-5-given-points-on-the-plane

Five points are required to define a unique ellipse. An ellipse has five degrees of freedom: the \(x\) and \(y\) coordinates of each focus, and the sum of the distance from each focus to a point on the ...

- asked by user153012 (11 votes), answered by Mark McClure (21 votes)

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

[Efficient way to build a certain quadratic matrix]http://mathematica.stackexchange.com/questions/51798/efficient-way-to-build-a-certain-quadratic-matrix

For odd n I’m looking for a short and swift way to construct with (f.e.)

n = 3

n = 11

n=1111

- asked by eldo (15 votes), answered by RunnyKine (15 votes)

—————————-

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

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

A path ...

- asked by mrm (11 votes), answered by trybik (10 votes)

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

[Weird glitch again!]http://mathematica.stackexchange.com/questions/60623/weird-glitch-again

I have been struggling with these glitches for two days...

A related question I asked is here How to eliminate the white gaps in the graph

Here is the code,

Show[Plot[Sin[x], x, -2 Pi, 2 Pi, ...

- asked by Tony (2 votes)

—————————-

[How to solve a PDE with Robin Boundary Condition inside considered region?]http://mathematica.stackexchange.com/questions/60890/how-to-solve-a-pde-with-robin-boundary-condition-inside-considered-region

I’m trying to solve the heat diffusion equation in cylindrical coordinates. The main problem is that I would like to include the Robin Boundary Condition inside considered region in order to simulate ...

- asked by Jerry (1 vote)

—————————-

[FITS metadata problem]http://mathematica.stackexchange.com/questions/60639/fits-metadata-problem

Looks to me that the FITS Export is borged. Here is the problem:

When I export out images with accustom metadata into a FITS file, Mathematica truncates and overwrites it.

Here is the metadata I ...

- asked by infocean (1 vote)

7.15 Tuesday, September 23, 2014

================================== 
Top new questions this week: 
================================== 
 
[Maple vs. 
Mathematica]\url{http://mathematica.stackexchange.com/questions/60124/maple 
-vs-mathematica} 
 
I am reading the document "How Maple Compares to Mathematica" found at 
http://www.maplesoft.com/products/maple/compare/HowMapleComparestoMathem 
atica.pdf. 
 
On page 15 there is an example where  ... 
 
- asked by Milenko Rubin-Zuzic (16 votes), answered by Mr.Wizard (22 
votes) 
 
---------------------------- 
 
[StringCases is Confused with Patterns in Version 
10.0.1]\url{http://mathematica.stackexchange.com/questions/60156/stringcase 
s-is-confused-with-patterns-in-version-10-0-1} 
 
I observed the following with StringCases when trying to use 
rules/patterns. Here is a screenshot of the behavior: 
 
 
 
Not only is the pattern highlighted in red, hovering the mouse over it 
claims it's  ... 
 
- asked by RunnyKine (14 votes) 
 
---------------------------- 
 
[How can I restore the old `ImageCompose` 
behaviour?]\url{http://mathematica.stackexchange.com/questions/60048/how-ca 
n-i-restore-the-old-imagecompose-behaviour} 
 
Prior to version 10, if ImageCompose was used to overlay a partially 
transparent image region over a completely transparent image region, the 
result would keep the colour of the overlay. Like this: 
 
 
 
... 
 
- asked by Simon Woods (13 votes), answered by Karsten 7. (3 votes) 
 
---------------------------- 
 
[Better way to test that a matrix is 
upper-triangular?]\url{http://mathematica.stackexchange.com/questions/60081 
/better-way-to-test-that-a-matrix-is-upper-triangular} 
 
Today, I got to thinking about how to test that a matrix was 
upper-triangular. So I had a try at it. 
 
Algorithm 
 
$\quad \quad a_{ij}=0 $  Or  $i \leq j$  $\Rightarrow$  $True$ 
 
My solution is 
 
... 
 
- asked by Tangshutao (13 votes), answered by Mr.Wizard (9 votes) 
 
---------------------------- 
 
[How to get Company Logo or 
Image]\url{http://mathematica.stackexchange.com/questions/60041/how-to-get- 
company-logo-or-image} 
 
I can see that companies have a logo in Wolfram|Alpha when I type in 
their name but I can't get them in Mathematica. 
 
For example searching for Apple, Inc. in W|A one of the outputs is the 
Apple logo.  ... 
 
- asked by Edmund (12 votes), answered by eldo (15 votes) 
 
---------------------------- 
 
[How to make a 3D topographic 
globe?]\url{http://mathematica.stackexchange.com/questions/60427/how-to-mak 
e-a-3d-topographic-globe} 
 
I've made some attempt with this dataset of elevation. 
 
But I have some trouble with ListSurfacePlot3D, which can not show the 
globe correctly: 
 
 
And I've checked that the data is out of problem,  ... 
 
- asked by RexDiego (11 votes), answered by bobthechemist (10 votes) 
 
---------------------------- 
 
[Is there a better way to "grow" black 
tulips?]\url{http://mathematica.stackexchange.com/questions/59905/is-there- 
a-better-way-to-grow-black-tulips} 
 
I used the following clumsy way to obtain a bundle of black tulips. Is 
there a better way to do so? 
 
im = Import["http://i.stack.imgur.com/qclHT.jpg"] 
 
cols = DominantColors[im, 9] 
rim1 =  ... 
 
- asked by Putterboy (11 votes), answered by ybeltukov (17 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Can Mathematica do symbolic linear 
algebra?]\url{http://mathematica.stackexchange.com/questions/3242/can-mathe 
matica-do-symbolic-linear-algebra} 
 
For instance, is there some way I can say "let A and B be arbitrary real 
$m\times n$ and $k\times m$ matrices, 
Simplify[Transpose[Transpose[A].Transpose[B]]]" and Mathematica would 
simplify it to B.A? 
... 
 
- asked by nikie (24 votes), answered by helen (12 votes) 
 
---------------------------- 
 
[Why round to even 
integers?]\url{http://mathematica.stackexchange.com/questions/2116/why-roun 
d-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  ... 
 
- asked by wxffles (26 votes), answered by Per Alexandersson (22 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Solving a system of two nonlinear equations with many symbolic 
parameters]\url{http://mathematica.stackexchange.com/questions/59930/solvin 
g-a-system-of-two-nonlinear-equations-with-many-symbolic-parameters} 
 
I have two nonlinear equations with two unknowns, $x$ and $y$, and many 
symbolic parameters, $a, b, c, d$. They look someting like: 
 
$\frac{1}{x}(1+x)^a (1-b)(cx+dy)=0$ 
 
... 
 
- asked by jim (2 votes) 
 
---------------------------- 
 
[Example in Help File does not evaluate as 
claimed]\url{http://mathematica.stackexchange.com/questions/60281/example-i 
n-help-file-does-not-evaluate-as-claimed} 
 
In the help file, under BellB, I read at 'Properties and Relations': 
"Sum can give results involving BellB ": 
 
Sum[k^n/k!, {k, 0, Infinity}] 
E BellB[n] 
 
 
but, in my version 10.0.1.0 it does not  ... 
 
- asked by Wouter (2 votes) 
 
---------------------------- 
 
[How to get the centroids of the ClusterComponents 
function]\url{http://mathematica.stackexchange.com/questions/60301/how-to-g 
et-the-centroids-of-the-clustercomponents-function} 
 
I use the ClusterComponent function to get the k-means clustering: 
 
Needs["HierarchicalClustering`"] 
cl = ClusteringComponents[data, 4, 1, 
DistanceFunction -&gt; CorrelationDistance, Method -&gt;  ... 
 
- asked by user13675 (2 votes) 

7.16 Tuesday, September 16, 2014

================================== 
Top new questions this week: 
================================== 
 
[How many triangles are 
there?]\url{http://mathematica.stackexchange.com/questions/59350/how-many-t 
riangles-are-there} 
 
Some time ago I found a puzzle and it stopped my work until I solved it. 
 
 
 
One of the possible solutions: 
 
Let us sum upright and upside down triangles whose top lies in the 
$i$-th row. 
$$ 
... 
 
- asked by ybeltukov (22 votes), answered by george2079 (20 votes) 
 
---------------------------- 
 
[Composition a la Mondrian] 
\url{http://mathematica.stackexchange.com/questions/59620/composition-a-la-mondrian} 
 
I would like to paint something like this 
 
 
 
or,even better, like this 
 
 
 
I have tried 
 
colors = 
{Red, Blue, Yellow, White, Black}; 
 
cells = 
ConstantImage[RandomChoice[colors], #] &amp; /@ 
... 
 
- asked by eldo (21 votes), answered by Simon Woods (11 votes) 
 
---------------------------- 
 
[Homotopy 
Visualization]\url{http://mathematica.stackexchange.com/questions/59463/hom 
otopy-visualization} 
 
I noticed that both the lower cased 'i' and the Apple logo  are 
topologically equivalent to  the disjoint union of two closed discs. 
 
 
 
I'd like to animate a homeomorphism from the left to the right,  ... 
 
- asked by Tobi Lehman (18 votes), answered by Michael E2 (28 votes) 
 
---------------------------- 
 
[Finding all paths of certain length between vertices in path graph, 
non-simple ones 
too]\url{http://mathematica.stackexchange.com/questions/59554/finding-all-p 
aths-of-certain-length-between-vertices-in-path-graph-non-simple-o} 
 
First I will tell you what my ultimate goal is, because maybe there's 
another way of doing it other than what I am trying. 
 
I need a list of all $(a_1, a_2, \ldots, a_N)$ tuples that satisfy 
certain  ... 
 
- asked by luke (12 votes), answered by ybeltukov (7 votes) 
 
---------------------------- 
 
[How to manipulate a circle in GeoGebra 
style?]\url{http://mathematica.stackexchange.com/questions/59726/how-to-man 
ipulate-a-circle-in-geogebra-style} 
 
I want to emulate the GeoGebra app. I want to get an effect like this in 
Mathematica. 
 
 
 
I don't know how to move whole circle without changing the radius of the 
circle. 
 
My sample code: 
 
... 
 
- asked by mathe (11 votes), answered by Kuba (5 votes) 
 
---------------------------- 
 
[Splitting strings into letter keys and 
integers]\url{http://mathematica.stackexchange.com/questions/59690/splittin 
g-strings-into-letter-keys-and-integers} 
 
I have strings of the following form: 
 
string = "ABC123DEFG456HI89UZXX1"; 
 
 
Letter keys of variable lengths are followed by (positive) integers. 
 
I want to get this transformation: 
 
 
{{"ABC", 123},  ... 
 
- asked by eldo (11 votes), answered by RunnyKine (10 votes) 
 
---------------------------- 
 
[Mathematica isn't sure whether a sum of two positives is positive or 
not]\url{http://mathematica.stackexchange.com/questions/59589/mathematica-i 
snt-sure-whether-a-sum-of-two-positives-is-positive-or-not} 
 
Mathematica is not able to tell whether a summation of two positive 
expressions is positive or not. Which is very strange. 
 
My three symbolic arguments, $x$, $y$, and $z$, are all real numbers 
bounded  ... 
 
- asked by jim (10 votes), answered by Jens (9 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Generating visually pleasing circle 
packs]\url{http://mathematica.stackexchange.com/questions/40334/generating- 
visually-pleasing-circle-packs} 
 
EDIT: I want to thank you all guys for this unexpected intellectual and 
artistic journey. Hope you enjoyed as I did. 
 
I would like to generate a circle pack that mimics this: (don't pay 
attention on  ... 
 
- asked by VividD (62 votes), answered by level1807 (39 votes) 
 
---------------------------- 
 
[Finding real roots of negative numbers (for example, 
$\sqrt[3]{-8}$)]\url{http://mathematica.stackexchange.com/questions/3886/fi 
nding-real-roots-of-negative-numbers-for-example-sqrt3-8} 
 
Say I want to quickly calculate $\sqrt[3]{-8}$, to which the most 
obvious solution is $-2$. 
 
When I input $\sqrt[3]{-8}$ or Power[-8, 3^-1], Mathematica gives the 
result "$2 (-1)^{1/3}$". Not what I  ... 
 
- asked by jtbandes (33 votes), answered by Brett Champion (13 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[NIntegrate::ncvbr: How should we interpret and handle this error not 
mentioned in any 
documentation?]\url{http://mathematica.stackexchange.com/questions/59371/ni 
ntegratencvbr-how-should-we-interpret-and-handle-this-error-not-mentione 
d-i} 
 
I have some user-defined module describing my integrand which has to be 
computed numerically (it's much more complicated than this but bear with 
me): 
 
foo[x_?NumericQ, y_?NumericQ, z_?NumericQ] :=  ... 
 
- asked by Sarah (3 votes) 
 
---------------------------- 
 
[How can I solve an equation where indexed variables get updated during 
iteration?]\url{http://mathematica.stackexchange.com/questions/59776/how-ca 
n-i-solve-an-equation-where-indexed-variables-get-updated-during-iterati 
on} 
 
I am trying to solve for a root for a certain equation, but some of the 
variables in this equation are indexed and get updated during iteration. 
The code that I am interested in is like the following: 
... 
 
- asked by erickwy (1 vote) 
 
---------------------------- 
 
[Generalize WASD Function First Person 
Viewing]\url{http://mathematica.stackexchange.com/questions/59655/generaliz 
e-wasd-function-first-person-viewing} 
 
How might I generalize the following WASD question such that it works 
with any Graphics3D object and includes q and e for z(up and down) 
movement?  For example qweasd[gr_]. 
 
In addition, how might I  ... 
 
- asked by Liam William (2 votes) 

7.17 Tuesday, September 9, 2014

================================== 
Top new questions this week: 
================================== 
 
[Finding length of intersection of two 
surfaces]\url{http://mathematica.stackexchange.com/questions/58768/finding- 
length-of-intersection-of-two-surfaces} 
 
I would like to know how we find the length of the intersection of two 
surfaces. For instance, in the following example,a surface intersects 
with a plane: 
 
How do we find the length of intersection  ... 
 
- asked by user19522 (25 votes), answered by RunnyKine (18 votes) 
 
---------------------------- 
 
[How to ask Mathematica to imitate Andy Warhol's pop-art 
painting?]\url{http://mathematica.stackexchange.com/questions/59132/how-to- 
ask-mathematica-to-imitate-andy-warhols-pop-art-painting} 
 
I tried to ask Mathematica to imitate Andy Warhol, let it convert a 
Marilyn Monroe's portrait looks like Warhol's world famous pop-art 
painting. However, the result shown below is far from  ... 
 
- asked by Putterboy (24 votes), answered by Karsten 7. (16 votes) 
 
---------------------------- 
 
[How to speed up my Project Euler 
code]\url{http://mathematica.stackexchange.com/questions/58751/how-to-speed 
-up-my-project-euler-code} 
 
The evaluation speed of Mathematica often depresses me. It did it again 
when I wrote a code to solve a Project Euler problem. 
https://projecteuler.net/problem=206 
 
Here's my code: 
 
ClearAll[a]; 
a = 
... 
 
- asked by Eric (17 votes), answered by Teake Nutma (13 votes) 
 
---------------------------- 
 
[How do you turn off the Dashed graphics 
directive?]\url{http://mathematica.stackexchange.com/questions/58992/how-do 
-you-turn-off-the-dashed-graphics-directive} 
 
I'm looking at Graphics Directives but can't figure out a way to turn 
off the Dashed graphics directive. For example, given 
 
ListPlot[{Table[Sin[i], {i, 25}], Table[Cos[i], {i, 25}]}, 
Joined -&gt;  ... 
 
- asked by Andrew Cheong (16 votes), answered by m_goldberg (15 votes) 
 
---------------------------- 
 
[symbolic integration 
error]\url{http://mathematica.stackexchange.com/questions/58940/symbolic-in 
tegration-error} 
 
I'm running Mathematica 10.0.0 and encountered a disturbing error in the 
symbolic integration of a rather simple function 
 
Integrate[(1 - x)*(1 + 2*x)^6/Sqrt[1 - x^2], {x, -1, 1}]/Pi 
 
 
The correct  ... 
 
- asked by Carlo Beenakker (16 votes), answered by Artes (11 votes) 
---------------------------- 
 
[How to generate a blank crossword 
sheet?]\url{http://mathematica.stackexchange.com/questions/59001/how-to-gen 
erate-a-blank-crossword-sheet} 
 
I attempted to generate a blank crossword sheet. My method is by 
combining the rows and columns as shown on the graph below. However, 
some of the across and down numbers then appeared out of place  ... 
 
- asked by Putterboy (14 votes), answered by ybeltukov (17 votes) 
 
---------------------------- 
 
[Where to see all Mathematica 
units]\url{http://mathematica.stackexchange.com/questions/58793/where-to-se 
e-all-mathematica-units} 
 
Is there a tutorial page that have all Mathematica units? I sometimes 
have hard time figuring out the correct unit spelling when using 
quantities 
 
 
- asked by Yituo (13 votes), answered by paw (17 votes) 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Finding unit tangent, normal, and binormal vectors for a given 
r(t)]\url{http://mathematica.stackexchange.com/questions/18598/finding-unit 
-tangent-normal-and-binormal-vectors-for-a-given-rt} 
 
For my Calc III class, I need to find $T(t), N(t)$, and $B(t)$ for $t=1, 
2$, and $-1$, given $r(t)=\{t,t^2,t^3\}$. 
 
I've got Mathematica, but I've never used it before and I'm not sure how 
to coerce  ... 
 
- asked by a98 (12 votes), answered by Artes (29 votes) 
 
---------------------------- 
 
[Get a "step by step" evaluation in 
Mathematica]\url{http://mathematica.stackexchange.com/questions/148/get-a-s 
tep-by-step-evaluation-in-mathematica} 
 
Is it possible in Mathematica to get a step-by-step evaluation of some 
functions; that's to say, outputting not only the result but all the 
stages that have led to it? 
 
Example : Let's say I want to  ... 
 
- asked by Skydreamer (55 votes), answered by  J.M. (47 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[CUDALink Error: A CUDALink kernel timed 
out?]\url{http://mathematica.stackexchange.com/questions/58853/cudalink-err 
or-a-cudalink-kernel-timed-out} 
 
I'm following the CUDALink tutorial [ 
http://reference.wolfram.com/language/CUDALink/tutorial/Introduction.htm 
l ] and everything is going fine until I get to the part that calls 
CUDADot on the  ... 
 
- asked by Edmund (2 votes) 
 
---------------------------- 
 
[Using ParallelMap to run multiple Game of Life simulations 
simultaniously]\url{http://mathematica.stackexchange.com/questions/59224/us 
ing-parallelmap-to-run-multiple-game-of-life-simulations-simultaniously> 
) 
 
My Assignment and Code 
 
As an exercise in Parallel computing I've been tasked with implementing 
Conway's GoL in a way such that at every iteration only a fraction of 
cells are updated. I'm then to run  ... 
 
- asked by Jason Houtekamer (2 votes) 
 
---------------------------- 
 
[How to syntax check that all instance of symbol must be contained in 
Subscript[]]\url{http://mathematica.stackexchange.com/questions/59202/how-t 
o-syntax-check-that-all-instance-of-symbol-must-be-contained-in-subscrip 
t} 
 
I have a function f[expr] that is only allowed to take an expression 
expr that is a polynomial in Subscript[x,_].  By this, I mean that expr 
can be a sum/difference of terms (up to other  ... 
 
- asked by QuantumDot (2 votes)

7.18 September 2, 2014

================================== 
Top new questions this week: 
================================== 
 
[Object separation from a 2.5D 
surface]\url{http://mathematica.stackexchange.com/questions/58269/object-se 
paration-from-a-2-5d-surface} 
 
I'm trying to identify the shape and the boundaries of objects. The data 
was generated with a laser scanner and represent the surface of an area 
in which many boulders lay on the ground and making up  ... 
 
- asked by zeckra (18 votes), answered by shrx (3 votes) 
 
---------------------------- 
 
[Site - Cell Correspondence in Voronoi Diagram obtained via 
VoronoiMesh]\url{http://mathematica.stackexchange.com/questions/58395/site- 
cell-correspondence-in-voronoi-diagram-obtained-via-voronoimesh} 
 
Consider the following: 
 
pts = RandomReal[4, {10, 2}]; 
vor = VoronoiMesh[pts, {{0, 4}, {0, 4}}]; 
 
Graphics[{GraphicsComplex[ 
MeshCoordinates[vor], {Thick, Blue, MeshCells[vor, 1], 
... 
 
- asked by RunnyKine (12 votes), answered by ybeltukov (7 votes) 
 
---------------------------- 
 
[How to create a neon light effect in 
Mathematica?]\url{http://mathematica.stackexchange.com/questions/58602/how- 
to-create-a-neon-light-effect-in-mathematica} 
 
I tried to use Glow to create a neon light effect on a torus object. The 
result shown on the left of the picture below looks quite different from 
the real one on the right. Is there a way to obtain a  ... 
 
- asked by Putterboy (12 votes), answered by DaveStrider (26 votes) 
 
---------------------------- 
 
[Find maximum value of interpolation function - obviously wrong 
result]\url{http://mathematica.stackexchange.com/questions/58244/find-maxim 
um-value-of-interpolation-function-obviously-wrong-result} 
 
Minimizing and maximizing interpolation function has already been asked 
and answered, see here for example. 
 
Yet, I observe a strange behaviour. Well, I can understand that the 
wrong guess of  ... 
 
- asked by anderstood (11 votes), answered by Karsten 7. (12 votes) 
 
---------------------------- 
 
[Set of integers not divisible by smaller set of 
primes]\url{http://mathematica.stackexchange.com/questions/58520/set-of-int 
egers-not-divisible-by-smaller-set-of-primes} 
 
Let $p_n$ be the sequence of prime numbers, and $s(x,n)=$ the set of 
integers less or equal than $x$ that are not divisible by 
$p_1,\dots,p_n.$ I can define it as follows: 
 
... 
 
- asked by martin (10 votes), answered by Mr.Wizard (14 votes) 
 
---------------------------- 
 
[Neumann boundary conditions in NDSolve over nontrivial 
region]\url{http://mathematica.stackexchange.com/questions/58412/neumann-bo 
undary-conditions-in-ndsolve-over-nontrivial-region} 
 
The problem I would like to solve involves diffusion in the following 
region 
 
reg = ImplicitRegion[-5 &lt;= x &lt;= 5 &amp;&amp; -5 &lt;= y &lt;= 5 
&amp;&amp; x^2 + y^2 &gt;= 1^2, {x, y}]; 
... 
 
- asked by Greg P (10 votes), answered by user21 (9 votes) 
 
---------------------------- 
 
[Is garbage collection broken in version 
10.0.0?]\url{http://mathematica.stackexchange.com/questions/58375/is-garbag 
e-collection-broken-in-version-10-0-0} 
 
In version 10.0.0 under Windows I am observing the following behavior: 
 
Do[Module[{foo}, foo[x_] := 1; foo[0]], {10}] 
 
Names["foo$*"] 
 
 
 
{"foo$593", "foo$594", "foo$595", "foo$596", "foo$597",  ... 
 
- asked by Mr.Wizard (9 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Can Mathematica do symbolic linear 
algebra?]\url{http://mathematica.stackexchange.com/questions/3242/can-mathe 
matica-do-symbolic-linear-algebra} 
 
For instance, is there some way I can say "let A and B be arbitrary real 
$m\times n$ and $k\times m$ matrices, 
Simplify[Transpose[Transpose[A].Transpose[B]]]" and Mathematica would 
simplify it to B.A? 
... 
 
- asked by nikie (24 votes), answered by helen (12 votes) 
 
---------------------------- 
 
[How to force 
2+2=5]\url{http://mathematica.stackexchange.com/questions/48929/how-to-forc 
e-22-5} 
 
I was looking at this question (writing a program such that 2 + 2 = 5) 
and tried to write something in Mathematica, but I couldn't get 
something to work without completely replacing Plus. Neither of  ... 
 
- asked by Artefacto (4 votes), answered by halirutan (7 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[SyntaxForm not correctly parsed by 
FrontEnd]\url{http://mathematica.stackexchange.com/questions/58531/syntaxfo 
rm-not-correctly-parsed-by-frontend} 
 
When using TagBox with SyntaxForm, I noticed sometimes it is not well 
parsed by the FrontEnd. Here is a minimal example. First input 
 
TagBox["f", "test", SyntaxForm -&gt; "^"] // DisplayForm 
 
 
Then  ... 
 
- asked by Yi Wang (1 vote) 
 
---------------------------- 
 
[Segmentation of 
sunspots]\url{http://mathematica.stackexchange.com/questions/58673/segmenta 
tion-of-sunspots} 
 
I recently went for a walk with my camera and snapped a few pictures of 
the sun. The pictures didn't turn out too well, but this was to be 
expected without a telescope. I thought it might be a nice  ... 
 
- asked by paw (6 votes) 
 
---------------------------- 
 
[Implementation of Series 
function]\url{http://mathematica.stackexchange.com/questions/58343/implemen 
tation-of-series-function} 
 
I'm trying to evaluate the partial derivatives of some function F[x,y] 
at some point, i.e. 
 
Limit[Limit[D[F[x,y],{x,m},{y,n}],x-&gt;x0],y-&gt;y0] 
 
 
However, for higher derivatives I find that it fails  ... 
 
- asked by Barefeg (2 votes) 

7.19 August 26, 2014

================================== 
Top new questions this week: 
================================== 
 
[Proving the hairy ball theorem using 
xAct]\url{http://mathematica.stackexchange.com/questions/57726/proving-the- 
hairy-ball-theorem-using-xact} 
 
I would to formally prove the hairy ball theorem in Mathematica, 
initially just for the $S^2$, and then see about generalizing. 
 
An approach I thought about to use the xAct package to define $S^2$ 
and  ... 
 
- asked by Daniel Mahler (15 votes) 
 
---------------------------- 
 
[How to understand the usage of Inner and Outer 
figuratively?]\url{http://mathematica.stackexchange.com/questions/57760/how 
-to-understand-the-usage-of-inner-and-outer-figuratively} 
 
Description: 
 
In Mathematica the functions like Thread, Inner, Outer etc. are very 
important and are used frequently. 
 
For the function Thread: 
 
ThreadUsage1: 
 
Thread[f[{a, b, c}]] 
 
 
 
{f[a], f[b],  ... 
 
- asked by Tangshutao (15 votes), answered by Timothy Wofford (5 votes) 
 
---------------------------- 
 
[Make MapIndexed 
listable]\url{http://mathematica.stackexchange.com/questions/57898/make-map 
indexed-listable} 
 
My goal is to apply MapIndexed to every element of a nested list without 
destroying the arithmetic operations within the elements. For example, 
let's start with this list: 
 
{a, {b, {c^d, {e + f g}}}} 
 
... 
 
- asked by seismatica (14 votes), answered by Mr.Wizard (10 votes) 
 
---------------------------- 
 
[Is it possible to insert new colour schemes into 
ColorData?]\url{http://mathematica.stackexchange.com/questions/57885/is-it- 
possible-to-insert-new-colour-schemes-into-colordata} 
 
Because of the standards in my field, for many plots I need to use (or 
at least end up using) rather narrowly defined colour schemes, and in 
particular the Matlab "Jet" scheme, which is well described  ... 
 
- asked by episanty (12 votes), answered by Mr.Wizard (10 votes) 
 
---------------------------- 
 
[How to combine one or more rotated graphics 
objects?]\url{http://mathematica.stackexchange.com/questions/57803/how-to-c 
ombine-one-or-more-rotated-graphics-objects} 
 
I wish to produce an image with more than one composite graphics objects 
which have been modified using Rotate. I feel this should not be 
difficult, but haven't yet found a solution. 
 
A simple example  ... 
 
- asked by image_doctor (11 votes), answered by mfvonh (11 votes) 
 
---------------------------- 
 
[What is the correct way to use specific rule for specific pattern match 
when parsing an 
expression?]\url{http://mathematica.stackexchange.com/questions/58010/what- 
is-the-correct-way-to-use-specific-rule-for-specific-pattern-match-when- 
par} 
 
update: 
Thanks for the answers below. But I noticed they do not handle the 
following special cases: lis=1 and lis=z , lis=1/z and lis=-z as these 
are also considered legal input as given in the  ... 
 
- asked by Nasser (10 votes), answered by seismatica (6 votes) 
 
---------------------------- 
 
[Map of United States as a 3D 
histogram]\url{http://mathematica.stackexchange.com/questions/57872/map-of- 
united-states-as-a-3d-histogram} 
 
By combining the state data from here and the extrusion code from here I 
have managed to make prisms of the various US states such as 
 
 
 
However, the extrusion method looses information about the  ... 
 
- asked by sonright (10 votes), answered by Vitaliy Kaurov (11 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Finding all simple paths between two vertices in a 
graph]\url{http://mathematica.stackexchange.com/questions/25779/finding-all 
-simple-paths-between-two-vertices-in-a-graph} 
 
There are built-in methods to find a shortest path between two vertices 
in a graph, and the question on finding all shortest paths between two 
vertices has gathered quite a bit of attention. 
 
A path  ... 
 
- asked by mrm (11 votes), answered by trybik (10 votes) 
 
---------------------------- 
 
[Marking points of intersection between two 
curves]\url{http://mathematica.stackexchange.com/questions/10472/marking-po 
ints-of-intersection-between-two-curves} 
 
I'm trying to illustrate the solutions numerically and graphically for 
an equation such as Tan[x] == x. I think I did everything ok except I 
wanted to mark each intersection between Tan[x] and x. 
 
... 
 
- asked by fiz (24 votes), answered by belisarius (31 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Error when using 
EquationTrekker]\url{http://mathematica.stackexchange.com/questions/58005/e 
rror-when-using-equationtrekker} 
 
I just got to know EquationTrakker because I need to do phase graphs for 
my classes. 
 
When I load it 
 
&lt;&lt; EquationTrekker` 
 
 
everything works fine with no errors. 
 
However when I try to use an  ... 
 
- asked by Geo (2 votes) 
 
---------------------------- 
 
[How to solve for exponents in an infinite 
product?]\url{http://mathematica.stackexchange.com/questions/57930/how-to-s 
olve-for-exponents-in-an-infinite-product} 
 
Say I have a power series, $f(x,y) \in 1 + x\mathbb{Z}[[x,y]]$ 
 
Then it admits a unique expansion 
 
$$f(x,y) = \prod_{i=1}^\infty \prod_{j=0}^\infty (1 - x^i 
y^j)^{n_{i,j}}$$ 
 
for some integers, $i,  ... 
 
- asked by Vivek Shende (2 votes) 
 
---------------------------- 
 
[Exporting a compiled function for later 
use]\url{http://mathematica.stackexchange.com/questions/58108/exporting-a-c 
ompiled-function-for-later-use} 
 
I compiled a function then used it in NMinimize. The computation took 19 
seconds. Then, I exported this compiled function and restarted MMA and 
imported this compiled function into my notebook. This  ... 
 
- asked by yashar (5 votes)

7.20 August 19, 2014

================================== 
Top new questions this week: 
================================== 
 
[Is this 30% slowdown in Mathematica 10 due to DownValues lookup 
time?]\url{http://mathematica.stackexchange.com/questions/57301/is-this-30- 
slowdown-in-mathematica-10-due-to-downvalues-lookup-time} 
 
Running several numerical self-programmed packages I realized already 
some time ago that Mathematica 10 needed between 20 and 40% more time. 
I did already report this of course with a simple example  ... 
 
- asked by Rolf Mertig (26 votes) 
 
---------------------------- 
 
[2D random walk within a bounded 
area]\url{http://mathematica.stackexchange.com/questions/57561/2d-random-wa 
lk-within-a-bounded-area} 
 
I want to simulate a random walk on two dimension in a bounded area such 
as a square or circle. I am thinking of using If statement to define a 
boundary. Is there a better way to define a bounded  ... 
 
- asked by yashar (20 votes), answered by Pickett (21 votes) 
 
---------------------------- 
 
["Indexing" a 
vector]\url{http://mathematica.stackexchange.com/questions/57613/indexing-a 
-vector} 
 
I need to "index" a vector according to the first occurence of its 
distinct elements. 
 
I have written 
 
index[list_] := 
Module[{x = list, p}, 
p = Flatten /@ Map[Position[x, #] &amp;,  ... 
 
- asked by eldo (13 votes), answered by kguler (18 votes) 
 
---------------------------- 
 
[Convert spectral distribution to RGB 
color]\url{http://mathematica.stackexchange.com/questions/57389/convert-spe 
ctral-distribution-to-rgb-color} 
 
Presume I have a spectrum as a function of wavelength (an example being 
the blackbody spectrum): 
 
 
 
I want to convert that to a single RGB color to display on-screen, i.e. 
the "color" of that object  ... 
 
- asked by Guillochon (13 votes), answered by Sjoerd C. de Vries (11 
votes) 
 
---------------------------- 
 
[Why does Mathematica simplify 
$x/x\to1$?]\url{http://mathematica.stackexchange.com/questions/57489/why-do 
es-mathematica-simplify-x-x-to1} 
 
If I enter x/x, I get 1. Such behavior leads to this: 
 
Simplify[D[Sqrt[x^2], x, x]] 
 
 
 
0 
 
 
The same would be even if I use Together instead of Simplify. 
 
One could then think that $\sqrt{x^2}$ is  ... 
 
- asked by Ruslan (11 votes), answered by Jens (5 votes) 
 
---------------------------- 
 
[Manipulate crashes after running 4 
minutes]\url{http://mathematica.stackexchange.com/questions/57247/manipulat 
e-crashes-after-running-4-minutes} 
 
The following code generates the familiar 3D-plot: 
 
Manipulate[ 
Plot3D[Sin[x a] - Cos[y ], {x, -10, 10}, {y, -10, 10}, 
ColorFunction -&gt; "TemperatureMap"], {a, -2, 2, 0.1}] 
 
 
However  ... 
 
- asked by MathLind (10 votes), answered by Szabolcs (2 votes) 
 
---------------------------- 
 
[Incompatible InterpolatingFunction between V9 (and earlier) and 
V10]\url{http://mathematica.stackexchange.com/questions/57608/incompatible- 
interpolatingfunction-between-v9-and-earlier-and-v10} 
 
I am encountering compatibility issues when loading DumpSave(d) 
definitions in V10 that have been created with earlier versions. V10 
appears to be unable to digest `InterpolatingFunction from earlier  ... 
 
- asked by Markus Roellig (10 votes), answered by Mr.Wizard (4 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Marking points of intersection between two 
curves]\url{http://mathematica.stackexchange.com/questions/10472/marking-po 
ints-of-intersection-between-two-curves} 
 
I'm trying to illustrate the solutions numerically and graphically for 
an equation such as Tan[x] == x. I think I did everything ok except I 
wanted to mark each intersection between Tan[x] and x. 
 
... 
 
- asked by fiz (24 votes), answered by belisarius (31 votes) 
 
---------------------------- 
 
[How to find all the local minima/maxima in a 
range]\url{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  ... 
 
- asked by Margus (38 votes), answered by Daniel Lichtblau (40 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Is it possible to Compile the function with string 
argument?]\url{http://mathematica.stackexchange.com/questions/57355/is-it-p 
ossible-to-compile-the-function-with-string-argument} 
 
As we can see from the Compile documentation, the typical arguments for 
Compile should be Integer, Real, Complex and True | False: 
 
 
 
Is it possible to use a String as argument type for Compile? 
 
May  ... 
 
- asked by Rom38 (2 votes) 
 
---------------------------- 
 
[Functional-Style Fixed-Length Queue 
Object?]\url{http://mathematica.stackexchange.com/questions/57539/functiona 
l-style-fixed-length-queue-object} 
 
Following up on question Side-effecting an array in an association? and 
@Mr.Wizard's answer in there, I'm modernizing and tweaking Daniel 
Lichtblau's efficient queues and ran into a little roadblock. 
... 
 
- asked by Reb.Cabin (2 votes) 
 
---------------------------- 
 
[Adding an unused column creates an error in 
JoinAcross]\url{http://mathematica.stackexchange.com/questions/57345/adding 
-an-unused-column-creates-an-error-in-joinacross} 
 
I'd been having trouble using JoinAcross on two datasets.  After going 
through the answers to my original question and fixing my code, I find 
I'm now having a problem that I think is being caused by  ... 
 
- asked by Mitchell Kaplan (2 votes)

7.21 August 12, 2014

================================== 
Top new questions this week: 
================================== 
 
[Incompatible Changes since Mathematica Version 
7?]\url{http://mathematica.stackexchange.com/questions/56728/incompatible-c 
hanges-since-mathematica-version-7} 
 
There is documentation of the incompatible changes made to Mathematica 
with each major release: 
 
 
Incompatible Changes since Mathematica Version 1 
 
 
Unfortunately that documentation simply stopped  ... 
 
- asked by Mr.Wizard (22 votes), answered by Mr.Wizard (22 votes) 
 
---------------------------- 
 
[How to make a stereogram in 
Mathematica?]\url{http://mathematica.stackexchange.com/questions/57034/how- 
to-make-a-stereogram-in-mathematica} 
 
Given a background and a pattern jpg files, is there a quick and easy 
way to produce a stereogram by using Mathematica? The following picture 
was produced from Photoshop, spent about half an hour. 
 
 
... 
 
- asked by user16069 (15 votes), answered by Simon Woods (9 votes) 
 
---------------------------- 
 
[Combining images with 
CUDA]\url{http://mathematica.stackexchange.com/questions/56786/combining-im 
ages-with-cuda} 
 
2nd Edition: 
To make it a bit more clear, and to summarize the discussion in 
comments. 
 
I have a small image, like this one: 
 
InsertImage = 
DensityPlot[Sqrt[1 - x^2 - y^2], {x, -1, 1}, {y, -1, 1}, 
... 
 
- asked by Alexey Bobrick (13 votes), answered by Simon Woods (10 votes) 
 
---------------------------- 
 
[How to change element color in Periodic 
Table?]\url{http://mathematica.stackexchange.com/questions/57133/how-to-cha 
nge-element-color-in-periodic-table} 
 
The command 
 
ColorData["Atoms", "Panel"] 
 
 
generates a periodic table. 
 
As I don't want to reinvent the wheel, I asked myself how to change the 
color of each cell in the periodic table, (hydrogen ->  ... 
 
- asked by Zhozer (12 votes), answered by belisarius (14 votes) 
 
---------------------------- 
 
[Apply an image as a texture to 
text]\url{http://mathematica.stackexchange.com/questions/56719/apply-an-ima 
ge-as-a-texture-to-text} 
 
I have the following equation 
 
eq = Sum[x^2, {x, 0, 10}] 
 
 
and an image image = 
Import["http://creativity103.com/collections/Graphic/rainbowbars.jpg"]. 
 
How might I output a transparent version of the  ... 
 
- asked by Liam William (11 votes), answered by Simon Woods (16 votes) 
 
---------------------------- 
 
[Dataset: get number of levels and 
elements]\url{http://mathematica.stackexchange.com/questions/56983/dataset- 
get-number-of-levels-and-elements} 
 
The summary box for Dataset objects shows the number of levels and 
elements at the bottom. 
 
How can we get these values programmatically? 
 
For example, "4 levels, 350 elements" in the Planets  ... 
 
- asked by Szabolcs (10 votes), answered by WReach (7 votes) 
 
---------------------------- 
 
[PlotLegends -> "Expressions" not working when Plot given one 
function]\url{http://mathematica.stackexchange.com/questions/56829/plotlege 
nds-expressions-not-working-when-plot-given-one-function} 
 
I don't get a legend when I use the option PlotLegends -&gt; 
"Expressions" when the first argument to Plot is a single function. It 
works OK when I give Plot a list of functions. 
 
Test cases: 
 
... 
 
- asked by mathe (10 votes), answered by rcollyer (8 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Finding unit tangent, normal, and binormal vectors for a given 
r(t)]\url{http://mathematica.stackexchange.com/questions/18598/finding-unit 
-tangent-normal-and-binormal-vectors-for-a-given-rt} 
 
For my Calc III class, I need to find $T(t), N(t)$, and $B(t)$ for $t=1, 
2$, and $-1$, given $r(t)=\{t,t^2,t^3\}$. 
 
I've got Mathematica, but I've never used it before and I'm not sure how 
to coerce  ... 
 
- asked by a98 (12 votes), answered by Artes (29 votes) 
 
---------------------------- 
 
[Finding the centroid of the area between two 
curves]\url{http://mathematica.stackexchange.com/questions/17170/finding-th 
e-centroid-of-the-area-between-two-curves} 
 
When I have an area bounded by curves, is there a built-in way to find 
the center of the area? Or do I have to plot it first and then use 
ComponentMeasurements on it? 
 
For example: the area under $y=  ... 
 
- asked by a3f (10 votes), answered by george2079 (3 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Plotting a transformed region only works with integer 
inputs]\url{http://mathematica.stackexchange.com/questions/57112/plotting-a 
-transformed-region-only-works-with-integer-inputs} 
 
I can't figure out why the following code only works with integers. 
 
r1 = TransformedRegion[Cuboid[{-1, -1, -1}, {1, 1, 1}], 
TranslationTransform[{0, 1, 0}]] 
RegionPlot3D[r1] 
DiscretizeRegion[r1] 
... 
 
- asked by jeff (5 votes) 
 
---------------------------- 
 
[Symbolic integration of elliptic 
functions]\url{http://mathematica.stackexchange.com/questions/57024/symboli 
c-integration-of-elliptic-functions} 
 
Is there some clever way to integrate products of elliptic functions 
$\wp(z;g_2,g_3)$ or $\zeta(z;g_2,g_3)$ in Mathematica? 
 
 
 
Mathematica seems to be able to integrate functions like 
 
... 
 
- asked by TheTwistedSector (3 votes) 
 
---------------------------- 
 
[Version 10 cannot print 
properly?]\url{http://mathematica.stackexchange.com/questions/57182/version 
-10-cannot-print-properly} 
 
I have two problems with printing in version 10. 
 
First, I can't print correctly with a setting of printing scale 
 
For example, I have some plots in a notebook, 
 
Grid@Table[ 
Plot[Sin[x], {x, 0, 2  ... 
 
- asked by xslittlegrass (2 votes) 

7.22 August 5, 2014

================================== 
Top new questions this week: 
================================== 
 
[Numerically solving Helmholtz equation in 2D for arbitrary 
shapes]\url{http://mathematica.stackexchange.com/questions/56305/numericall 
y-solving-helmholtz-equation-in-2d-for-arbitrary-shapes} 
 
I would like to solve the Helmholtz equation with dirichlet boundary 
conditions in 2 dimensions for an arbitrary shape. (for a qualitative 
comparison of the eigenstates to periodic orbits in the  ... 
 
- asked by Julian S. (25 votes), answered by Mark McClure (20 votes) 
 
---------------------------- 
 
[V10's Operator Forms - what are they good 
for?]\url{http://mathematica.stackexchange.com/questions/56504/v10s-operato 
r-forms-what-are-they-good-for} 
 
V10 introduces an operator form for several functions perhaps primarily 
due to their role in queries as part of introducing data science 
functionality. At first pass it seems a lot of effort to add  ... 
 
- asked by Ronald Monson (22 votes), answered by Simon Woods (24 votes) 
 
---------------------------- 
 
[Why is Query so much slower than 
Part?]\url{http://mathematica.stackexchange.com/questions/56609/why-is-quer 
y-so-much-slower-than-part} 
 
Time for another of these(1),(2) as yet another new-in-10 function 
appears to have poor performance compared to older alternatives.  This 
time: Query appears to be orders of magnitude slower than Part  ... 
 
- asked by Mr.Wizard (15 votes), answered by m_goldberg (8 votes) 
 
---------------------------- 
 
[BitShiftRight produces incorrect results in Version 
10]\url{http://mathematica.stackexchange.com/questions/56241/bitshiftright- 
produces-incorrect-results-in-version-10} 
 
With Mathematica 10 for Mac, BitShiftRight works properly on lists of up 
to 100000 numbers, but appears to give incorrect results when threaded 
over lists of 100001 or more: 
 
v1 = Table[i, {i, 1,  ... 
 
- asked by DBM (14 votes), answered by Mr.Wizard (9 votes) 
 
---------------------------- 
 
[Speed of curated data calls in Version 
10]\url{http://mathematica.stackexchange.com/questions/56172/speed-of-curat 
ed-data-calls-in-version-10} 
 
Curated datasets underwent a significant overhaul in version 10, 
primarily in the way content is delivered in the form of Objects and 
Entities.  Additionally, it appears that this change in content  ... 
 
- asked by bobthechemist (14 votes), answered by Nick Lariviere (13 
votes) 
 
---------------------------- 
 
[the winding number for the circle map (Arnold 
tongue)]\url{http://mathematica.stackexchange.com/questions/56499/the-windi 
ng-number-for-the-circle-map-arnold-tongue} 
 
I want to do an iterative calculation: 
 
f[n_, a_, b_] := Nest[# + a - b Sin[2 Pi #] &amp;, 0, n]/n; 
 
 
If I use i use the machine precision, it maybe produce a great error,for 
example: 
 
N@f[500, 1/2,  ... 
 
- asked by Chenminqi (12 votes), answered by heropup (10 votes) 
 
---------------------------- 
 
[Speed up adding Poisson noise to an 
image]\url{http://mathematica.stackexchange.com/questions/56180/speed-up-ad 
ding-poisson-noise-to-an-image} 
 
I'm simulating some images corrupted with Poisson noise, but I'm 
encountering a few problems with performance. According to the 
documentation on ImageEffect, one can add Poisson noise according to the 
... 
 
- asked by blochwave (11 votes), answered by blochwave (16 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[How can I add drop shadows and specular highlights to 2D 
graphics?]\url{http://mathematica.stackexchange.com/questions/43186/how-can 
-i-add-drop-shadows-and-specular-highlights-to-2d-graphics} 
 
I thought I'd share some code in the form of a self-answered question, 
but other answers are of course welcome. 
 
Drop shadows are a familiar visual effect, giving the impression of a 
graphical element  ... 
 
- asked by Simon Woods (31 votes), answered by Simon Woods (35 votes) 
 
---------------------------- 
 
[Resources for beautiful Mathematica 
Stylesheets]\url{http://mathematica.stackexchange.com/questions/5846/resour 
ces-for-beautiful-mathematica-stylesheets} 
 
When the Wolfram Demonstrations were introduced and the 
Documentation-Center was redesigned, I remember it was the first time I 
thought someone had put some effort into creating a beautiful  ... 
 
- asked by halirutan (81 votes), answered by rm -rf (41 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[DatabaseLink Example for DB2 and 
Mathematica]\url{http://mathematica.stackexchange.com/questions/56283/datab 
aselink-example-for-db2-and-mathematica} 
 
could someone please point me to good example on how to make a JDBC 
connection to an IBM DB2 database? 
 
 
- asked by Rick QI (1 vote) 
 
---------------------------- 
 
[Precision problem while evaluating RegionMember or Element in 
V10]\url{http://mathematica.stackexchange.com/questions/56402/precision-pro 
blem-while-evaluating-regionmember-or-element-in-v10} 
 
I'll try to give you a background on where the problem occured. The 
problem itself is defined near the end of the post. 
 
I'm running a sort of a simulation of a particle in a box. I finally got 
my  ... 
 
- asked by Daroslav (3 votes) 
 
---------------------------- 
 
[Workarounds for a possible bug in the linearity of 
FourierTransform]\url{http://mathematica.stackexchange.com/questions/56237/ 
workarounds-for-a-possible-bug-in-the-linearity-of-fouriertransform} 
 
This is somewhat similar to this question, except the problem I am 
encountering is to do with Fourier transforms of scalar multiples of 
functions and their derivatives. 
 
I wish to input  ... 
 
- asked by Oliver Lunt (2 votes) 

7.23 July 29, 2014

================================== 
Top new questions this week: 
================================== 
 
[Best practice of passing a large number of parameters to 
functions]\url{http://mathematica.stackexchange.com/questions/55833/best-pr 
actice-of-passing-a-large-number-of-parameters-to-functions} 
 
I have a number of functions which all take a large number of 
parameters. I am wondering which is the best practice of passing these 
parameters to those functions. I could of course simply specify the  ... 
 
- asked by Uwe Thummel (16 votes), answered by Mr.Wizard (12 votes) 
 
---------------------------- 
 
[Is there a way to recreate the typical Red/Blue-Postereffect using 
Mathematica?]\url{http://mathematica.stackexchange.com/questions/55684/is-t 
here-a-way-to-recreate-the-typical-red-blue-postereffect-using-mathemati 
ca} 
 
I think nearly all of us have at least once seen an image like this: 
 
 
 
So I wondered whether it is possible to recreate this effect using 
Mathematica because it seems like it wouldn't need that many  ... 
 
- asked by Levix (15 votes), answered by kale (14 votes) 
 
---------------------------- 
 
[How can I mend this broken 
heart?]\url{http://mathematica.stackexchange.com/questions/55905/how-can-i- 
mend-this-broken-heart} 
 
Try to evaluate the following code: 
 
ContourPlot3D[(x^2 + 9/4 y^2 + z^2 - 1)^3 == x^2 z^3 + 9/80 y^2 z^3, 
{x, -6/5, 6/5}, {y, -6/5, 6/5}, {z, -6/5, 3/2}, 
Mesh -&gt; None, Boxed -&gt; False,  ... 
 
- asked by LCFactorization (13 votes), answered by Rahul Narain (18 
votes) 
 
---------------------------- 
 
[Geographic background containing both outlines and contours: 
how?]\url{http://mathematica.stackexchange.com/questions/55900/geographic-b 
ackground-containing-both-outlines-and-contours-how} 
 
I would like to create a map which will show lakes and rivers together 
with elevation contours and contour labels.  What is the simplest way to 
do this with GeoGraphics in version 10? 
 
The solution I  ... 
 
- asked by Szabolcs (11 votes), answered by WReach (11 votes) 
 
---------------------------- 
 
[What is the natural way of using Dataset to get a 
FittedModel?]\url{http://mathematica.stackexchange.com/questions/56110/what 
-is-the-natural-way-of-using-dataset-to-get-a-fittedmodel} 
 
The new Dataset in Mathematica 10 is a great addition to the language, 
potentially reducing the convenience gap with R. Given this, I would 
like to understand what the equivalent simple or natural  ... 
 
- asked by Simplex (10 votes), answered by WReach (5 votes) 
 
---------------------------- 
 
[Testing Credit Usage in Wolfram Programming 
Cloud]\url{http://mathematica.stackexchange.com/questions/55970/testing-cre 
dit-usage-in-wolfram-programming-cloud} 
 
I currently have a free WPC account, which I am using for testing 
purposes.  Amongst other things, I want to find out more about how the 
credit system works, in particular how many credits are used,  ... 
 
- asked by Analyst (9 votes), answered by Analyst (5 votes) 
 
---------------------------- 
 
[Possible bug in 
Dynamic]\url{http://mathematica.stackexchange.com/questions/55855/possible- 
bug-in-dynamic} 
 
The code below crashes the Mathematica kernel in version 10 (not in V9) 
every time I run it on Windows and on Mac OS. I've sent it to WRI, but 
was told that they could not reproduce the crash. 
 
Does  ... 
 
- asked by nikie (9 votes), answered by Michael E2 (4 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Even Fibonacci 
numbers]\url{http://mathematica.stackexchange.com/questions/37266/even-fibo 
nacci-numbers} 
 
Today, I found the Euler Project. Problem #2 is 
 
 
Each new term in the Fibonacci sequence is generated by adding the 
previous two terms. By starting with 1 and 2, the first 10 terms will 
be: 
 
1,  ... 
 
- asked by Tangshutao (22 votes), answered by rcollyer (29 votes) 
 
---------------------------- 
 
[Implementing efficient multiple 
undo]\url{http://mathematica.stackexchange.com/questions/1953/implementing- 
efficient-multiple-undo} 
 
At the time this question was asked, version 10 was not out yet. The 
Front End of Mathematica 10 does have multiple undo, see the answer by 
John Fultz. 
 
The Mathematica Front End's built-in Undo  ... 
 
- asked by Rojo (111 votes), answered by John Fultz (30 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Result of Integrate depends on order of integration although the domain 
is 
rectangular]\url{http://mathematica.stackexchange.com/questions/55868/resul 
t-of-integrate-depends-on-order-of-integration-although-the-domain-is-re 
cta} 
 
The following: 
 
Mass/(2 J) 
Integrate[(-2Rotation(r^2(r-Mass)(1-3Cos[\[Theta]]^2) - Rotation^2(r Cos[\[Theta]]^2(3-Cos[\[Theta]]^2)-Mass(1+Cos[\[Theta]]^2)(2-Cos[\[Theta]]^2))))/(r^2+Rotation^2Cos[\[Theta]]^2)^2 
 
- asked by auxsvr (2 votes) 
 
---------------------------- 
 
[PlotMarkers problem in ErrorListPlot, Mathematica 
10]\url{http://mathematica.stackexchange.com/questions/56132/plotmarkers-pr 
oblem-in-errorlistplot-mathematica-10} 
 
I recently upgraded to Mathematica 10, very excited about the multiple 
undo function of course. 
 
However I very quickly noticed that if I specify a setting for 
PlotMarkers in the ErrorListPlot  ... 
 
- asked by nate (2 votes) 
 
---------------------------- 
 
[Unique CellID in-between 
notebooks]\url{http://mathematica.stackexchange.com/questions/55968/unique- 
cellid-in-between-notebooks} 
 
Documentation says that CellID is guaranteed to be unique for a given 
notebook. 
I've noticed that CellID are fairly high numbers and although 
probabilistically speaking the odds of coincidence are  ... 
 
- asked by Ranza (2 votes)

7.24 July 22, 2014

 
================================== 
Top new questions this week: 
================================== 
 
[DeleteDuplicatesBy is not performing as I'd hoped. Am I missing 
something?]\url{http://mathematica.stackexchange.com/questions/55294/delete 
duplicatesby-is-not-performing-as-id-hoped-am-i-missing-something} 
 
Deja vu: a new-in-v10 function should provide a better solution to an 
old problem, but my enthusiasm is curbed when I run timings.  This time 
the function is DeleteDuplicatesBy and while its  ... 
 
- asked by Mr.Wizard (18 votes), answered by Jacob Akkerboom (23 votes) 
 
---------------------------- 
 
[Mathematica 10 Notebook Fonts Look 
Bad]\url{http://mathematica.stackexchange.com/questions/55071/mathematica-1 
0-notebook-fonts-look-bad} 
 
I've upgraded my home installation of Mathematica from version 9 to 10 
today on a Windows 8.1 machine, and I'm getting a weird font issue - the 
fonts are not anti-aliased, and look unbalanced and  ... 
 
- asked by Gleno (17 votes), answered by Tetsuo Ichii (17 votes) 
 
---------------------------- 
 
[Mathematica 10 funny bug / Easter 
egg?]\url{http://mathematica.stackexchange.com/questions/55081/mathematica- 
10-funny-bug-easter-egg} 
 
I have no idea what is happening here. 
I'm using Mathematica 10. 
 
I mistyped "FriendNetwork" as "FriendsNetwork" and got a weird result: 
 
 
 
The option "FriendsNetwork" is not even listed in the help  ... 
 
- asked by Space monkey (17 votes), answered by Pickett (20 votes) 
 
---------------------------- 
 
[Why does ImportString["1c", "Table"] eat the letter 
c?]\url{http://mathematica.stackexchange.com/questions/55245/why-does-impor 
tstring1c-table-eat-the-letter-c} 
 
I have some whitespace-separated matrix data that I read with 
Import[..., "Table"].  The data contained mixed strings and numbers (the 
strings are for row and column names). 
 
I noticed this weird  ... 
 
- asked by Szabolcs (14 votes), answered by Szabolcs (16 votes) 
 
---------------------------- 
 
[HoldForm doesn't hold 
form]\url{http://mathematica.stackexchange.com/questions/55506/holdform-doe 
snt-hold-form} 
 
In Mathematica version 10, HoldForm no longer produces the same results 
as in version 8 (edit: I only have versions 10 and 8 installed, so can't 
compare to version 9 directly). Here are some examples  ... 
 
- asked by Jens (12 votes), answered by Simon Woods (4 votes) 
 
---------------------------- 
 
[Why does WRI not provide symbolic solution(s) to Heat 
equation?]\url{http://mathematica.stackexchange.com/questions/55546/why-doe 
s-wri-not-provide-symbolic-solutions-to-heat-equation} 
 
Why does WRI not provide symbolic solution(s) to Heat equation? 
 
or more generally, Green functions to known PDEs 
 
I am interested in variations of the heat equation: 
 
 
 
I understand that Mathematica  ... 
 
- asked by chris (12 votes) 
 
---------------------------- 
 
[BarLegend changes in Version 
10]\url{http://mathematica.stackexchange.com/questions/55150/barlegend-chan 
ges-in-version-10} 
 
Apparently, BarLegend in version 10 displays tick legends in scientific 
notation when they are smaller in magnitude than 0.01.  For instance, 
 
BarLegend[{"Rainbow", {-.015, .015}}, 
LabelStyle -&gt;  ... 
 
- asked by bbgodfrey (11 votes), answered by kguler (8 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[When running Mathematica from a Linux terminal, how can I prevent a 
script from terminating upon 
logout?]\url{http://mathematica.stackexchange.com/questions/42838/when-runn 
ing-mathematica-from-a-linux-terminal-how-can-i-prevent-a-script-from} 
 
I am running Mathematica on a remote Linux cluster, by the terminal, 
using the math command.  (I do not have access to a terminal GUI.  For 
example, when I type the command mathematica, I get this  ... 
 
- asked by Andrew (11 votes), answered by shrx (2 votes) 
 
---------------------------- 
 
[Even Fibonacci 
numbers]\url{http://mathematica.stackexchange.com/questions/37266/even-fibo 
nacci-numbers} 
 
Today, I found the Euler Project. Problem #2 is 
 
 
Each new term in the Fibonacci sequence is generated by adding the 
previous two terms. By starting with 1 and 2, the first 10 terms will 
be: 
 
1,  ... 
 
- asked by Tangshutao (22 votes), answered by rcollyer (29 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[LibraryLink: is WolframLibraryData libData 
persistent?]\url{http://mathematica.stackexchange.com/questions/54962/libra 
rylink-is-wolframlibrarydata-libdata-persistent} 
 
I am writing some C++ code that I want to call both through LibraryLink 
and independently from Mathematica.  Thus it must be compatible with 
LibraryLink but not depend on it. 
 
When calling it from  ... 
 
- asked by Szabolcs (3 votes) 
 
---------------------------- 
 
[Issuing user-defined messages takes a long time (Message is 
slow)]\url{http://mathematica.stackexchange.com/questions/55069/issuing-use 
r-defined-messages-takes-a-long-time-message-is-slow} 
 
Issuing messages takes a very long time in version 9 and version 10. 
Can others reproduce this?  Is there a fix? 
 
Update:  This is slow only when using the front end, but not when 
running the kernel  ... 
 
- asked by Szabolcs (6 votes) 
 
---------------------------- 
 
[Report: IgnoringInactive: a 
bug?]\url{http://mathematica.stackexchange.com/questions/55462/report-ignor 
inginactive-a-bug} 
 
Just to report. 
 
IgnoringInactiveshould work with Cases. In agreement with the things 
written at the Documentation Center this: 
 
Cases[{Cos[a], Inactive[Cos][b]}, IgnoringInactive[Cos[x_]]] 
 
 
works  ... 
 
- asked by Alexei Boulbitch (9 votes) 

7.25 July 15, 2014

================================== 
Top new questions this week: 
================================== 
 
[How to make use of 
Associations?]\url{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 (38 votes), answered by Leonid Shifrin (36 votes) 
 
---------------------------- 
 
[PositionIndex is horribly 
slow]\url{http://mathematica.stackexchange.com/questions/54853/positioninde 
x-is-horribly-slow} 
 
I do not know how best to formulate this as a question but the new 
PositionIndex is horribly slow. 
 
Using Szabolcs's clever GatherBy inversion we can implement our own 
function for comparison: 
 
... 
 
- asked by Mr.Wizard (25 votes), answered by Taliesin Beynon (15 votes) 
 
---------------------------- 
 
[Is it possible to define new 
PlotTheme?]\url{http://mathematica.stackexchange.com/questions/54545/is-it- 
possible-to-define-new-plottheme} 
 
In version 10 one can define, say, 
 
$PlotTheme = "Scientific" 
 
 
Which changes the appearance of all plots. This is fantastic because on 
the one hand, I can have nice plots very easily and globally  ... 
 
- asked by Yi Wang (19 votes), answered by Mr.Wizard (12 votes) 
 
---------------------------- 
 
[What information is sent to Wolfram Research when loading or working 
with 
Mathematica?]\url{http://mathematica.stackexchange.com/questions/54921/what 
-information-is-sent-to-wolfram-research-when-loading-or-working-with-ma 
them} 
 
Recently I am told that information unknown to the user is sent to 
Wolfram Servers. Is there any truth behind it ? I was told that more 
than just an IP address of the user is sent to them and that  ... 
 
- asked by nathan (18 votes) 
 
---------------------------- 
 
[How to disable the small pop-up windows when mouse is over a 
Mathematica command in 
V10?]\url{http://mathematica.stackexchange.com/questions/52406/how-to-disab 
le-the-small-pop-up-windows-when-mouse-is-over-a-mathematica-command} 
 
In version 10, when the mouse is over a Mathematica command, a small 
pop-up window comes up that one can click on for help on the command. 
 
Is there an option to disable this feature?  Screen shot: 
 
 
 
... 
 
- asked by Nasser (17 votes), answered by Martin John Hadley (17 votes) 
 
---------------------------- 
 
[What's the difference between Inactive and 
HoldForm?]\url{http://mathematica.stackexchange.com/questions/54556/whats-t 
he-difference-between-inactive-and-holdform} 
 
In version 10, Mathematica not only added Inactive / Activate but also 
highlighted this change in the "New in 10" page (in Core Language 
Enhancements). Thus, I suppose it should be something useful.  ... 
 
- asked by Yi Wang (14 votes), answered by mfvonh (11 votes) 
 
---------------------------- 
 
[Mma 10: Half the parallel power (Mac 
Pro)?]\url{http://mathematica.stackexchange.com/questions/54553/mma-10-half 
-the-parallel-power-mac-pro} 
 
Here is a comparison of the parallel kernels launched under  Mathematica 
under v9 and v10, on the same identical current 2014 R2-D2 Mac Pro ... 
 
Under v9.01 
 
$ProcessorCount 
 
 
 
12 
 
 
Issuing: 
 
... 
 
- asked by wolfies (14 votes), answered by Szabolcs (10 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Calling MATLAB from 
Mathematica]\url{http://mathematica.stackexchange.com/questions/10231/calli 
ng-matlab-from-mathematica} 
 
How can I call MATLAB functions directly from Mathematica and transfer 
data/variables between the two systems? 
 
 
- asked by siva82kb (33 votes), answered by Szabolcs (43 votes) 
 
---------------------------- 
 
[What is the best Mathematica tutorial for young 
people?]\url{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  ... 
 
- asked by noisy (33 votes), answered by Vitaliy Kaurov (17 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[possible bug in Mathematica TeXForm? Generating 
\left\left]\url{http://mathematica.stackexchange.com/questions/54857/possib 
le-bug-in-mathematica-texform-generating-left-left} 
 
I asked about this in the TeX chat. It seems Mathematica generate 
invalid Latex in this example. 
 
ClearAll[y,x]; 
ode = D[y[x], x] - (y[x]^2 + 1)/(Abs[y[x] + (1 + y[x])^(1/2)]*(1 + 
x)^(3/2)); 
... 
 
- asked by Nasser (2 votes) 
 
---------------------------- 
 
[How to get a uniformly distributed list of points from a B-spline 
function]\url{http://mathematica.stackexchange.com/questions/54841/how-to-g 
et-a-uniformly-distributed-list-of-points-from-a-b-spline-function} 
 
I created a spline function from a list of points and made a plot as 
follows: 
 
list2 = {{3.93453, -0.623168}, {3.79708, -0.187231}, {3.72835, 
0.0307369}, {3.65963, 0.248705}, {3.5909, 0.466673},  ... 
 
- asked by Kaisey (1 vote) 
 
---------------------------- 
 
[Autocomplete of non-global 
functions]\url{http://mathematica.stackexchange.com/questions/54827/autocom 
plete-of-non-global-functions} 
 
In Mathematica 9 and 10 they added autocompletion. Out of the box this 
works great, but when I set the CellContext to "Notebook" instead of the 
default "Global" (following this) it no longer  ... 
 
- asked by Anders (7 votes)

7.26 July 8,2014

================================== 
Top new questions this week: 
================================== 
 
[Quick way to use conditioned patterns when defining multi-argument 
function?]\url{http://mathematica.stackexchange.com/questions/52057/quick-w 
ay-to-use-conditioned-patterns-when-defining-multi-argument-function} 
 
I have a simple function that is supposed to only accept numeric values 
(i.e. complex/real numbers and constant symbols e.g. Pi, E). 
 
$$f(a,b,c)=a+b+c$$ 
 
Edit: I should have chosen a less simple  ... 
 
- asked by seismatica (13 votes), answered by Mr.Wizard (14 votes) 
 
---------------------------- 
 
[ToExpression fails with long nested string 
expressions]\url{http://mathematica.stackexchange.com/questions/52097/toexp 
ression-fails-with-long-nested-string-expressions} 
 
Consider the following conversion from String to Mathematica Expression: 
 
n = 10; 
ToExpression[Table["{", {n}] &lt;&gt; Table["}", {n}]] 
 
 
 
{{{{{{{{{{}}}}}}}}}} 
 
 
 
Everything is fine. 
 
However, when  ... 
 
- asked by shrx (10 votes), answered by Mr.Wizard (7 votes) 
 
---------------------------- 
 
[The mysterious gap inside 
Grid]\url{http://mathematica.stackexchange.com/questions/52185/the-mysterio 
us-gap-inside-grid} 
 
There's this gap inside Grid which I cannot seem to remove. Perhaps 
someone knows how. 
 
blocks = Table[{Graphics[{Darker@Green, Rectangle[{0, 0}, {1000, 
200}]}]}, {i, 6}] 
myGrid = Grid[blocks,  ... 
 
- asked by Jonie (8 votes), answered by Mr.Wizard (3 votes) 
 
---------------------------- 
 
[Why are functions called first-class objects in 
Mathematica?]\url{http://mathematica.stackexchange.com/questions/52064/why- 
are-functions-called-first-class-objects-in-mathematica} 
 
I've heard lots of people say a function is a first-class object in 
Mathematica. "Everything is an expression, including function." "There 
is no distinction between functions and data." 
 
Having read  ... 
 
- asked by Eric (8 votes), answered by nikie (12 votes) 
 
---------------------------- 
 
[Dual graph of an arbitrary (planar) 
graph]\url{http://mathematica.stackexchange.com/questions/52056/dual-graph- 
of-an-arbitrary-planar-graph} 
 
Every planar graph has a dual. How can I obtain it with Mathematica? 
 
I know that GraphData provides the DualGraph property for its named 
graphs, but I have found no method for computing the dual of  ... 
 
- asked by user16311 (7 votes), answered by Grisha Kirilin (9 votes) 
 
---------------------------- 
 
[256 Shades of 
Grey]\url{http://mathematica.stackexchange.com/questions/52099/256-shades-o 
f-grey} 
 
I noticed that the following line, 
 
Image[Table[x, {y, 1, 250}, {x, 30/256, 40/256, 0.02/256}], 
Magnification -&gt; 1] 
 
 
results in the following image: 
 
 
 
In the preceding image, there are 10  ... 
 
- asked by DumpsterDoofus (7 votes), answered by joojaa (5 votes) 
 
---------------------------- 
 
[Implementing key-value associations in Mathematica 9 with inexact 
numbers for 
keys]\url{http://mathematica.stackexchange.com/questions/51997/implementing 
-key-value-associations-in-mathematica-9-with-inexact-numbers-for-ke} 
 
I'm not sure of what type of problem my issue falls into, so I haven't 
been able to search forums with any success. If this has already been 
solved then my apologies! 
 
Essentially I'm trying to set a  ... 
 
- asked by Andrew Stewart (7 votes), answered by Michael E2 (2 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Is Mathematica an Implementation of the Wolfram 
Language?]\url{http://mathematica.stackexchange.com/questions/37557/is-math 
ematica-an-implementation-of-the-wolfram-language} 
 
I am trying to figure out what the announcement of the Wolfram Language 
means for Mathematica. 
 
Is Mathematica an implementation of the Wolfram Language, or is it 
something else? 
 
 
- asked by Eric Brown (43 votes), answered by Joel Klein (18 votes) 
 
---------------------------- 
 
[Calling MATLAB from 
Mathematica]\url{http://mathematica.stackexchange.com/questions/10231/calli 
ng-matlab-from-mathematica} 
 
How can I call MATLAB functions directly from Mathematica and transfer 
data/variables between the two systems? 
 
 
- asked by siva82kb (33 votes), answered by Szabolcs (43 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Compiled 
NormFunction]\url{http://mathematica.stackexchange.com/questions/52202/comp 
iled-normfunction} 
 
I would like to use a user-defined NormFunction with NDSolve, e.g., 
 
NormFunction -&gt; (Norm[Take[#, 2], \[Infinity]] &amp;) 
 
 
which says that the infinity norm should be used on the first two state 
... 
 
- asked by jaclea (1 vote) 
 
---------------------------- 
 
[Calculating probabilities 
symbolically]\url{http://mathematica.stackexchange.com/questions/51994/calc 
ulating-probabilities-symbolically} 
 
Is there a way to solve for statistical quantities 
analytically/symbolically in Mathematica? 
 
example 1: 
Lets say that I want to do a calculation that requires Bayes theorem. 
 
I know p(a), p(b) and  ... 
 
- asked by kamula (5 votes) 
 
---------------------------- 
 
[How to implement nested With as a single construct using functional 
programming 
(Fold)?]\url{http://mathematica.stackexchange.com/questions/51976/how-to-im 
plement-nested-with-as-a-single-construct-using-functional-programming} 
 
It is possible to define my own With construct where each local constant 
can depend on the previous defined local constants? 
 
I wish to replace something like this 
 
With[{m=10}, 
With[{h=1/m}, 
... 
 
- asked by unlikely (1 vote) 

7.27 July 1, 2014

================================== 
Top new questions this week: 
================================== 
 
[Fitting points to tilted, off-center 
ellipse]\url{http://mathematica.stackexchange.com/questions/51491/fitting-p 
oints-to-tilted-off-center-ellipse} 
 
I have 24 x-y points that are supposed to form an ellipse. 
 
... 
 
- asked by seismatica (15 votes), answered by ubpdqn (17 votes) 
 
---------------------------- 
 
[Combining BarChart and Grid - IPCC 
style]\url{http://mathematica.stackexchange.com/questions/51708/combining-b 
archart-and-grid-ipcc-style} 
 
I would like to combine a plot with a table. Something like this famous 
plot/table from IPCC: 
 
 
 
So after reading Combining graphics &amp; lists / tables I tried an 
approach using Grid. Pretty  ... 
 
- asked by gogoolplex (12 votes), answered by Oska (4 votes) 
 
---------------------------- 
 
[How to implement Donald Knuth's up-arrow 
notation]\url{http://mathematica.stackexchange.com/questions/51657/how-to-i 
mplement-donald-knuths-up-arrow-notation} 
 
How does one enter very large numbers in up-arrow notation? Up-arrow 
notation was created by Donald Knuth to write very large numbers in it 
iterated exponentiation form, for example 63 = 6^6^6. 
 
 
- asked by user4401 (12 votes), answered by Szabolcs (20 votes) 
 
---------------------------- 
 
[Is there a way to increase the smoothness of a 
cylinder?]\url{http://mathematica.stackexchange.com/questions/51565/is-ther 
e-a-way-to-increase-the-smoothness-of-a-cylinder} 
 
I am using Cylinder to produce wide flat disks (in Mathematica 8). This 
works just fine except that the circular base of such a cylinder turns 
out to be really just a 40-gon which is simply too coarse  ... 
 
- asked by Burkard Polster (11 votes), answered by Mr.Wizard (13 votes) 
 
---------------------------- 
 
[Efficient way to build a certain quadratic 
matrix]\url{http://mathematica.stackexchange.com/questions/51798/efficient- 
way-to-build-a-certain-quadratic-matrix} 
 
For odd n I'm looking for a short and swift way to construct with (f.e.) 
 
n = 3 
 
 
 
 
n = 11 
 
 
 
 
n=1111 
 
 
 
 
 
- asked by eldo (9 votes), answered by RunnyKine (8 votes) 
 
---------------------------- 
 
[Finding maximum or minimum of implicit 
functions]\url{http://mathematica.stackexchange.com/questions/51679/finding 
-maximum-or-minimum-of-implicit-functions} 
 
is there any built in function that can be used to find maximum or 
minimum of implicit functions? 
 
For example, if we have the equation 
$$x^2 + y^2 = (2 x^2 + 2 y^2 - x)^2,$$ 
then we can visualize the  ... 
 
- asked by Algohi (7 votes), answered by Kuba (15 votes) 
 
---------------------------- 
 
[How can a power of 0 or 1 be 
replaced?]\url{http://mathematica.stackexchange.com/questions/51585/how-can 
-a-power-of-0-or-1-be-replaced} 
 
Consider this given example for ReplaceAll 
 
1 + x^2 + x^4 /. x^p_ -&gt; f[p] 
 
 
This returns 1+f[2]+f[4] - works good (!). But if you choose 
 
In[175]:= 1 +x+ x^2 + x^4 /. x^p_ -&gt; f[p] 
Out[175]=  ... 
 
- asked by Sumit (7 votes), answered by Daniel Lichtblau (6 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Resources for beautiful Mathematica 
Stylesheets]\url{http://mathematica.stackexchange.com/questions/5846/resour 
ces-for-beautiful-mathematica-stylesheets} 
 
When the Wolfram Demonstrations were introduced and the 
Documentation-Center was redesigned, I remember it was the first time I 
thought someone had put some effort into creating a beautiful  ... 
 
- asked by halirutan (80 votes), answered by rm -rf (40 votes) 
 
---------------------------- 
 
[Get a "step by step" evaluation in 
Mathematica]\url{http://mathematica.stackexchange.com/questions/148/get-a-s 
tep-by-step-evaluation-in-mathematica} 
 
Is it possible in Mathematica to get a step-by-step evaluation of some 
functions; that's to say, outputting not only the result but all the 
stages that have led to it? 
 
Example : Let's say I want to  ... 
 
- asked by Skydreamer (53 votes), answered by  J.M. (44 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[What's a non-trivial Mathematica program involving conscious choice of 
stack vs. queue data 
structure?]\url{http://mathematica.stackexchange.com/questions/51862/whats- 
a-non-trivial-mathematica-program-involving-conscious-choice-of-stack-vs 
> } 
 
In a typical computer science algorithms course, much attention is given 
to the discussion of queues vs. stacks as a data structure programmers 
need to consciously choose from to achieve algorithmic  ... 
 
- asked by Problemaniac (1 vote) 
 
---------------------------- 
 
[Import Excel data forcing links (ie workbooks) to be 
updated]\url{http://mathematica.stackexchange.com/questions/51873/import-ex 
cel-data-forcing-links-ie-workbooks-to-be-updated} 
 
We have noticed importing data from an Excel spreadsheet doesnt update 
links. 
 
The problem with this is if you import a spreadsheet that comprises of 
linked workbooks data and those workbooks have  ... 
 
- asked by WolframFan (3 votes) 
 
---------------------------- 
 
[Smooth out contour in 
RegionPlot/ContourPlot]\url{http://mathematica.stackexchange.com/questions/ 
51518/smooth-out-contour-in-regionplot-contourplot} 
 
I would like to smooth out the jagged edges in the outermost contours in 
the following plot: 
 
I have data of values as a function of variables (x,y) in the form 
 
data =  ... 
 
- asked by Philo (1 vote) 
 
 
--- 
Subscribe to more Stack Exchange newsletters: 
<http://stackexchange.com/newsletters> 
---

7.28 June 24, 2014

================================== 
Top new questions this week: 
================================== 
 
[Longest path in 0/1 
matrix]\url{http://mathematica.stackexchange.com/questions/51247/longest-pa 
th-in-0-1-matrix} 
 
I have a matrix of 0's and 1's forming a number of disjoint paths: 
 
&nbsp; 
 
 
I would like to find the lengths of the paths, and from that "spectrum," 
the longest length (in the above example: 27,  ... 
 
- asked by Joseph O'Rourke (25 votes), answered by rm -rf (24 votes) 
 
---------------------------- 
 
[Visualization: elliptical insights into data 
sets]\url{http://mathematica.stackexchange.com/questions/51163/visualizati 
on-elliptical-insights-into-data-sets} 
 
I was recently reading the following paper on visualization techniques 
using ellipses to gain statistical insights. Elliptical visualization 
for looking at correlations has briefly been touched on  ... 
 
- asked by Pam (12 votes), answered by Pam (2 votes) 
 
---------------------------- 
 
[What is the relationship between Mathematica and Wolfram 
Desktop?]\url{http://mathematica.stackexchange.com/questions/51372/what-is- 
the-relationship-between-mathematica-and-wolfram-desktop} 
 
I'm confused about the differences among various Wolfram products. In 
particular what is the relationship among Mathematica, Mathematica 
Online, Wolfram Programming Cloud, and Wolfram Desktop? 
 
Are  ... 
 
- asked by raxacoricofallapatorius (12 votes), answered by mfvonh (8 
votes) 
 
---------------------------- 
 
[Find intersection of pairs of straight 
lines]\url{http://mathematica.stackexchange.com/questions/51391/find-inters 
ection-of-pairs-of-straight-lines} 
 
I have a list of 24 points, in which 2 consecutive points (1st and 2nd, 
3rd and 4th, ...) are supposed to form a line. 
 
p1={{243.8, 77.}, {467.4, 12.}, {291.8, 130.}, {476., 210.5}, {103.2, 
327.},  ... 
 
- asked by seismatica (6 votes), answered by eldo (9 votes) 
 
---------------------------- 
 
[What is wrong about Abs[x]-a? Is it a 
bug?]\url{http://mathematica.stackexchange.com/questions/51118/what-is-wron 
g-about-absx-a-is-it-a-bug} 
 
 
 
Why is the Out[74] not {1 - a, {x -&gt; -1}}? 
 
Maximize[{Sqrt[x^2] - a, -1 &lt;= x &lt;= 1}, x] 
 
 
 
{1 - a, {x -&gt; -1}} 
 
 
 
 
- asked by fptan (6 votes), answered by RiemannZeta (4 votes) 
 
---------------------------- 
 
[Find the smallest positive integer that satisfies a certain 
condition]\url{http://mathematica.stackexchange.com/questions/51086/find-th 
e-smallest-positive-integer-that-satisfies-a-certain-condition} 
 
I know Mathematica is really powerful when it comes to functional 
operations like applying a list of tasks to a list of variables. 
Sometimes I feel like it isn't the most powerful tool when it comes  ... 
 
- asked by cartonn (6 votes), answered by mfvonh (9 votes) 
 
---------------------------- 
 
[Why am I getting wildly incorrect results from 
FirstPassageTimeDistribution with inexact transition 
matrix?]\url{http://mathematica.stackexchange.com/questions/51018/why-am-i- 
getting-wildly-incorrect-results-from-firstpassagetimedistribution-with> 
) 
 
Working on some large systems using DiscreteMarkovProcess, I changed the 
transition matrix to machine precision vs using exact values, which sped 
things up handily. The only problem was for edge  ... 
 
- asked by rasher (6 votes), answered by Bhuvanesh (4 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[How many Christmas 
gifts?]\url{http://mathematica.stackexchange.com/questions/39338/how-many-c 
hristmas-gifts} 
 
This question is based on the old song, The Twelve Days of Christmas 
 
In a comment made on a recent question, Yves Klett remarked, "no 
seasonal questions this year?" This reminded me of one I solved  ... 
 
- asked by m_goldberg (18 votes), answered by rm -rf (23 votes) 
 
---------------------------- 
 
[Generating visually pleasing circle 
packs]\url{http://mathematica.stackexchange.com/questions/40334/generating- 
visually-pleasing-circle-packs} 
 
EDIT: I want to thank you all guys for this unexpected intellectual and 
artistic journey. Hope you enjoyed as I did. 
 
I would like to generate a circle pack that mimics this: (don't pay 
attention on  ... 
 
- asked by VividD (60 votes), answered by level1807 (36 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Solve set of non-linear equations with least-squares-fitting - 
constrain 
results?]\url{http://mathematica.stackexchange.com/questions/51274/solve-se 
t-of-non-linear-equations-with-least-squares-fitting-constrain-results} 
 
I'm trying to solve a set of functions to determine the material 
properties from a set of measurement values. (To set up this method I 
just want to fit my model with some already calculated data). 
 
My  ... 
 
- asked by dummesschaf (1 vote) 
 
---------------------------- 
 
[what is the best package/way to insert Mathematica code in latex 
docs?]\url{http://mathematica.stackexchange.com/questions/51215/what-is-the 
-best-package-way-to-insert-mathematica-code-in-latex-docs} 
 
I know that this question is not about strictly mathematica issue, but I 
think that in this site should be many pepople that use latex to 
distribute mathematica source code/examples. 
If the moderators  ... 
 
- asked by Mika Ike (1 vote) 
 
---------------------------- 
 
[How to force the compilation language to be C++ (not C) in 
CreateExecutable or 
CreateLibrary]\url{http://mathematica.stackexchange.com/questions/51012/how 
-to-force-the-compilation-language-to-be-c-not-c-in-createexecutable-or- 
c} 
 
I'm trying to speed up a section of a Mathematica 9.0.1 notebook by 
performing some calculations in C++ with the Cilk Plus and Threading 
Building Blocks tools available for the Intel C++ 14.0 compiler  ... 
 
- asked by user15996 (4 votes) 

7.29 June 17, 2014

================================== 
Top new questions this week: 
================================== 
 
[Smooth Peter de Jong 
attractor]\url{http://mathematica.stackexchange.com/questions/50839/smooth- 
peter-de-jong-attractor} 
 
Today I was playing with Peter de Jong attractor. 
 
At the bottom of the page I've linked there are beautiful examples like: 
 
 
My attempts are not so great: 
 
 
 
It is around 10^5 points. For more than  ... 
 
- asked by Kuba (17 votes), answered by KennyColnago (15 votes) 
 
---------------------------- 
 
[How would you efficiently implement 
BinListsBy?]\url{http://mathematica.stackexchange.com/questions/50559/how-w 
ould-you-efficiently-implement-binlistsby} 
 
Let's say I have a list like this: 
 
data = {{21, "Alice"}, {27, "Bob"}, {22, "Charles"}, {34, "Dora"}, {75, 
"Eliza"}} 
 
 
containing ages and names of persons. What I would like is a list of 
e.g.  ... 
 
- asked by nikie (9 votes), answered by Mr.Wizard (8 votes) 
 
---------------------------- 
 
[Mathematica outliner's 
capabilities]\url{http://mathematica.stackexchange.com/questions/50637/math 
ematica-outliners-capabilities} 
 
As my notebooks get larger, I often try to organize them with 
titles/subtitles etc, structuring them as an outliner 
(http://en.wikipedia.org/wiki/Outliner) 
 
This also helps me as I try to structure a  ... 
 
- asked by alessandro (8 votes), answered by Mike Honeychurch (7 votes) 
 
---------------------------- 
 
[Control BarLegend 
size]\url{http://mathematica.stackexchange.com/questions/50913/control-barl 
egend-size} 
 
I want to plot a big 2D array of experiment data. I need plot axes and 
tick labels as well as a bar legend using BarLegend: 
 
ArrayPlot[ 
Array[RandomInteger[100] &amp;, {100, 100}], 
PlotLegends -&gt;  ... 
 
- asked by Johu (6 votes), answered by Johu (6 votes) 
 
---------------------------- 
 
[Skip header lines on 
import]\url{http://mathematica.stackexchange.com/questions/50718/skip-heade 
r-lines-on-import} 
 
When importing a data file what are the comment symbols for Mathematica? 
That is, given a file like this 
 
blabla 
bulbul 
 
1 2 6 54 7 ... 
.. 
 
 
what symbol do I have to put in front of header lines so  ... 
 
- asked by user3683367 (6 votes), answered by george2079 (7 votes) 
 
---------------------------- 
 
[How can I list all the 'countries 4000 km far from current 
location'?]\url{http://mathematica.stackexchange.com/questions/50786/how-ca 
n-i-list-all-the-countries-4000-km-far-from-current-location} 
 
A friend said to me on Facebook that she is 4000km away. So I want to 
try to guess where she is. 
 
How can I find which countries are a given distance from my current 
location? 
 
 
- asked by Boti (5 votes), answered by Oska (14 votes) 
 
---------------------------- 
 
[Can I automatically stop operation that is too 
slow?]\url{http://mathematica.stackexchange.com/questions/50746/can-i-autom 
atically-stop-operation-that-is-too-slow} 
 
I need to write code like this: Do operation 1, but if it takes more 
that 5 seconds then stop it and do operation 2. 
Is it possible to do this somehow without manual interruption? 
 
 
- asked by user15933 (5 votes), answered by Nasser (8 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[What is the fastest way to extract a substring from a huge 
string?]\url{http://mathematica.stackexchange.com/questions/44175/what-is-t 
he-fastest-way-to-extract-a-substring-from-a-huge-string} 
 
I develop an algorithm to find the most common substrings of a given 
length n up to a certain distance l in front of a pattern p in a huge 
sequence S. E.g. I want to find the most common hexamers  ... 
 
- asked by g3kk0 (11 votes), answered by Leonid Shifrin (9 votes) 
 
---------------------------- 
 
[When running Mathematica from a Linux terminal, how can I prevent a 
script from terminating upon 
logout?]\url{http://mathematica.stackexchange.com/questions/42838/when-runn 
ing-mathematica-from-a-linux-terminal-how-can-i-prevent-a-script-from} 
 
I am running Mathematica on a remote Linux cluster, by the terminal, 
using the math command.  (I do not have access to a terminal GUI.  For 
example, when I type the command mathematica, I get this  ... 
 
- asked by Andrew (10 votes), answered by shrx (2 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Understanding performance: graph connected 
components]\url{http://mathematica.stackexchange.com/questions/50523/unders 
tanding-performance-graph-connected-components} 
 
I need to analyze directed graphs with 10M edges, 1M vertices, and 300K 
strongly connected components, so that the largest one contains 400K 
vertices. 
 
I read some explanations of Leonid Shifrin here,  ... 
 
- asked by Grisha Kirilin (3 votes) 
 
---------------------------- 
 
[Natural boundary conditions variational 
methods]\url{http://mathematica.stackexchange.com/questions/50526/natural-b 
oundary-conditions-variational-methods} 
 
I am working on a problem of the calculus of variations. From the 
Variational Methods package, I can very conveniently use EulerEquations 
to get stationarity conditions in the form of Euler-Lagrange  ... 
 
- asked by Marijnn (1 vote) 
 
---------------------------- 
 
[How to find a scaling parameter in matrix inversion process by 
MMA?]\url{http://mathematica.stackexchange.com/questions/50660/how-to-find- 
a-scaling-parameter-in-matrix-inversion-process-by-mma} 
 
I simply would like to find the inverse of a given matrix $A$ by the 
iterative method $X_{k+1}=X_k(2I-AX_k)$ using 
$X_0=\frac{1}{\sigma_{max}^2}A^*$. An example is as follows 
 
SeedRandom[123]; m = n =  ... 
 
- asked by Fazlollah Soleymani (1 vote) 

7.30 June 10, 2014

================================== 
Top new questions this week: 
================================== 
 
[Making a Mathematica package 
manager?]\url{http://mathematica.stackexchange.com/questions/49111/making-a 
-mathematica-package-manager} 
 
I'd like to get a serious discussion started about a package manager. 
This has come up elsewhere, and many people have implemented their own 
solutions. It would be nice to have a standardized way to  ... 
 
- asked by mfvonh (10 votes), answered by mfvonh (7 votes) 
 
---------------------------- 
 
[Graph from binary matrix (not adjacency) respecting the original matrix 
positions]\url{http://mathematica.stackexchange.com/questions/50363/graph-f 
rom-binary-matrix-not-adjacency-respecting-the-original-matrix-position> 
) 
 
 
 
I have a binary matrix. My objective is to connect every close (without 
"jump") elements with value equal to 1, but I must keep the point 
positions, just like it's shown at the image. 
 
Can somebody  ... 
 
- asked by Jazz (9 votes), answered by Oska (11 votes) 
 
---------------------------- 
 
[Using Mathematica to make a graphics array of 
circles]\url{http://mathematica.stackexchange.com/questions/49176/using-mat 
hematica-to-make-a-graphics-array-of-circles} 
 
I need to make .svg file that contains an array of black circles that 
all have radii of 5 units ad are evenly spaced apart from each other 32 
units. 
 
The difficulty in creating this design is the  ... 
 
- asked by Sebastian Freeman (9 votes), answered by halirutan (3 votes) 
 
---------------------------- 
 
[CSS Selectors for Symbolic 
XML]\url{http://mathematica.stackexchange.com/questions/49052/css-selectors 
-for-symbolic-xml} 
 
Symbolic XML is a convenient way of managing XML in Mathematica, at 
least for casual use or small tasks. Here and elsewhere you can find 
examples of XML handling in Mathematica, including XSLT/XPath  ... 
 
- asked by Fallible (8 votes), answered by Fallible (12 votes) 
 
---------------------------- 
 
[Complement of 
multisets]\url{http://mathematica.stackexchange.com/questions/49068/complem 
ent-of-multisets} 
 
Given lists $a$ and $b$, which represent multisets, how can I compute 
the complement $a\setminus b$? 
 
I'd like to construct a function xunion that returns the symmetric 
difference of multisets. 
For  ... 
 
- asked by Leon Lampret (8 votes), answered by rasher (8 votes) 
 
---------------------------- 
 
[Thread over uneven (ragged) expressions with full 
functionality?]\url{http://mathematica.stackexchange.com/questions/49359/th 
read-over-uneven-ragged-expressions-with-full-functionality} 
 
There are a number of questions on this site about "threading" including 
several relating to uneven (ragged) lists.  However, none that I could 
find deal with the full functionality of Thread but  ... 
 
- asked by Mr.Wizard (7 votes), answered by mfvonh (5 votes) 
 
---------------------------- 
 
[Hatched Filling for 
ListPlot]\url{http://mathematica.stackexchange.com/questions/49202/hatched- 
filling-for-listplot} 
 
I am plotting to data curves using ListLinePlot. I like the look of 
Filling, but this is going to be printed, so I want something both black 
and white friendly, but giving more definition and  ... 
 
- asked by ThomasH (7 votes), answered by ThomasH (4 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Finding real roots of negative numbers (for example, 
$\sqrt[3]{-8}$)]\url{http://mathematica.stackexchange.com/questions/3886/fi 
nding-real-roots-of-negative-numbers-for-example-sqrt3-8} 
 
Say I want to quickly calculate $\sqrt[3]{-8}$, to which the most 
obvious solution is $-2$. 
 
When I input $\sqrt[3]{-8}$ or Power[-8, 3^-1], Mathematica gives the 
result "$2 (-1)^{1/3}$". Not what I  ... 
 
- asked by jtbandes (31 votes), answered by Brett Champion (10 votes) 
 
---------------------------- 
 
[Is it possible to export the equations from Mathematica to 
MATLAB?]\url{http://mathematica.stackexchange.com/questions/14035/is-it-pos 
sible-to-export-the-equations-from-mathematica-to-matlab} 
 
Is it possible to export the output expressions from Mathematica 
computations (e.g., equations) in valid MATLAB syntax? 
 
 
- asked by Seyhmus Gungoren (14 votes), answered by rm -rf (20 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Relative performance of the Julia 
language]\url{http://mathematica.stackexchange.com/questions/50391/relative 
-performance-of-the-julia-language} 
 
I was just reviewing the Mathematica benchmark code linked from the 
Julia language home page http://julialang.org/. The stated goal of the 
benchmarks is to test the performance of specific algorithms,  ... 
 
- asked by TheDoctor (2 votes) 
 
---------------------------- 
 
[Help wanted in evaluating an 
integral]\url{http://mathematica.stackexchange.com/questions/49319/help-wan 
ted-in-evaluating-an-integral} 
 
Trying to evaluate an integral. To be specific, I'm trying to find the 
expectation value of $x^2$ for the ground state of hydrogen. Here is the 
code I used: 
 
FullSimplify[ 
Integrate[x^2/(Pi*a^3)  ... 
 
- asked by Sam (1 vote) 
 
---------------------------- 
 
[Tooltip over a picture & creating complex 
forms]\url{http://mathematica.stackexchange.com/questions/49235/tooltip-ove 
r-a-picture-creating-complex-forms} 
 
I have some picture like the one seen below. Now, I'm trying to create 
some tooltip with some descriptions when moving with the mouse over a 
body part e.g. "this is the head", "This is the left arm"  ... 
 
- asked by holistic (1 vote)

7.31 June 3, 2014

================================== 
Top new questions this week: 
================================== 
 
[Is this the most effective and efficient programming style for 
prototyping (a ray tracer) in 
Mathematica?]\url{http://mathematica.stackexchange.com/questions/48675/is-t 
his-the-most-effective-and-efficient-programming-style-for-prototyping-a 
-ra} 
 
I am trying out Mathematica as a prototyping tool.  As an initial 
exercise I have put together a brute force ray tracer, with a view to 
using Mathematica's built in probability distribution functions  ... 
 
- asked by jrp (22 votes) 
 
---------------------------- 
 
[Negative 
probability?]\url{http://mathematica.stackexchange.com/questions/48814/nega 
tive-probability} 
 
I am trying to get the sum of the squares of seven random variables, all 
uniformly distributed. This is what I tried. 
 
Probability[ 
a^2 + b^2 + c^2 + d^2 + e^2 + f^2 + g^2 &lt; 1, 
{a, b, c, d, e,  ... 
 
- asked by bobbym (18 votes), answered by m_goldberg (12 votes) 
 
---------------------------- 
 
[Aligning two 
lists]\url{http://mathematica.stackexchange.com/questions/48908/aligning-tw 
o-lists} 
 
I have two lists, L1 and L2, each with a key and some data. Let us say 
the key is a person's name, a string, and the data follows. (To respond 
to rasher's query:) Let us also assume the lists are  ... 
 
- asked by Joseph O'Rourke (8 votes), answered by Mr.Wizard (4 votes) 
 
---------------------------- 
 
[Any way I can solve this 
integral?]\url{http://mathematica.stackexchange.com/questions/48766/any-way 
-i-can-solve-this-integral} 
 
So, Mathematica can't solve it. Any workaround? 
 
\begin{equation*} 
\int_0^\pi \frac{1}{\sin\left(\frac{\theta}{2}\right)^\beta + 1} 
\mathrm{d}\theta 
\end{equation*} 
 
The code is: 
 
... 
 
- asked by user1883163 (7 votes), answered by Vitaliy Kaurov (10 votes) 
 
---------------------------- 
 
[Speed up 
ContourPlot3D]\url{http://mathematica.stackexchange.com/questions/48773/spe 
ed-up-contourplot3d} 
 
I have two issues with the following code. (1) It executes too slowly. 
If I use "Speed" instead of "Quality" for PerformanceGoal, I get the 
speed but an undesirable delay in proper rendering of the  ... 
 
- asked by Stephen (7 votes), answered by Kuba (4 votes) 
 
---------------------------- 
 
[Binarize turning image completely 
black?]\url{http://mathematica.stackexchange.com/questions/48683/binarize-t 
urning-image-completely-black} 
 
Running Binarize (or EdgeDetect) on a filled black and white image is 
resulting in an all black image. 
 
The image has the following color distribution (with most images points 
falling in either a  ... 
 
- asked by Peeter Joot (7 votes), answered by Jens (14 votes) 
 
---------------------------- 
 
[Why does Equal["string", False] not evaluate to 
False?]\url{http://mathematica.stackexchange.com/questions/48851/why-does-e 
qualstring-false-not-evaluate-to-false} 
 
Why does Equal["string", False] not evaluate to False? I would have 
thought Mathematica could prove that these two things are not equal. 
 
 
- asked by Fructose (6 votes), answered by eldo (5 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[What Mathematica book to 
buy?]\url{http://mathematica.stackexchange.com/questions/5059/what-mathemat 
ica-book-to-buy} 
 
I have used Mathematica for several years but at a pretty low level - 
piecing together built-in function inefficiently and fearing the sight 
of # and &amp;'s when I see others use them (I never do). I  ... 
 
- asked by BeauGeste (28 votes), answered by David (42 votes) 
 
---------------------------- 
 
[How to find all the local minima/maxima in a 
range]\url{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  ... 
 
- asked by Margus (35 votes), answered by Daniel Lichtblau (37 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Suspend computation so it can be resumed even after the PC is 
rebooted]\url{http://mathematica.stackexchange.com/questions/48793/suspend- 
computation-so-it-can-be-resumed-even-after-the-pc-is-rebooted} 
 
Sometimes a computation takes a long time. But when I sleep in the 
night, I want to shutdown my PC. Next morning when I wake, I want to 
start Mathematica and resume the computation. 
 
If you are  ... 
 
- asked by user565739 (3 votes) 
 
---------------------------- 
 
[Simulating a system of nonlinear 
ODEs?]\url{http://mathematica.stackexchange.com/questions/49004/simulating- 
a-system-of-nonlinear-odes} 
 
I was trying to simulate a system of ODEs on Mathematica in an effort to 
try to understand how to muck around with Mathematica but for some 
reason the following lines of code do not yield any results;  ... 
 
- asked by Gadha007 (2 votes) 
 
---------------------------- 
 
[Documentation build failed with 
Workbench]\url{http://mathematica.stackexchange.com/questions/48958/documen 
tation-build-failed-with-workbench} 
 
I'm starting to use Wolfram Workbench 2 to develop a Mathematica 
package.  For the first time I tried "Documentation - Build" under the 
"Application Tools" but got fatal errors: 
 
BUILD FAILED 
... 
 
- asked by Chris K (2 votes) 
 
 
---

7.32 May 27 2014

================================== 
Top new questions this week: 
================================== 
 
[Why won't Parallelize speed up my code?] 
<http://mathematica.stackexchange.com/questions/48295/why-wont-parallelize-speed-up-my-code> 
 
What reasons are there that can cause parallelized Mathematica code not 
to run with full performance? 
 
 
- asked by Szabolcs (18 votes), answered by Szabolcs (26 votes) 
 
---------------------------- 
 
[High-quality RegionPlot3D for logical combinations of 
predicates]\url{http://mathematica.stackexchange.com/questions/48486/high-q 
uality-regionplot3d-for-logical-combinations-of-predicates} 
 
Unlike RegionPlot, RegionPlot3D copes poorly with logical combinations 
of predicates (&amp;&amp;, ||), which should result in sharp edges in 
the region to be plotted. Instead, these edges are usually  ... 
 
- asked by Rahul Narain (11 votes), answered by Simon Woods (10 votes) 
 
---------------------------- 
 
[Correct way to integrate a certain 
function]\url{http://mathematica.stackexchange.com/questions/48437/correct- 
way-to-integrate-a-certain-function} 
 
I want to integrate 
$$ 
\int_{0}^{2\pi} dt_1  \frac{a + b*\cos(t_1 - t_2)}{c + d*\cos(t_1 - 
t_2)} 
$$ 
where $a, b, c, d, t_2$ are real numbers and $c + d &gt; 0$ &amp;  $0 
\leq t_2 \leq 2\pi$. 
I used  ... 
 
- asked by vik (9 votes), answered by Michael E2 (4 votes) 
 
---------------------------- 
 
[How do I get Mathematica to return a function call 
unevaluated?]\url{http://mathematica.stackexchange.com/questions/48349/how- 
do-i-get-mathematica-to-return-a-function-call-unevaluated} 
 
How do I get Mathematica to return a function call (conditionally) 
unevaluated? I expect this may use the slightly-mysterious Hold 
function. 
 
As a toy example, suppose I want to define AlgebraicQ such  ... 
 
- asked by Charles (9 votes), answered by Szabolcs (9 votes) 
 
---------------------------- 
 
[Why is plot legend 
unsafe?]\url{http://mathematica.stackexchange.com/questions/48291/why-is-pl 
ot-legend-unsafe} 
 
Every time I open a notebook contains a legend, I get the message 
warning that it's not safe. 
 
Why does this happen and how to fix it? 
 
- asked by xslittlegrass (9 votes), answered by Szabolcs (12 votes) 
 
---------------------------- 
 
[Faster way to compute the distance from a point to a surface in 
3D]\url{http://mathematica.stackexchange.com/questions/48565/faster-way-to- 
compute-the-distance-from-a-point-to-a-surface-in-3d} 
 
I am trying to compute the shortest distance between a point and a 
triangle in 3D 
 
distance[point_, {p1_, p2_, p3_}] := Module[{p, s, t, sol}, 
p = s*p1 + (1 - s)*(t*p2 + (1 - t)*p3); 
... 
 
- asked by tintin (8 votes), answered by RunnyKine (15 votes) 
 
---------------------------- 
 
[Does the syntax coloring I see indicate a real 
problem?]\url{http://mathematica.stackexchange.com/questions/48432/does-the 
-syntax-coloring-i-see-indicate-a-real-problem} 
 
I need a behaviour provided by: 
 
x = 2; 
Block[{x = HoldForm[x]}, x] 
 
x 
 
 
 
FrontEnd marks this syntax as not quite correct. 
 
It has not caused me any troubles so far so my question is: could it 
... 
 
- asked by Kuba (8 votes), answered by halirutan (6 votes) 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[How many Christmas 
gifts?]\url{http://mathematica.stackexchange.com/questions/39338/how-many-c 
hristmas-gifts} 
 
This question is based on the old song, The Twelve Days of Christmas 
 
In a comment made on a recent question, Yves Klett remarked, "no 
seasonal questions this year?" This reminded me of one I solved  ... 
 
- asked by m_goldberg (18 votes), answered by rm -rf (23 votes) 
 
---------------------------- 
 
[How to generate a random 
snowflake]\url{http://mathematica.stackexchange.com/questions/39361/how-to- 
generate-a-random-snowflake} 
 
'Tis the season... 
And it's about time I posed my first question on Mathematica Stack 
Exchange. 
So, here's an holiday quest for you Graphics (and P-Chem?) gurus. 
 
What is your best code for generating  ... 
 
- asked by Peltio (87 votes), answered by Silvia (117 votes) 
 
================================== 
Can you answer these? 
================================== 
 
[Diagonalization in 
parallel]\url{http://mathematica.stackexchange.com/questions/48416/diagonal 
ization-in-parallel} 
 
I would like to diagonalize one unitary non-sparse matrix of size 12870 
with complex number entries (not symbols, this is really a numerical 
problem). Is is possible to make eigensystem run in  ... 
 
- asked by lagoa (1 vote) 
 
---------------------------- 
 
[Package 
FiniteFields]\url{http://mathematica.stackexchange.com/questions/48379/pack 
age-finitefields} 
 
In a Mathematica session, I evaluate: 
 
Needs["FiniteFields`"]; 
fld = GF[2]; 
 
 
Now, for example, I'd like to compute $a^3+a^5$ for $a \in{Z_2}$. The 
result I'd like to have is $0$, because in $Z_2$,  ... 
 
- asked by user14545 (1 vote) 
 
---------------------------- 
[When to use indexed 
variables]\url{http://mathematica.stackexchange.com/questions/48602/when-to 
-use-indexed-variables} 
 
Still learning the fundamentals of the language I would like to ask you 
what advantages there might be in writing something like: 
 
a[1] = 2; 
a[2] = 4; 
a[3] = "x"; 
 
 
It seems to me that it is always  ... 
 
- asked by eldo (3 votes)

7.33 May 20 2014

================================== 
Top new questions this week: 
================================== 
 
[How can I get the color of overlapping disks to be equal in any 
order?]\url{http://mathematica.stackexchange.com/questions/47809/how-can-i- 
get-the-color-of-overlapping-disks-to-be-equal-in-any-order} 
 
When Graphics is used, necessarily the objects come in order. This 
affects which ones obscure others. When Opacity is not 1, it also 
affects the color. I would like the color of overlaps to depend  ... 
 
- asked by Russ Lyons (19 votes), answered by Mr.Wizard (9 votes) 
 
---------------------------- 
 
[Bug in mathematica analytic 
integration?]\url{http://mathematica.stackexchange.com/questions/48113/bug- 
in-mathematica-analytic-integration} 
 
I found Mathematica provides me a wrong answer for a relatively simple 
analytically solvable integral: 
 
Integrate[Exp[-I\[Theta]]/(1+b Cos[\[Theta]]),{\[Theta],0,2\[Pi]} 
Assumptions -&gt; b &lt; 1 &amp;&amp; b  ... 
 
- asked by user14456 (14 votes), answered by Artes (14 votes) 
 
---------------------------- 
 
[how to make a pie chart using custom 
image]\url{http://mathematica.stackexchange.com/questions/48078/how-to-make 
-a-pie-chart-using-custom-image} 
 
Can we make a pie chart using a costumed picture? 
For example, in representing the 0.1 cent, I would like to use this 
image and cut a piece out, and make a clickable pie chart. Any 
suggestions are  ... 
 
- asked by xslittlegrass (13 votes), answered by belisarius (20 votes) 
 
---------------------------- 
 
[Undocumented use of Integrate: Integrating over 
regions]\url{http://mathematica.stackexchange.com/questions/48166/undocumen 
ted-use-of-integrate-integrating-over-regions} 
 
I have come across a few questions asking about integrating over 
regions. And while the answers are impressive there should be a better 
more consistent way. So my question is, are there ways,  ... 
 
- asked by RunnyKine (12 votes), answered by RunnyKine (15 votes) 
 
---------------------------- 
 
[Rebuild a polygon so it doesn't self 
intersect]\url{http://mathematica.stackexchange.com/questions/48091/rebuild 
-a-polygon-so-it-doesnt-self-intersect} 
 
If you consider the following Polygon: 
 
coor = {{6, 0}, {6, 1}, {4, 0}, {5, 2}}; 
(* and coor = {{7, 2}, {7, 1}, {5, 2}, {6, 1}} *) 
pol = Polygon@coor; 
Graphics@pol 
 
I would like to know if there is  ... 
 
- asked by Oska (10 votes), answered by Rahul Narain (10 votes) 
 
---------------------------- 
 
[Exp is slower for some number 
ranges]\url{http://mathematica.stackexchange.com/questions/47982/exp-is-slo 
wer-for-some-number-ranges} 
 
I get a hit on performance with the Exp function depending on the range 
of my inputs.  for example, with: 
 
w1 = RandomComplex[-20000 I, {10000000}]; 
Exp[w1]; // Timing 
 
w2 = RandomComplex[-20 I,  ... 
 
- asked by user173743 (10 votes) 
 
---------------------------- 
 
[Determine frequency of 
oscillations]\url{http://mathematica.stackexchange.com/questions/47917/dete 
rmine-frequency-of-oscillations} 
 
I am wondering how I could determine the frequency of oscillations of a 
differential model equation? How could I find the frequency from this 
example given in Mathematica Documentation: 
 
s =  ... 
 
- asked by tarhawk (10 votes), answered by Daniel Lichtblau (15 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Generate a Unit Circle 
Trigonometry]\url{http://mathematica.stackexchange.com/questions/2456/gener 
ate-a-unit-circle-trigonometry} 
 
Struggling often with Trigonometry I would like to have some code to 
generate this Unit Circle Trigonometry. Would be of great help when I 
need to transform some data : 
 
- asked by 500 (13 votes), answered by Mark McClure (27 votes) 
 
---------------------------- 
 
[How do I plot coordinates (latitude and longitude pairs) on a 
geographic 
map?]\url{http://mathematica.stackexchange.com/questions/2076/how-do-i-plot 
-coordinates-latitude-and-longitude-pairs-on-a-geographic-map} 
 
I'm attempting for the first time to create a map within Mathematica. In 
particular, I would like to take an output of points and plot them 
according to their lat/long values over a geographic map. I  ... 
 
- asked by Peter House (37 votes), answered by kguler (24 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[How can I make sure that 3D plots have the exact same orientation and 
viewpoint?]\url{http://mathematica.stackexchange.com/questions/47996/how-ca 
n-i-make-sure-that-3d-plots-have-the-exact-same-orientation-and-viewpoin 
t} 
 
First off, I apologize that I can't come up with a simpler working 
example, but I only seem to have this problem with the larger examples. 
 
I am trying to make animations, using functions like the  ... 
 
- asked by Jason B (5 votes) 
 
---------------------------- 
 
[Why setting PlotPoints make my 3d contour plot 
broken?]\url{http://mathematica.stackexchange.com/questions/47924/why-setti 
ng-plotpoints-make-my-3d-contour-plot-broken} 
 
I'm trying to make a iso surface plot from some data using 
ContourPlot3d. My data is a 3 dimension data with form like 
{{x,y,f[x,y]},...}. I first make this data into 4d by rotating it along 
the x  ... 
 
- asked by xslittlegrass (2 votes) 
 
---------------------------- 
 
[What's the difference between variables with and without a 
subscript?]\url{http://mathematica.stackexchange.com/questions/48174/whats- 
the-difference-between-variables-with-and-without-a-subscript} 
 
If I input $x = a + b$, the $x$, $a$ and $b$ are blue. When I hit 
Shif+Enter, the $x$ turns black, indicating the kernel now knows this 
variable. But when I input $x_r = a + b$, and hit Shift+Enter,  ... 
 
- asked by user303446 (1 vote)

7.34 May 13, 2014

================================== 
Top new questions this week: 
================================== 
 
[Format and TeXForm does not work as 
expected]\url{http://mathematica.stackexchange.com/questions/47417/format-a 
nd-texform-does-not-work-as-expected} 
 
Recently, we had a nice question which brought up an issue that I 
believe is a bug. In the tutorial Defining Output Formats is an example 
at the end which doesn't make sense 
 
 
This specifies the  ... 
 
- asked by halirutan (12 votes), answered by halirutan (4 votes) 
 
---------------------------- 
 
[How to implement the Observer design 
pattern?]\url{http://mathematica.stackexchange.com/questions/47659/how-to-i 
mplement-the-observer-design-pattern} 
 
As a programmer with a history with procedural languages, the Observer 
design pattern inmediately springs to my mind when attacking certain 
class of problems, mostly UI/notifications related. 
 
A  ... 
 
- asked by Fallible (11 votes), answered by Leonid Shifrin (9 votes) 
 
---------------------------- 
 
[How should I reproduce this colorful swirling 
gif?]\url{http://mathematica.stackexchange.com/questions/47597/how-should-i 
-reproduce-this-colorful-swirling-gif} 
 
Surfing on the web, I came upon this cool gif: 
 
 
 
Does any one know how to reproduce this in Mathematica? I have some 
ideas myself, so I will try to answer this question as well. 
 
 
- asked by Ali (10 votes), answered by Kuba (20 votes) 
 
---------------------------- 
 
[How to create Line Chart with real third 
coordinates?]\url{http://mathematica.stackexchange.com/questions/47541/how- 
to-create-line-chart-with-real-third-coordinates} 
 
I would like to generate something like 3D Line Chart in Excel. Like the 
following figure 
 
 
 
but including third coordinates. 
 
Example 
 
I have a set of 2D data combied with 1D spatial data. 
 
dxy =  ... 
 
- asked by Vica (9 votes), answered by Yves Klett (2 votes) 
 
---------------------------- 
 
[How can I tell how much memory is taken by an 
expression?]\url{http://mathematica.stackexchange.com/questions/47491/how-c 
an-i-tell-how-much-memory-is-taken-by-an-expression} 
 
ByteCount and LeafCount don't really work, as shown below. 
 
Mathematica 9.0 .. on a 32 bit Windows machine. 
 
f[n_] := Block[{k = f[n - 1]}, {k, k}] 
f[0] = x 
 
 
LeafCount[f[k]]  for particular small  ... 
 
- asked by Richard Fateman (7 votes), answered by billisphere (5 votes) 
 
---------------------------- 
 
[Simplify with Assumptions 
Sqrt[(expr)^2]]\url{http://mathematica.stackexchange.com/questions/47548/si 
mplify-with-assumptions-sqrtexpr2} 
 
While trying to simplify expressions in the form Sqrt[(expr)^2] when 
expr&gt;0 I noticed a peculiar behavior that was not resolved with code 
from this Q&amp;A. 
 
Simplify[Sqrt[(x - y + a b c)^2], x - y  ... 
 
- asked by tchronis (6 votes), answered by Simon Woods (9 votes) 
 
---------------------------- 
 
[How to use PlotRange -> All with 
ListLogLinearPlot?]\url{http://mathematica.stackexchange.com/questions/4739 
3/how-to-use-plotrange-all-with-listloglinearplot} 
 
I would like to generate a ListLogLinearPlot that automatically shows 
all the data points. However the option PlotRange -&gt; All does not 
achieve this. Why does All not include all of the data in  ... 
 
- asked by Italianice (6 votes), answered by Alexey Popkov (3 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[How to determine the center and radius of a circle given three points 
in 
3D?]\url{http://mathematica.stackexchange.com/questions/16209/how-to-determ 
ine-the-center-and-radius-of-a-circle-given-three-points-in-3d} 
 
I was wondering if anyone could give me a hand with this problem I have. 
 
I have six points on a plane, and I am trying to determine if they form 
a circle or not. 
 
I know that any three points in 2D  ... 
 
- asked by RedPotatoe (9 votes), answered by Mark McClure (15 votes) 
 
---------------------------- 
 
[What is the best Mathematica tutorial for young 
people?]\url{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  ... 
 
- asked by noisy (32 votes), answered by Vitaliy Kaurov (17 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Module in numerical model for NonlinearModelFit is slow and leaks 
memory]\url{http://mathematica.stackexchange.com/questions/47562/module-in- 
numerical-model-for-nonlinearmodelfit-is-slow-and-leaks-memory} 
 
I am trying to make a NonlinearModelFit where the model is the result of 
a numerical calculation. My code works, but it is very slow and also 
seems to have a memory leak.  I'd appreciate advice about  ... 
 
- asked by jkrich (3 votes) 
 
---------------------------- 
 
[Quantities formatting 
problem]\url{http://mathematica.stackexchange.com/questions/47515/quantitie 
s-formatting-problem} 
 
So I've developed this simple code 
 
Mes /: MakeBoxes[Mes[mess_, error_, unit_], 
form : (StandardForm | TraditionalForm) : StandardForm 
] := RowBox[{ 
... 
 
- asked by Ranza (2 votes) 
 
---------------------------- 
 
[calling CUDA library 
functions]\url{http://mathematica.stackexchange.com/questions/47702/calling 
-cuda-library-functions} 
 
Mathematica has some predefined CUDA functions, like CUDAMap, 
CUDAFourier, etc. My question is how can one call functions which are 
part of CUDA library but not part of predefined Mathematica  ... 
 
- asked by user1188038 (1 vote) 

7.35 May 6, 2014

================================== 
Top new questions this week: 
================================== 
 
[May the Fourth be with 
you]\url{http://mathematica.stackexchange.com/questions/47268/may-the-fourt 
h-be-with-you} 
 
Happy Star Wars day.  I was playing around with the image manipulation 
functions in Mathematica in an attempt to recreate the Star Wars crawl. 
There's an HTML/CSS implementation which is in my  ... 
 
- asked by bobthechemist (18 votes), answered by Kuba (19 votes) 
 
---------------------------- 
 
[Mathematica 9 cannot solve a difference equation that Mathematica 8 
can]\url{http://mathematica.stackexchange.com/questions/47097/mathematica-9 
-cannot-solve-a-difference-equation-that-mathematica-8-can} 
 
Consider 
 
RSolve[{a[n + 1] == 2 a[n] + n (1 + 2^n), a[1] == 1}, a[n], n] 
 
 
Mathematica 8 can solve this quickly, but Mathematica 9, even after 
being allowed to run for a long time, cannot giva a  ... 
 
- asked by mathe (14 votes), answered by m_goldberg (3 votes) 
 
---------------------------- 
 
[Taking Top K 
Occurrences]\url{http://mathematica.stackexchange.com/questions/47120/takin 
g-top-k-occurrences} 
 
Having millions of numbers in a list, I want to take top K occurrences. 
MMA Commonest is very slow so I write my own versions: 
 
a=RandomInteger[{1,1000000},50000000]; 
 
... 
 
- asked by Mohsen Afshin (12 votes), answered by Mr.Wizard (11 votes) 
 
---------------------------- 
 
[Parametric Interpolation of 2D 
data]\url{http://mathematica.stackexchange.com/questions/47332/parametric-i 
nterpolation-of-2d-data} 
 
I want to create an interpolation through the following 2dim data 
points: 
 
data = {{22.78, 0.2431}, {22.06, 0.262}, {21.51, 0.2774}, {21.07, 
0.2905}, {20.7, 0.302}, {20.38, 0.3121}, {20.1,  ... 
 
- asked by Martin (11 votes), answered by bobthechemist (11 votes) 
 
---------------------------- 
 
[Importing an mx file into a 
context]\url{http://mathematica.stackexchange.com/questions/47110/importing 
-an-mx-file-into-a-context} 
 
Consider the following simple code which dumps the global context: 
 
var = 5; 
DumpSave["test.mx", "Global`"]; 
 
 
Now, in a new notebook, I would like to import var in another context. 
Trying 
 
... 
 
- asked by Massimo Ortolano (10 votes), answered by Leonid Shifrin (11 
votes) 
 
---------------------------- 
 
[Faster "stuttering" 
accumulate?]\url{http://mathematica.stackexchange.com/questions/47296/faste 
r-stuttering-accumulate} 
 
Given some list of arbitrary precision numbers, e.g. (actual lists are 
1M+ elements long): 
 
test={0, 2, 2, 47839283, 2, 0, 0, 2, 0, 1, 2, 0} 
 
 
I need to accumulate the list, but where a specified  ... 
 
- asked by rasher (9 votes), answered by Mr.Wizard (10 votes) 
 
---------------------------- 
 
[Why is this semicolon in 
red?]\url{http://mathematica.stackexchange.com/questions/47113/why-is-this- 
semicolon-in-red} 
 
I have a piece of code that works well, but when I put a semicolon after 
a plotting statement, the semicolon appears in red. What's the error? 
 
 
 
 
- asked by Mika Ike (9 votes), answered by Kuba (12 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Generate a Unit Circle 
Trigonometry]\url{http://mathematica.stackexchange.com/questions/2456/gener 
ate-a-unit-circle-trigonometry} 
 
Struggling often with Trigonometry I would like to have some code to 
generate this Unit Circle Trigonometry. Would be of great help when I 
need to transform some data : 
 
 
 
 
- asked by 500 (13 votes), answered by Mark McClure (27 votes) 
 
---------------------------- 
 
[Can Mathematica do symbolic linear 
algebra?]\url{http://mathematica.stackexchange.com/questions/3242/can-mathe 
matica-do-symbolic-linear-algebra} 
 
For instance, is there some way I can say "let A and B be arbitrary real 
$m\times n$ and $k\times m$ matrices, 
Simplify[Transpose[Transpose[A].Transpose[B]]]" and Mathematica would 
simplify it to B.A? 
... 
 
- asked by nikie (22 votes), answered by helen (11 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Travel time sweet spot using: Mathematica and Google Maps 
API]\url{http://mathematica.stackexchange.com/questions/47198/travel-time-s 
weet-spot-using-mathematica-and-google-maps-api} 
 
I want to use Mathematica to do some time minimisation calculations 
calling on Google Maps API for travel time data.  I'm concerned with 
travel time, e.g. along roads (by car or walk) and not linear  ... 
 
- asked by PeteCog (1 vote) 
 
---------------------------- 
 
[Graphics always rendered twice with SimpleFrontEnd 
example?]\url{http://mathematica.stackexchange.com/questions/47304/graphics 
-always-rendered-twice-with-simplefrontend-example} 
 
I am looking at the Java SimpleFrontEnd example provided by Mathematica. 
Everything goes well except it always renders graphics twice. 
 
 
 
Can anyone help me with this? 
 
BTW: I am using version 9 under  ... 
 
- asked by Michael (2 votes) 
 
---------------------------- 
 
[How to specify initial condition including integral equations in the 
case of the dirac 
equations?]\url{http://mathematica.stackexchange.com/questions/47358/how-to 
-specify-initial-condition-including-integral-equations-in-the-case-of-t 
he} 
 
Hi I am trying to solve a system of differential equation with NDSolve. 
The problem is I have like $3$ (maybe $5$) boundary conditions, but only 
$2$ differential equations. The equations to solve are  ... 
 
- asked by Terratoss (1 vote) 
 

7.36 April 15, 2014

================================== 
Top new questions this week: 
================================== 
 
[Programming paradigm 
change]\url{http://mathematica.stackexchange.com/questions/45829/programmin 
g-paradigm-change} 
 
I'm new to Mathematica, I've been learning by myself, and, being a Java 
developer for some time, it makes it hard to adapt. 
 
I've tried to solve a Reddit challenge, and I came up with this 
solution: 
 
... 
 
- asked by MHero (20 votes), answered by WReach (30 votes) 
 
---------------------------- 
 
[C Code generated from Mathematica not 
working?]\url{http://mathematica.stackexchange.com/questions/45619/c-code-g 
enerated-from-mathematica-not-working} 
 
I am a .Net developer. I'm trying to build a Visual C++ application 
using C code generated from Mathematica (by another person). I don't 
have Mathematica installed on my machine. When I try to compile  ... 
 
- asked by pag (10 votes) 
 
---------------------------- 
 
[What kind of check does DirectoryQ exactly 
perform?]\url{http://mathematica.stackexchange.com/questions/45793/what-kin 
d-of-check-does-directoryq-exactly-perform} 
 
I'm using Mathematica 9.0.1 on Windows XP and my drive letters are 
assigned as follows: C: and D: are hard local disks, while E: is 
assigned to some removable media. Now, the situation is as follows 
 
... 
 
- asked by mitochondrial (9 votes), answered by librik (12 votes) 
 
---------------------------- 
 
[What is the most efficient way to map a linked 
list?]\url{http://mathematica.stackexchange.com/questions/45593/what-is-the 
-most-efficient-way-to-map-a-linked-list} 
 
In order to work with lists effectively using common recursive patterns 
from functional programming, it's often most convenient to worked with 
the "linked list" representation, that looks like this: 
 
... 
 
- asked by Pillsy (8 votes), answered by Leonid Shifrin (9 votes) 
 
---------------------------- 
 
[How to protect functions in a Mathematica 
Package?]\url{http://mathematica.stackexchange.com/questions/45773/how-to-p 
rotect-functions-in-a-mathematica-package} 
 
I'm writing a Mathematica Package with many functions, but only two can 
be seen/public. I have: 
 
BeginPackage["VolumeReserves`"]; 
 
startInterface::usage = "..."; 
 
detailRock::usage = "..."; 
 
(*  ... 
 
- asked by Lory Lory (8 votes), answered by halirutan (8 votes) 
 
---------------------------- 
 
[How to change the appearance of a group 
opener?]\url{http://mathematica.stackexchange.com/questions/46082/how-to-ch 
ange-the-appearance-of-a-group-opener} 
 
I would like to change the GroupOpener appearance. In the present Mma 
design it is too small and can be missed by a reader unfamiliar with 
Mma. I know, how to change its color through the  ... 
 
- asked by Alexei Boulbitch (7 votes) 
 
---------------------------- 
 
[Equivalence under common 
permutations]\url{http://mathematica.stackexchange.com/questions/45851/equi 
valence-under-common-permutations} 
 
I have lists which consists of sublists of equal length. The outer list 
is regarded as a multiset (that is, permutations of the sublists don't 
matter, but repetitions do), but the order in the  ... 
 
- asked by celtschk (7 votes), answered by Leonid Shifrin (3 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Even Fibonacci 
numbers]\url{http://mathematica.stackexchange.com/questions/37266/even-fibo 
nacci-numbers} 
 
Today, I found the Euler Project. Problem #2 is 
 
 
Each new term in the Fibonacci sequence is generated by adding the 
previous two terms. By starting with 1 and 2, the first 10 terms will 
be: 
 
1,  ... 
 
- asked by Tangshutao (22 votes), answered by rcollyer (29 votes) 
 
---------------------------- 
 
[Problem with 
NonlinearModelFit]\url{http://mathematica.stackexchange.com/questions/2309/ 
problem-with-nonlinearmodelfit} 
 
I'm having trouble with a non-linear fit: 
 
fit = NonlinearModelFit[data, 
y0 + A Sin[\[Pi] (x - xc)/w], {y0, xc, A, w}, x] 
 
where data has about 15 thousand points and looks like this: 
 
 
 
The data  ... 
 
- asked by becko (14 votes), answered by Oleksandr R. (25 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Automatic replacing of [ with 
[]]\url{http://mathematica.stackexchange.com/questions/45992/automatic-repl 
acing-of-with} 
 
I tried to modify the KeyEventTranslations.tr file in order to always 
place a closed bracket instead of an open bracket once I press [. 
However once I press [ after the modification nothing happens  ... 
 
- asked by Max1 (6 votes) 
 
---------------------------- 
 
[Setting an initial value for 
ListAnimate?]\url{http://mathematica.stackexchange.com/questions/45892/sett 
ing-an-initial-value-for-listanimate} 
 
ListAnimate is fairly similar to Manipulate, but while Manipulate has a 
simple way to request an initial value for the manipulation parameter, I 
haven't found a way to tell ListAnimate to start with a  ... 
 
- asked by Steve (1 vote) 
 
---------------------------- 
 
[How can I select two lists from a list of lists so that I receive the 
system of equations has only rational 
solutions?]\url{http://mathematica.stackexchange.com/questions/45877/how-ca 
n-i-select-two-lists-from-a-list-of-lists-so-that-i-receive-the-system-o 
f} 
 
I want to make a sytem of equations has the form 
$$\begin{cases} 
a_1x^2+b_1y^2 + c_1xy+d_1x + e_1y+3=0,\\ 
a_2x^2+b_2y^2 + c_2xy+d_2x + e_2y+3=0. 
\end{cases}$$ 
so that the given system of equations has  ... 
 
- asked by minthao_2011 (1 vote)

7.37 April 1, 2014

================================== 
Top new questions this week: 
 
================================== 
 
[Creating sculptural forms using graphics 
primitives]\url{http://mathematica.stackexchange.com/questions/44858/creati 
ng-sculptural-forms-using-graphics-primitives} 
 
This is a question based on this answer by halirutan. 
 
Some amazing images can be created with this code, and I was wondering 
whether it was possible to extend the principle to different shapes. 
 
I  ... 
 
- asked by martin (16 votes), answered by Szabolcs (15 votes) 
 
---------------------------- 
 
[Making Monte Carlo simulation with 
ParallelTable]\url{http://mathematica.stackexchange.com/questions/44917/mak 
ing-monte-carlo-simulation-with-paralleltable} 
 
I would like to to MonteCarlo simulations of various regressions - 
basically, doing OLS under various conditions to test approaches. 
 
On my macpro  2x 2.8 GHz quad core Xeon, 32 Gb RAM DDR2 @ 667 Mhz,  ... 
 
- asked by guylhem (14 votes), answered by Szabolcs (7 votes) 
 
---------------------------- 
 
[Bug with SparseArray selector in 
Pick]\url{http://mathematica.stackexchange.com/questions/44868/bug-with-spa 
rsearray-selector-in-pick} 
 
I have created a notebook with two cells. This is the content of the 
first: 
 
g = Graph[{1 \[UndirectedEdge] 2, 2 \[UndirectedEdge] 3, 1 
\[UndirectedEdge] 3, 1 \[UndirectedEdge] 4, 4 \[UndirectedEdge]  ... 
 
- asked by Adam Reith (11 votes), answered by Istvan Zachar (8 votes) 
 
---------------------------- 
 
[Image Processing: Edge detection of the tumor on tomogram. Calculation area of the tumor] 
\url{http://mathematica.stackexchange.com/questions/44809/image-processing-edge-detection-of-the-tumor-on-tomogram-alculation-area-of-t} 
 
The task is to identify the image region of the tumor. 
 
 
 
I try to use example from documentation centre: 
 
tom1 = Import["http://i.stack.imgur.com/mZ4fR.jpg"]; 
tumor = SelectComponents[ 
... 
 
- asked by Alex Skudarev (10 votes), answered by halirutan (12 votes) 
 
---------------------------- 
 
[Applying non-Affine transforms to 2D polygons with 
textures]\url{http://mathematica.stackexchange.com/questions/44863/applying 
-non-affine-transforms-to-2d-polygons-with-textures} 
 
I am trying to create a vanishing point perspective transformation of 2D 
polygons, for example transforming the red polygon into the blue 
polygon: 
 
p1 = Polygon[{{0, 0}, {1, 0}, {1, 1}, {0, 1}}]; 
p2 =  ... 
 
- asked by bobthechemist (8 votes), answered by Silvia (6 votes) 
 
---------------------------- 
 
[How does Mathematica understand branchcuts of the complex 
logarithm?]\url{http://mathematica.stackexchange.com/questions/44767/how-do 
es-mathematica-understand-branchcuts-of-the-complex-logarithm} 
 
Say I have the function $f(x) = x \tanh(\pi x) \log (x^2 +a^2)$ where 
$a$ is some positive real number. Then it seems to be me that 
Mathematica when given such a Log[] function implicitly puts a  ... 
 
- asked by user6818 (7 votes), answered by Jens (14 votes) 
 
---------------------------- 
 
[Morphological Components with periodic boundary 
conditions]\url{http://mathematica.stackexchange.com/questions/44924/morpho 
logical-components-with-periodic-boundary-conditions} 
 
I would like to find the connected(with periodic boundary conditions) 
components in a large binary matrix. What I've tried, and it does a fair 
job is: 
 
MorphologicalComponents[RandomInteger[{0, 1},  ... 
 
- asked by Ali (7 votes), answered by David Carraher (10 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Resources for beautiful Mathematica 
Stylesheets]\url{http://mathematica.stackexchange.com/questions/5846/resour 
ces-for-beautiful-mathematica-stylesheets} 
 
When the Wolfram Demonstrations were introduced and the 
Documentation-Center was redesigned, I remember it was the first time I 
thought someone had put some effort into creating a beautiful  ... 
 
- asked by halirutan (76 votes), answered by rm -rf (38 votes) 
 
---------------------------- 
 
[What is the best Mathematica tutorial for young 
people?]\url{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  ... 
 
- asked by noisy (31 votes), answered by Vitaliy Kaurov (17 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Challenge: Creating Compilable Permutations 
Function]\url{http://mathematica.stackexchange.com/questions/44949/challeng 
e-creating-compilable-permutations-function} 
 
As Mathematica's implemented Permuations function is not compilable I 
tried to write my very own Permutations implementation, called 
PermutationsNew, which I want to compile later on. Unfortunately  ... 
 
- asked by Wizard (1 vote) 
 
---------------------------- 
 
[Notation, Format and 
Interpretation]\url{http://mathematica.stackexchange.com/questions/44986/no 
tation-format-and-interpretation} 
 
I am unclear on the exact relationship between Notation, Format and 
Interpretation. 
Format[X] := Y seems similar to Notation[Y &lt;= X] for formating and 
Interpretation[X, Y] seems related to  ... 
 
- asked by Daniel Mahler (2 votes) 
 
---------------------------- 
 
[Speed up 
MinimalPolynomial]\url{http://mathematica.stackexchange.com/questions/44763 
/speed-up-minimalpolynomial} 
 
My Mathematica code runs slowly 
 
MinimalPolynomial[Sqrt[2] + Sqrt[3]+ Sqrt[5]+ Sqrt[7]+ Sqrt[11]+ 
Sqrt[13], x] 
 
 
runs slowly, but the Maple version 
 
... 
 
- asked by user13209 (1 vote)

7.38 March 25, 2014

================================== 
Top new questions this week: 
================================== 
 
[How to make a curve selectable from a scaned image and convert it to a 
list of 
coordinates]\url{http://mathematica.stackexchange.com/questions/44355/how-t 
o-make-a-curve-selectable-from-a-scaned-image-and-convert-it-to-a-list-o 
f-c} 
 
I have a scanned image (binary-ized): 
 
 
 
Is there any way to reduce one of these curved lines (full or dotted) to 
a series of its coordinates (e.g., sampling interval of 0.01 on x-axis)? 
 
I've read  ... 
 
- asked by Tough Kid (10 votes), answered by Alexei Boulbitch (11 votes) 
 
---------------------------- 
 
[Alternating 
sum]\url{http://mathematica.stackexchange.com/questions/44564/alternating-s 
um} 
 
A frog is at the bottom of a 30 metre well. Each day it climbs 5 metres 
up the side, but it then slips back 3 metres each night. How long does 
it take to reach the top of the well? 
 
Is there an easier  ... 
 
- asked by martin (7 votes), answered by Leonid Shifrin (5 votes) 
 
---------------------------- 
 
[How to extract the edge from a set of 
points]\url{http://mathematica.stackexchange.com/questions/44694/how-to-ext 
ract-the-edge-from-a-set-of-points} 
 
I have an accumulation of points representing a body as you can see in 
the image below. From this data I want to generate a list of points or a 
curve, which is the envelope. 
 
 
 
The first idea was a  ... 
 
- asked by zeckra (6 votes), answered by halirutan (4 votes) 
 
---------------------------- 
 
[Map of Specific US States? 
(Isolated)]\url{http://mathematica.stackexchange.com/questions/44505/map-of 
-specific-us-states-isolated} 
 
My question here is fairly basic, and I'm sure I'm overlooking something 
basic. I know about CountryData for creating shapes of entire countries, 
and it works, to an extent; I can plot geographical  ... 
 
- asked by Smith W. (6 votes), answered by Pickett (5 votes) 
 
---------------------------- 
 
[Exporting EPS figures with dashing from 
ListPlot]\url{http://mathematica.stackexchange.com/questions/44560/exportin 
g-eps-figures-with-dashing-from-listplot} 
 
I am having difficulties exporting EPS figures. 
If I use the LineLegend option to create a dashed or a dot-dashed line, 
it seems ok in Mathematica 9.0 e.g.: 
 
 
 
But the problem came out when the  ... 
 
- asked by Qu8k (5 votes), answered by george2079 (6 votes) 
 
---------------------------- 
 
[How to import a large (~50Mb) json file in 
mathematica]\url{http://mathematica.stackexchange.com/questions/44671/how-t 
o-import-a-large-50mb-json-file-in-mathematica} 
 
I am trying to import a 46Mb json file into mathematica (which by the 
way I exported using mathematica) but its failing with the following 
messages: 
 
Java::pexcptn: A Java exception occurred after the  ... 
 
- asked by Trollkemada (5 votes), answered by Sjoerd C. de Vries (4 
votes) 
 
---------------------------- 
 
[How to select only NotebookObjects that are referring to ordinary 
notebooks? (not palettes 
etc.)]\url{http://mathematica.stackexchange.com/questions/44588/how-to-sele 
ct-only-notebookobjects-that-are-referring-to-ordinary-notebooks-no} 
 
There is of course function 
 
Notebooks[] 
 
 
 
 
 
 
But, unfortunatelly it hasn't got useful options in this context. 
 
My question is how to pick Notebooks excluding: 
 
 
Help, 
Palettes, 
Packages, 
... 
 
- asked by Kuba (5 votes), answered by Kuba (3 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[What is the best Mathematica tutorial for young 
people?]\url{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  ... 
 
- asked by noisy (31 votes), answered by Vitaliy Kaurov (17 votes) 
 
---------------------------- 
 
[Problem with 
NonlinearModelFit]\url{http://mathematica.stackexchange.com/questions/2309/ 
problem-with-nonlinearmodelfit} 
 
I'm having trouble with a non-linear fit: 
 
fit = NonlinearModelFit[data, 
y0 + A Sin[\[Pi] (x - xc)/w], {y0, xc, A, w}, x] 
 
where data has about 15 thousand points and looks like this: 
 
 
 
The data  ... 
 
- asked by becko (14 votes), answered by Oleksandr R. (23 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Maintaining postfix convention for directives in 
notebooks]\url{http://mathematica.stackexchange.com/questions/44606/maintai 
ning-postfix-convention-for-directives-in-notebooks} 
 
It seems to be a fairly common convention to write certain 'meta' 
functions in postfix form like 
 
f[x] // Simplify 
 
 
to keep the the mathematical content at the front separate from the 
various  ... 
 
- asked by Daniel Mahler (2 votes) 
 
---------------------------- 
 
[Function behavior based on 
Head]\url{http://mathematica.stackexchange.com/questions/44425/function-beh 
avior-based-on-head} 
 
I'm figuring how to implement a function behavior based on the Head of 
its argument. 
 
I mean 
 
Unprotect@Head; 
Head[p_[x]]:= Kind; 
Protect@Head; 
function[h_]:= 0; 
function[p_Kind]:= 1; 
 
Head[f[x]] 
... 
 
- asked by Fabio (1 vote) 
 
---------------------------- 
 
[Controlling output of graphics, the role of ";" and code 
structure/formatting]\url{http://mathematica.stackexchange.com/questions/44 
630/controlling-output-of-graphics-the-role-of-and-code-structure-format 
ting} 
 
";" is described under Compound Expression as a delimiter, such that 
only the output of the last item in the compund expression is given. 
 
Situation: 
 
1/ Print[] produces output whether followed by  ... 
 
- asked by Julian Moore (1 vote)

7.39 March 18, 2014

================================== 
Top new questions this week: 
================================== 
 
[What does ImageSize -> 1 -> 1 
mean?]\url{http://mathematica.stackexchange.com/questions/43820/what-does-i 
magesize-1-1-mean} 
 
On the page 
http://www.wolfram.com/language/gallery/blur-faces-in-an-image/ the 
example code has ImageSize -&gt; 1 -&gt; 1. I am unfamiliar with this 
chaining of rules... What does it mean?  Note I  ... 
 
- asked by PeterR (16 votes), answered by rm -rf (13 votes) 
 
---------------------------- 
 
[Web Browser Screen 
Shot]\url{http://mathematica.stackexchange.com/questions/44099/web-browser- 
screen-shot} 
 
I have Safari, Opera, Chrome, Firefox and IE installed how might a get a 
browser screen shot of a set of HTML code from inside Mathematica(for 
any of those browsers)? 
 
 
 
(Image is optional) 
 
The  ... 
 
- asked by Liam William (15 votes), answered by WReach (23 votes) 
 
---------------------------- 
 
[What is the fastest way to extract a substring from a huge 
string?]\url{http://mathematica.stackexchange.com/questions/44175/what-is-t 
he-fastest-way-to-extract-a-substring-from-a-huge-string} 
 
I develop an algorithm to find the most common substrings of a given 
length n up to a certain distance l in front of a pattern p in a huge 
sequence S. E.g. I want to find the most common hexamers  ... 
 
- asked by g3kk0 (8 votes), answered by Leonid Shifrin (9 votes) 
 
---------------------------- 
 
[Fast way of finding position of Interval containing an 
Integer]\url{http://mathematica.stackexchange.com/questions/43885/fast-way- 
of-finding-position-of-interval-containing-an-integer} 
 
I have a large list (about 2.2 million) of pairs of integers. Each pair 
defines an Interval[{}]. Given some integer x, I need to find the 
position of the interval in my list that bounds x (or  ... 
 
- asked by user1375062 (8 votes), answered by Leonid Shifrin (12 votes) 
 
---------------------------- 
 
[How to calcuate the sum of 1/x, where x is an integer not containing the digit 9 and 10,000,000 <= x <= 88,888,888] 
\url{http://mathematica.stackexchange.com/questions/43919/how-to-calcuate-the-sum-of-1-x-where-x-is-an-integer-not-containing-the-digit-9} 
 
My code is: 
 
nonine[x_] := If[StringMatchQ[IntegerString[x], "*9*"], False, True]; 
SetAttribute[nonine, Listable]; 
 
tbl = Select[Range[10^2, 888], nonine[#] &amp;]; 
 
Total[1.0/tbl] 
 
 
got out of memory  ... 
 
- asked by user2218402 (7 votes), answered by Simon Woods (10 votes) 
 
---------------------------- 
 
[Compile function which calls other functions to 
C]\url{http://mathematica.stackexchange.com/questions/44226/compile-functio 
n-which-calls-other-functions-to-c} 
 
I have a function which calls other functions and I would like to 
compile it to C code. For example: 
 
foo[p_] := 0.7 Exp[-p^2] 
f[a_, n_] := 
Module[{s, p, i}, s = 0; p = a; 
For[i = 0, i &lt; n,  ... 
 
- asked by Danvil (6 votes), answered by halirutan (7 votes) 
 
---------------------------- 
 
[Mathematica-To-MATLAB 
Dictionary!]\url{http://mathematica.stackexchange.com/questions/44223/mathe 
matica-to-matlab-dictionary} 
 
Is there a dictionary to translate Mathematica functions and commands to 
MATLAB? 
 
 
- asked by Behzad (6 votes), answered by ndetermin (4 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Problem with 
NonlinearModelFit]\url{http://mathematica.stackexchange.com/questions/2309/ 
problem-with-nonlinearmodelfit} 
 
I'm having trouble with a non-linear fit: 
 
fit = NonlinearModelFit[data, 
y0 + A Sin[\[Pi] (x - xc)/w], {y0, xc, A, w}, x] 
 
where data has about 15 thousand points and looks like this: 
 
 
 
The data  ... 
 
- asked by becko (14 votes), answered by Oleksandr R. (23 votes) 
 
---------------------------- 
 
[How to find the phase difference of two sampled sine 
waves?]\url{http://mathematica.stackexchange.com/questions/11046/how-to-fin 
d-the-phase-difference-of-two-sampled-sine-waves} 
 
I'm trying to measure a phase difference between two Sine functions I've 
acquired with a computer. I'm uploading one of the .txt files with the 
data I'm working with here: txt file. To remove the  ... 
 
- asked by Juan (20 votes), answered by bill s (18 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[RSolve: Errors while solving Partial Difference 
Equation]\url{http://mathematica.stackexchange.com/questions/44194/rsolve-e 
rrors-while-solving-partial-difference-equation} 
 
I tried solving following partial difference equation in Mathematica by 
typing 
 
RSolve[{C[n, k] == C[n-1, k] + C[n-1, k-1], C[n, 0] == 1, C[n, n] == 1}, 
C[n, k], {n, k}] 
 
 
but returns the following  ... 
 
- asked by user136040 (1 vote) 
 
---------------------------- 
 
[How to apply an rule to factors matching a certain 
form]\url{http://mathematica.stackexchange.com/questions/43903/how-to-apply 
-an-rule-to-factors-matching-a-certain-form} 
 
Suppose we have many expressions involving irrational ArcTan expressions 
(such as ArcTan[Sqrt[3],5]) along with other irrational factors (such as 
1/Sqrt[2]). 
 
I want to simplify all of these  ... 
 
- asked by Steve (1 vote) 
 
---------------------------- 
 
[How to make noncommutative multiplication agree with commutative 
multiplication]\url{http://mathematica.stackexchange.com/questions/44157/ho 
w-to-make-noncommutative-multiplication-agree-with-commutative-multiplic 
ation} 
 
I need a noncommutative multiplication that is 
 
 
Associative 
Distributive 
$A**0=0$, $A**1=A$ 
Agrees with the commutative multiplication ($A**(k B)=(k A)**B=k 
(A**B)$) 
 
 
I have found a code 
 
... 
 
- asked by 8k14 (1 vote)

7.40 March 11, 2014

================================== 
Top new questions this week: 
================================== 
 
[Most influential and/or disrupting features introduced with new 
versions of 
Mathematica]\url{http://mathematica.stackexchange.com/questions/43631/most- 
influential-and-or-disrupting-features-introduced-with-new-versions-of-m 
ath} 
 
This is something that has been bugging me for ages. 
 
With every upgrade, Mathematica has added new functionalities and 
amendend some of its bugs. In the process, though, some older 
functionality has  ... 
 
- asked by Peltio (11 votes), answered by Mark Adler (3 votes) 
 
---------------------------- 
 
[Fast way to get positions of "boxed" array 
elements?]\url{http://mathematica.stackexchange.com/questions/43557/fast-wa 
y-to-get-positions-of-boxed-array-elements} 
 
Given a 2D array (arbitrary numeric / evaluates to numeric elements, 
simplified for examples, and can be arbitrary dimensions so long as the 
operation makes sense, I'm working with 2K X 2K in my  ... 
 
- asked by rasher (9 votes), answered by rasher (6 votes) 
 
---------------------------- 
 
[Drop selection of columns from a ragged 
array]\url{http://mathematica.stackexchange.com/questions/43785/drop-select 
ion-of-columns-from-a-ragged-array} 
 
I have an application where I need to drop some arbitrary list of 
columns from a ragged array (where of course the shortest array rows 
have at least all the specified columns). 
 
E.g., given a ragged  ... 
 
- asked by rasher (8 votes), answered by Mr.Wizard (6 votes) 
 
---------------------------- 
 
[How to match a cyclically repeating 
sequence?]\url{http://mathematica.stackexchange.com/questions/43801/how-to- 
match-a-cyclically-repeating-sequence} 
 
I have run across several times recently where I must match a sequence 
that is cyclically repeating. For example, with the sequence, 
 
Sequence[a, b, c] 
 
 
how would I write a pattern that matched  ... 
 
- asked by rcollyer (7 votes), answered by rm -rf (3 votes) 
 
---------------------------- 
 
[Is there a function which instantly tells you whether an element is 
part of a 
list?]\url{http://mathematica.stackexchange.com/questions/43541/is-there-a- 
function-which-instantly-tells-you-whether-an-element-is-part-of-a-li} 
 
I have a very long list of numbers and I want to check whether there's a 
function (something that would look like PartOfQ[element,list]) that 
tells you immediately with a True or False as to whether  ... 
 
- asked by Aron (7 votes), answered by Szabolcs (7 votes) 
 
---------------------------- 
 
[Suppress connection to Wolfram|Alpha when making unit 
conversions]\url{http://mathematica.stackexchange.com/questions/43515/suppr 
ess-connection-to-wolframalpha-when-making-unit-conversions} 
 
I want to speed up calculations with unit conversions. I suspect 
primarily that some units evaluate from Wolfram|Alpha. Any way to 
prevent this automatically, so that Mathematica throws  ... 
 
- asked by denfromufa (7 votes), answered by rm -rf (5 votes) 
 
---------------------------- 
 
[How to handle keyboard events for unselected item in 
CDF?]\url{http://mathematica.stackexchange.com/questions/43432/how-to-handl 
e-keyboard-events-for-unselected-item-in-cdf} 
 
How can I force the keyboard input to work for this cell without 
clicking on it after I evaluate or showing a blinking selection cursor? 
This is for running CDF games in a browser. 
 
pos = {0, 0}; 
... 
 
- asked by Michael Hale (6 votes), answered by Michael Hale (3 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[3D heatmap density 
plot]\url{http://mathematica.stackexchange.com/questions/17260/3d-heatmap-d 
ensity-plot} 
 
I have a set of data that looks like {{x1, y1, z1}, {x2, y2, z2}, ...} 
so it describes points in 3D space. I want to make a heatmap out of this 
data. So that points with a high density are shown as a  ... 
 
- asked by norty (25 votes), answered by PlatoManiac (27 votes) 
 
---------------------------- 
 
[Plotting the frequency spectrum of a data series using 
Fourier]\url{http://mathematica.stackexchange.com/questions/18082/plotting- 
the-frequency-spectrum-of-a-data-series-using-fourier} 
 
testData = Table[N@Sin[500 x], {x, 0, 100}]; 
ListLinePlot[Abs[Fourier[testData]], PlotRange -&gt; Full] 
 
 
Gives me 
 
 
 
Which I do not expect because the Fourier Transform is 
FourierTransform[Sin[500  ... 
 
- asked by Pickett (7 votes), answered by KennyColnago (8 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Fourier transformation of HeavisideTheta 
functions]\url{http://mathematica.stackexchange.com/questions/43445/fourier 
-transformation-of-heavisidetheta-functions} 
 
I want to find 2D-Fourier transformation of the function given below 
 
f = HeavisideTheta[y1]*HeavisideTheta[y2 - y1] 
 
 
For the purpose, I use built-in function in two ways as below, 
 
... 
 
- asked by user58226 (3 votes) 
 
---------------------------- 
 
[Autocomplete from inside Module and 
SetDelayed]\url{http://mathematica.stackexchange.com/questions/43393/autoco 
mplete-from-inside-module-and-setdelayed} 
 
Autocomplete in Mathematica 9 offers suggestions from inside SetDelayed 
and Module. For example, after running: 
 
func[thing1_, thing2_] := thing1 + thing2; 
Module[{thing3}, 
thing3 = 10; 
thing3 + 4 
] 
... 
 
- asked by Italianice (1 vote) 
 
---------------------------- 
 
[Slow mixture fitting when having ill-conditioned covariance matrices. 
How to make it 
faster?]\url{http://mathematica.stackexchange.com/questions/43592/slow-mixt 
ure-fitting-when-having-ill-conditioned-covariance-matrices-how-to-mak} 
 
I'm using Mathematica 9.0 to fit multidimensional observations with a 
gaussian mixture. To do so I first adapted these steps to ensure that 
the mixture parameters are well defined (see  ... 
 
- asked by p-d (1 vote)

7.41 March 4, 2014

================================== 
Top new questions this week: 
================================== 
 
[How can I add drop shadows and specular highlights to 2D 
graphics?]\url{http://mathematica.stackexchange.com/questions/43186/how-can 
-i-add-drop-shadows-and-specular-highlights-to-2d-graphics} 
 
I thought I'd share some code in the form of a self-answered question, 
but other answers are of course welcome. 
 
Drop shadows are a familiar visual effect, giving the impression of a 
graphical element  ... 
 
- asked by Simon Woods (26 votes), answered by Simon Woods (29 votes) 
 
---------------------------- 
 
[Are greek symbols causing different 
evaluation?]\url{http://mathematica.stackexchange.com/questions/43108/are-g 
reek-symbols-causing-different-evaluation} 
 
I've updated today to Mathematica 9.0.1.0 from version 8 and found 
something that absolutely confuses me. 
Let us define a piecewise function: 
 
gr[x_, v1_, v2_, v3_, v4_, v5_] = 
Piecewise[{{g, v1  ... 
 
- asked by Mike (14 votes) 
 
---------------------------- 
 
[How to make a function with its own options as well as passing options 
to other 
functions]\url{http://mathematica.stackexchange.com/questions/43088/how-to- 
make-a-function-with-its-own-options-as-well-as-passing-options-to-other 
> } 
 
I have a function with many of its own options, but I would also like to 
pass options to subfunctions using the FilterRules function.  Here's a 
simple example: 
 
Options[pfunc] = {"test" -&gt; True}; 
... 
 
- asked by Jason B (11 votes), answered by rm -rf (8 votes) 
 
---------------------------- 
 
[Why the Block command does not forget the $ContextPath 
variable]\url{http://mathematica.stackexchange.com/questions/43137/why-the- 
block-command-does-not-forget-the-contextpath-variable} 
 
I do not understand this behavior: 
 
method[args_] := 
(* forget the context path *) 
Block[{$ContextPath}, 
(* should given nothing, right? *) 
Print["cpath=", $ContextPath]; 
... 
 
- asked by zorank (11 votes), answered by Szabolcs (8 votes) 
 
---------------------------- 
 
[Third argument of 
Compile]\url{http://mathematica.stackexchange.com/questions/43128/third-arg 
ument-of-compile} 
 
In his last comment on this answer, halirutan shows an example in which 
the third argument of Compile does not have any effect. The example is 
as follows. 
 
cfu = Compile[{}, Module[{y = {}},  ... 
 
- asked by Jacob Akkerboom (11 votes), answered by halirutan (5 votes) 
 
---------------------------- 
 
[Plot Matlab 
icon]\url{http://mathematica.stackexchange.com/questions/43012/plot-matlab- 
icon} 
 
I started to explore this on a whim and hasn't succeeded yet Some 
introduction for the icon is found here but I can't understand it very 
well. (I admit that, though playing with NDSolve a lot, I  ... 
 
- asked by xzczd (8 votes), answered by episanty (10 votes) 
 
---------------------------- 
 
[Why does Plot[Hold[x], {x,0,1}] 
work?]\url{http://mathematica.stackexchange.com/questions/43318/why-does-pl 
otholdx-x-0-1-work} 
 
It appears that, counter to my expectation, all of these (and probably 
many others) seem to work fine: 
 
Plot[Hold[x], {x, 0, 10}] 
 
FindRoot[Hold[x^2 == 2], {x, 1}] 
 
NMinimize[Hold[x^2], x] 
 
 
I would  ... 
 
- asked by Szabolcs (8 votes), answered by Michael E2 (5 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Plotting the frequency spectrum of a data series using 
Fourier]\url{http://mathematica.stackexchange.com/questions/18082/plotting- 
the-frequency-spectrum-of-a-data-series-using-fourier} 
 
testData = Table[N@Sin[500 x], {x, 0, 100}]; 
ListLinePlot[Abs[Fourier[testData]], PlotRange -&gt; Full] 
 
 
Gives me 
 
 
 
Which I do not expect because the Fourier Transform is 
FourierTransform[Sin[500  ... 
 
- asked by Pickett (7 votes), answered by KennyColnago (8 votes) 
 
---------------------------- 
 
[Get a "step by step" evaluation in 
Mathematica]\url{http://mathematica.stackexchange.com/questions/148/get-a-s 
tep-by-step-evaluation-in-mathematica} 
 
Is it possible in Mathematica to get a step-by-step evaluation of some 
functions; that's to say, outputting not only the result but all the 
stages that have led to it? 
 
Example : Let's say I want to  ... 
 
- asked by Skydreamer (45 votes), answered by J.M. (41 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Is there a package or canonical way for writing test harnesses in 
Mathematica?]\url{http://mathematica.stackexchange.com/questions/43014/is-t 
here-a-package-or-canonical-way-for-writing-test-harnesses-in-mathematic 
a} 
 
I've written a complicated function foo.1 
 
I'd now like to simplify this function's code, and later enhance it with 
more features. With each change, however, I'd like to be confident that 
I'm not  ... 
 
- asked by acheong87 (2 votes) 
 
---------------------------- 
 
[Young Tableaux 
Miscellanea]\url{http://mathematica.stackexchange.com/questions/43157/young 
-tableaux-miscellanea} 
 
I have a problem which is mostly neatly described by using Young 
Tableaux.  Mathematica seems to have these Tableaux built in, except 
that the Tableaux function is only in Combinatorica.  When I  ... 
 
- asked by evanb (2 votes) 
 
---------------------------- 
 
[Assign a value to a variable without using Set or 
SetDelayed?]\url{http://mathematica.stackexchange.com/questions/43306/assig 
n-a-value-to-a-variable-without-using-set-or-setdelayed} 
 
I supose probably yes, but at the end I assume that internally 
mathematica has to use Set or SetDelayed. Am I right? 
 
Background: I am developing a super simple phraser that takes a code 
description  ... 
 
- asked by zorank (1 vote) 

7.42 February 25, 2014

================================== 
Top new questions this week: 
================================== 
 
[Implementing a Beeswarm plot in 
Mathematica]\url{http://mathematica.stackexchange.com/questions/42585/imple 
menting-a-beeswarm-plot-in-mathematica} 
 
I am looking for a Beeswarm plot implementation in Mathematica. 
 
Consider the following data: 
 
data = {RandomVariate[NormalDistribution[], 100], 
RandomVariate[NormalDistribution[], 100]}; 
 
 
Lets  ... 
 
- asked by Pam (16 votes), answered by Szabolcs (10 votes) 
 
---------------------------- 
 
[Object differentiation in 
image]\url{http://mathematica.stackexchange.com/questions/42809/object-diff 
erentiation-in-image} 
 
After purchasing a box of alphabet pasta for the kids, I wondered if 
there was way to extract the frequency of appearance of letters in the 
box by taken a sample and the analyzing the picture. 
 
i =  ... 
 
- asked by PatoCriollo (10 votes), answered by lalmei (2 votes) 
 
---------------------------- 
 
[Why does $Failed have attribute 
HoldAll?]\url{http://mathematica.stackexchange.com/questions/42531/why-does 
-failed-have-attribute-holdall} 
 
Why does $Failed have attribute HoldAll?  Are there typical situations 
where $Failed is returned as a head that must not evaluate further, or 
is this just a relic from Mathematica's early times? 
 
... 
 
- asked by Szabolcs (9 votes), answered by Leonid Shifrin (6 votes) 
 
---------------------------- 
 
[When running Mathematica from a Linux terminal, how can I prevent a 
script from terminating upon 
logout?]\url{http://mathematica.stackexchange.com/questions/42838/when-runn 
ing-mathematica-from-a-linux-terminal-how-can-i-prevent-a-script-from} 
 
I am running Mathematica on a remote Linux cluster, by the terminal, 
using the math command.  (I do not have access to a terminal GUI.  For 
example, when I type the command mathematica, I get this  ... 
 
- asked by Andrew (8 votes), answered by Stefan (12 votes) 
 
---------------------------- 
 
[Deleting quasi-duplicates from large list 
efficiently]\url{http://mathematica.stackexchange.com/questions/42599/delet 
ing-quasi-duplicates-from-large-list-efficiently} 
 
I have the need to remove "duplicates" from large (>10K members) lists, 
where a "duplicate" is either a verbatim duplication, or the element's 
second entry exists as a first entry for some "earlier"  ... 
 
- asked by rasher (8 votes), answered by Mr.Wizard (9 votes) 
 
---------------------------- 
 
[Export an image at 1000 
dpi]\url{http://mathematica.stackexchange.com/questions/42519/export-an-ima 
ge-at-1000-dpi} 
 
I'm trying to export an image at 1000 dpi. The author guide of a lot of 
papers wants this resolution! Then I must to import this image in Word 
in a small box; let's say 7x4 cm. This is the code that I  ... 
 
- asked by Mary (8 votes), answered by Szabolcs (10 votes) 
 
---------------------------- 
 
[Generating Gelfand-Tsetlin 
patterns]\url{http://mathematica.stackexchange.com/questions/42745/generati 
ng-gelfand-tsetlin-patterns} 
 
I am doing some research on some combinatorial object called 
GT-patterns. 
They are generated from three parts of data. 
 
Two integer, partitions (sequences of weakly decreasing numbers), 
$\lambda =  ... 
 
- asked by Paxinum (7 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[How can I improve Mathematica's resolution on a macbook retina 
display?]\url{http://mathematica.stackexchange.com/questions/18419/how-can- 
i-improve-mathematicas-resolution-on-a-macbook-retina-display} 
 
Mathematica 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 
 
 
 
 
- asked by Tom Wellington (34 votes), answered by programming_historian 
(14 votes) 
 
---------------------------- 
 
[How to draw a 
spring?]\url{http://mathematica.stackexchange.com/questions/37207/how-to-dr 
aw-a-spring} 
 
I am new to Mathematica and have recently been exploring graphical 
animations. So I was experimenting with simple concepts in periodic 
motion and hence wondered how can I draw a simple spring? Is  ... 
 
- asked by David McHarg (21 votes), answered by belisarius (26 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Transform an expression to remove the 
singularity]\url{http://mathematica.stackexchange.com/questions/42634/trans 
form-an-expression-to-remove-the-singularity} 
 
I have the expression Sin[c x]/c. Clearly it is undefined at $c=0$, but 
that is merely a removable singularity, since 
$$\frac{\sin(cx)}c=x\frac{\sin(cx)}{cx}= x\operatorname{sinc}(cx),$$ 
which is  ... 
 
- asked by Rahul Narain (4 votes) 
 
---------------------------- 
 
[Highlighting Mathematica code in LaTeX 
document]\url{http://mathematica.stackexchange.com/questions/42793/highligh 
ting-mathematica-code-in-latex-document} 
 
I was thinking about the best way to include Mathematica code in a LaTeX 
document with a nice syntax highlighting. 
 
I have tried the packages listings and minted (with pygments), which 
both claim to  ... 
 
- asked by Eckhard (5 votes) 
 
---------------------------- 
 
[Is there a way to tell mathematica to minimize the number of 
multiplication in an expression? (Simplify and FullSimplify don't cut 
it)]\url{http://mathematica.stackexchange.com/questions/42611/is-there-a-wa 
y-to-tell-mathematica-to-minimize-the-number-of-multiplication-in-a} 
 
I have an expression, here's a clip of it: 
 
 
...LF (LG LQ Lsig^2 + 2 LQ Lsig RG Rl + LG LQ Rl^2 + Lsig^2 RG RQ + 
2 LG Lsig Rl RQ + 2 LQ Lsig RG Rs + 2 LG LQ Rl Rs + 
2 LG Lsig RQ Rs + LG  ... 
 
- asked by bwna (2 votes)

7.43 February 18, 2014

================================== 
Top new questions this week: 
================================== 
 
[Highlight Pie in 
PieChart]\url{http://mathematica.stackexchange.com/questions/42201/highligh 
t-pie-in-piechart} 
 
PieChart has the nice functionality of highlighting a single pie when 
you click on it. It is then sticking out a little. 
See the following example: 
 
PieChart[{1, 2, 3}] 
 
 
 
 
Now, if I click on the  ... 
 
- asked by Markus Roellig (20 votes), answered by Simon Woods (20 votes) 
 
---------------------------- 
 
[M9 performance regression for 
Fold?]\url{http://mathematica.stackexchange.com/questions/42419/m9-performa 
nce-regression-for-fold} 
 
I noticed an over 10x performance drop on Mathematica v9.0.1 (as 
Oleksandr R. commented, also v8) compared with v7.01 for this code: 
 
SetSystemOptions["CatchMachineUnderflow" -&gt; False]; 
... 
 
- asked by Yi Wang (16 votes) 
 
---------------------------- 
 
[Finding the intersection of a curve with an interpolation 
function]\url{http://mathematica.stackexchange.com/questions/42304/finding- 
the-intersection-of-a-curve-with-an-interpolation-function} 
 
There are no issues trying to find the intersection points of two 
defined curves. 
 
f[x_] := 2 (x - 1) (x - 1.5) (x - .5) (x + .5) (x + 1) (x + 1.5); 
g[x_] := 0.4 x - 0.4; 
Solve[f[x] ==  ... 
 
- asked by PatoCriollo (13 votes), answered by Daniel Lichtblau (12 
votes) 
 
---------------------------- 
 
[How to find out what files are touched when Get is 
called?]\url{http://mathematica.stackexchange.com/questions/42453/how-to-fi 
nd-out-what-files-are-touched-when-get-is-called} 
 
Is there a way to capture all package files touched whenever a package 
is called via Get, Needs, Beginpackage or similar? 
 
While FindFile["package`"] can point to the first file that is called, 
the  ... 
 
- asked by Istvan Zachar (11 votes), answered by Istvan Zachar (11 
votes) 
 
---------------------------- 
 
[Rearranging a 
List]\url{http://mathematica.stackexchange.com/questions/42219/rearranging- 
a-list} 
 
I am trying to rearrange/sort a list i.e. 
 
{{1,2},{10,140},{43,10},{1,140},{43,2}} 
 
 
into 
 
{{1,2},{2,43},{43,10},{10,140},{140,1}} 
 
 
or any cyclic permutation of it. 
The numbers don't repeat more  ... 
 
- asked by lalmei (9 votes), answered by Leonid Shifrin (6 votes) 
 
---------------------------- 
 
[What are the differences between library call back functions and 
WolframCompileLibrary 
macros?]\url{http://mathematica.stackexchange.com/questions/42409/what-are- 
the-differences-between-library-call-back-functions-and-wolframcompilel> 
) 
 
I'm trying to use LibraryLink in Mathematica, and come across some 
problems. 
 
Consider if we have a MTensor m1 which contains a one dimensional double 
array, and I want to get the data of that array.  ... 
 
- asked by xslittlegrass (8 votes), answered by halirutan (6 votes) 
 
---------------------------- 
 
[How does PlotLegends actually work with 
ListPlot3D?]\url{http://mathematica.stackexchange.com/questions/42262/how-d 
oes-plotlegends-actually-work-with-listplot3d} 
 
I'm sensing this might be a rookie mistake but normally I roll my own 
legends but decided to try the built in legends for a ListPlot3D. 
PlotLegends is listed as an option for ListPlot3D but curiously  ... 
 
- asked by Mike Honeychurch (8 votes), answered by rm -rf (10 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Finding all simple paths between two vertices in a 
graph]\url{http://mathematica.stackexchange.com/questions/25779/finding-all 
-simple-paths-between-two-vertices-in-a-graph} 
 
There are built-in methods to find a shortest path between two vertices 
in a graph, and the question on finding all shortest paths between two 
vertices has gathered quite a bit of attention. 
 
A path  ... 
 
- asked by mrm (9 votes), answered by trybik (8 votes) 
 
---------------------------- 
 
[What Mathematica book to 
buy?]\url{http://mathematica.stackexchange.com/questions/5059/what-mathemat 
ica-book-to-buy} 
 
I have used Mathematica for several years but at a pretty low level - 
piecing together built-in function inefficiently and fearing the sight 
of # and &amp;'s when I see others use them (I never do). I  ... 
 
- asked by BeauGeste (26 votes), answered by David (39 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[How to extract a variable names (not values) from a list of 
transformation 
rules?]\url{http://mathematica.stackexchange.com/questions/42405/how-to-ext 
ract-a-variable-names-not-values-from-a-list-of-transformation-rules} 
 
I am trying to extract variable names from a list of transformation 
rules mapping = {var1 -&gt; 'val1', var2 -&gt; 'val2' }. Variables var1 
and var2 are already defined in my notebook: 
 
 
var1 =  ... 
 
- asked by verse (1 vote) 
 
---------------------------- 
 
[Establish connection with RLink and 
Rtools]\url{http://mathematica.stackexchange.com/questions/42408/establish- 
connection-with-rlink-and-rtools} 
 
Has anyone gotten RLink to work with Rtools (or even tried)? 
If so a simple step-by-step would be much appreciated ! 
 
When attempting to access any Rtools functionality through RLink I get: 
 
 
The  ... 
 
- asked by David Ross (2 votes) 
 
---------------------------- 
 
[NMinimize seems to call function with the same values multiple 
times]\url{http://mathematica.stackexchange.com/questions/42215/nminimize-s 
eems-to-call-function-with-the-same-values-multiple-times} 
 
I have to minimize a function where the evaluation of one parameter set 
takes very long (around 5sec) and discovered alongside, that NMinimize 
seems to call this function multiple times with the exact  ... 
 
- asked by Frederik Ziebell (3 votes)

7.44 February 11, 2014

================================== 
Top new questions this week: 
================================== 
 
[A set of 
elements]\url{http://mathematica.stackexchange.com/questions/41753/a-set-of 
-elements} 
 
I have a set of say 100 numbers {1,3,7,11,19,...3971}. All elements are 
previously determined. I want to check whether 376 belongs to this set 
or not. what is the fastest way? 
Thanks 
 
 
- asked by Meqdad (9 votes), answered by Mr.Wizard (10 votes) 
 
---------------------------- 
 
[Unwanted PlotMarkers appear at non-existent 
places]\url{http://mathematica.stackexchange.com/questions/41706/unwanted-p 
lotmarkers-appear-at-non-existent-places} 
 
In this simple code 
 
ListPlot[Table[Sin[x], {x, 0, Pi, .1}], PlotRange -&gt; {0, 0.5}, 
Joined -&gt; True, PlotMarkers -&gt; Automatic, ClippingStyle -&gt; 
None, Frame -&gt; True] 
 
 
 
 
We can see that  ... 
 
- asked by saturasl (9 votes), answered by Coolwater (9 votes) 
 
---------------------------- 
 
[Find positions of items in a list based on 
neighbours]\url{http://mathematica.stackexchange.com/questions/41937/find-p 
ositions-of-items-in-a-list-based-on-neighbours} 
 
How can I select items from a list where the selection criterion depends 
on the neighbouring items? 
 
For example select all indices where a change has occurred with respect 
to the previous element in  ... 
 
- asked by Danvil (8 votes), answered by Simon Woods (14 votes) 
 
---------------------------- 
 
[How to run mathematica scripts without initializing the kernel every 
time]\url{http://mathematica.stackexchange.com/questions/41742/how-to-run-m 
athematica-scripts-without-initializing-the-kernel-every-time} 
 
I have written a Mathematica script that is to be run periodically on a 
Raspberry Pi. The code takes about 3 seconds to execute if I test it in 
a CLI Mathematica session. However, when I execute the  ... 
 
- asked by shrx (7 votes), answered by shrx (1 vote) 
 
---------------------------- 
 
[Get Coordinates 4 significant digits 
limitation]\url{http://mathematica.stackexchange.com/questions/42112/get-co 
ordinates-4-significant-digits-limitation} 
 
The tool "get coordinates" (clicking on a plot), seems to work with a 
fixed number of significant digits (4), in a way that we can quickly 
lose sensibility (the tool really becomes useless). The  ... 
 
- asked by P. Fonseca (6 votes), answered by chuy (2 votes) 
 
---------------------------- 
 
[How to take derivative of parameterized 
coordinate?]\url{http://mathematica.stackexchange.com/questions/41907/how-t 
o-take-derivative-of-parameterized-coordinate} 
 
Suppose I have a vector in $\mathbb{R}^n$ but $n$ is not known in 
advance. I want to be able to write functions which operate on the 
components of that vector, and then I'd like to be able to take  ... 
 
- asked by Tom (6 votes) 
 
---------------------------- 
 
[How to randomly erode a 3D distribution of points with Mma 
7.0?]\url{http://mathematica.stackexchange.com/questions/41801/how-to-rando 
mly-erode-a-3d-distribution-of-points-with-mma-7-0} 
 
Suppose we have a 3D distribution of points, like the spherical ball 
example below : 
 
Ball[num_]:=Table[ 
{ 
#1 Sqrt[1-#2^2]Cos[#3], 
#1 Sqrt[1-#2^2]Sin[#3], 
#1 #2 
} 
 
&amp;[ 
... 
 
- asked by Cham (6 votes), answered by chuy (6 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Marking points of intersection between two 
curves]\url{http://mathematica.stackexchange.com/questions/10472/marking-po 
ints-of-intersection-between-two-curves} 
 
I'm trying to illustrate the solutions numerically and graphically for 
an equation such as Tan[x] == x. I think I did everything ok except I 
wanted to mark each intersection between Tan[x] and x. 
 
... 
 
- asked by fiz (20 votes), answered by belisarius (30 votes) 
 
---------------------------- 
 
[What are the most common pitfalls awaiting new 
users?]\url{http://mathematica.stackexchange.com/questions/18393/what-are-t 
he-most-common-pitfalls-awaiting-new-users} 
 
As you may already know, Mathematica is a wonderful piece of software. 
However, it has a few characteristics that tend to confuse new (and 
sometimes not-so-new) users. That can be clearly seen from  ... 
 
- asked by belisarius (121 votes), answered by Michael E2 (64 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[OpenCLLink specify grid size when calling 
function]\url{http://mathematica.stackexchange.com/questions/41992/openclli 
nk-specify-grid-size-when-calling-function} 
 
The Mathematica documentation (section "Details": 
https://reference.wolfram.com/mathematica/OpenCLLink/ref/OpenCLFunction. 
html) states that: 
 
 
On launch, if the number of threads is not specified  ... 
 
- asked by user2224780 (1 vote) 
 
---------------------------- 
 
[Import merged cells from 
Excel]\url{http://mathematica.stackexchange.com/questions/42069/import-merg 
ed-cells-from-excel} 
 
in a scientific paper I've found some data. I've saved it in Excel from 
a .pdf file. 
But it was saved in a strange way: all data are in two cells in Excel. 
In large merged cells. 
Now when I try to  ... 
 
- asked by Mary (1 vote) 
 
---------------------------- 
 
[Mysterious behavior of Precision for complex 
arrays]\url{http://mathematica.stackexchange.com/questions/42075/mysterious 
-behavior-of-precision-for-complex-arrays} 
 
Mysterious behavior of Precision: 
 
{{1.0+I*0.0},{0.0+I*0.0}} // SetPrecision[#,30]&amp; // Precision // 
Print; 
 
 
 
0. 
 
 
 
{{1.0},{0.0}} // SetPrecision[#,30]&amp; // Precision // Print; 
 
 
 
30. 
 
 
 
Why is  ... 
 
- asked by John Sidles (3 votes)

7.45 February 4, 2014

================================== 
Top new questions this week: 
================================== 
 
[Extracting angles from a simple 
picture]\url{http://mathematica.stackexchange.com/questions/41563/extractin 
g-angles-from-a-simple-picture} 
 
I'm not sure if this is even possible with Mathematica, but I want to 
extract the angles between all lines in this picture: 
 
 
 
It consists of $12$ lines, so I want a matrix with $144$ entries. I  ... 
 
- asked by holistic (13 votes), answered by Kuba (14 votes) 
 
---------------------------- 
 
[Shuffle product of two 
lists]\url{http://mathematica.stackexchange.com/questions/41614/shuffle-pro 
duct-of-two-lists} 
 
I want to do the following: I have two lists {a_1,...a_n}, {b_1,...,b_n} 
and I would like to build now all shuffles out of this. This means all 
unions of these lists while still keeping the individual  ... 
 
- asked by A friendly helper (12 votes), answered by Mr.Wizard (9 votes) 
 
---------------------------- 
 
[Strange behavior when using Row with packed 
arrays]\url{http://mathematica.stackexchange.com/questions/41653/strange-be 
havior-when-using-row-with-packed-arrays} 
 
Today I lost a lot of time with a strange behavior and I narrowed it 
down to this small piece of code: 
 
a = {1, 2}; 
ToString@Row[DeleteDuplicates[a], ","] 
ToString@Row[Union[a], ","] 
 
 
 
"Row[{1, 2},  ... 
 
- asked by Murta (11 votes), answered by Szabolcs (11 votes) 
 
---------------------------- 
 
[Graphics`Mesh`FindIntersections[ ] fails to detect 
intersections]\url{http://mathematica.stackexchange.com/questions/41496/gra 
phicsmeshfindintersections-fails-to-detect-intersections} 
 
Graphics`Mesh`FindIntersections[ ] is an undocumented function for, 
well, detecting intersections very efficiently. Take a look: 
 
i = Import@"http://i.stack.imgur.com/PcWcz.png"; 
perim =  ... 
 
- asked by belisarius (10 votes) 
 
---------------------------- 
 
[Checking through an 
expression]\url{http://mathematica.stackexchange.com/questions/41324/checki 
ng-through-an-expression} 
 
I am writing a code that manipulates expressions that contains functions 
with an arbitrary number of arguments.  An example expression is 
 
expr = x f[a, b, c, d] - 4 f[b, a, d] + z f[] + f[a, b, d] -  ... 
 
- asked by QuantumDot (7 votes), answered by Artes (5 votes) 
 
---------------------------- 
 
[LengthWhile until first 
duplication]\url{http://mathematica.stackexchange.com/questions/41469/lengt 
hwhile-until-first-duplication} 
 
I have the need to trim each of a large number of potentially very long 
lists (10^6+ elements) to the length where the last occurrence of any 
distinct element happens, or said another way, where the  ... 
 
- asked by rasher (7 votes), answered by rasher (2 votes) 
 
---------------------------- 
 
[Why do I get a different value when I change the order of 
integration?]\url{http://mathematica.stackexchange.com/questions/41454/why- 
do-i-get-a-different-value-when-i-change-the-order-of-integration} 
 
I think the following two-dimensional integrals should be equal, since 
they both integrate the function over the half plane defined by 
$t&gt;\tau$. 
 
$$\int_{-\infty}^\infty \mathrm{d}t  ... 
 
- asked by Jason B (7 votes), answered by Michael E2 (9 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[How to get intersection values from a parametric 
graph?]\url{http://mathematica.stackexchange.com/questions/33947/how-to-get 
-intersection-values-from-a-parametric-graph} 
 
I have this graphed: 
 
ParametricPlot[{2.4*Cos[t] + 1.6*Cos[3 t/2], 2.4*Sin[t] - 1.6 Sin[3 
t/2]}, {t, 0, 4*Pi}] 
 
 
 
 
It is a star, and the lines cross each other twice in the third 
quadrant.  I need to  ... 
 
- asked by guest (14 votes), answered by Artes (17 votes) 
 
---------------------------- 
 
[Finding the best way to visualize rather complicated 
data]\url{http://mathematica.stackexchange.com/questions/33429/finding-the- 
best-way-to-visualize-rather-complicated-data} 
 
I have the following data 
 
data = {{7.5, 12.45, 12.45, 12.75, 12.75, 12.25, 12.25, 12.53, 12.53}, 
{8.5, 12.22, 12.22, 12.23, 12.23, 13, 13, 12.54, 12.54}, 
{9.5, 11.58, 11.53, 12.75, 13.48, 12.39,  ... 
 
- asked by Vaggelis_Z (12 votes), answered by Pinguin Dirk (10 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Load a Mathematica Notebook using .Net 
code]\url{http://mathematica.stackexchange.com/questions/41410/load-a-mathe 
matica-notebook-using-net-code} 
 
I have gotten a tremendous amount of information from the question 
posted at (Load a Mathematica Package via .Net code), which my 
application is very similar to. Specifically in that thread, the  ... 
 
- asked by Josh (1 vote) 
 
---------------------------- 
 
[Trying to find the best Pade approximant for a given numer of 
terms]\url{http://mathematica.stackexchange.com/questions/41620/trying-to-f 
ind-the-best-pade-approximant-for-a-given-numer-of-terms} 
 
Let suppose that I have a function $f[x]$ I want to approximate using a 
Pade expansion and that I decide what would be maximum number of terms 
to be used. 
 
Is there any way with Mathematica to find  ... 
 
- asked by Claude Leibovici (1 vote) 
 
---------------------------- 
 
[Estimation of vector autoregressive (VAR) 
process]\url{http://mathematica.stackexchange.com/questions/41330/estimatio 
n-of-vector-autoregressive-var-process} 
 
To estimate 1-dimensional VAR process (which is AR process) you can 
easily use functions EstimatedProcess or FindProcessParameters like 
this: 
 
sample = RandomFunction[ARProcess[{.2,-.4},.1], {1,300}]; 
... 
 
- asked by matt525252 (3 votes) 

7.46 January 28, 2014

================================== 
Top new questions this week: 
================================== 
 
[Why are numeric division and subtraction not handled better in 
Mathematica?]\url{http://mathematica.stackexchange.com/questions/40927/why- 
are-numeric-division-and-subtraction-not-handled-better-in-mathematica} 
 
There is something that has been troubling me for a while.  At least in 
version 7, the performance of a / b and a - b is not equivalent to, and 
significantly inferior to, Divide[a, b] and Subtract[a,  ... 
 
- asked by Mr.Wizard (37 votes) 
 
---------------------------- 
 
[Cancellation of common 
terms]\url{http://mathematica.stackexchange.com/questions/41070/cancellatio 
n-of-common-terms} 
 
Can someone explain why the term A in case 2 does not get canceled out 
when case 1 does? 
I use "9.0 for Microsoft Windows (64-bit) (January 25, 2013)" 
 
case1 = A*(E^(-\[Lambda]) + \[Alpha]) == A; 
Simplify[case1, A  ... 
 
- asked by user11946 (10 votes), answered by user11946 (2 votes) 
 
---------------------------- 
 
[Plotting time data with axes labels and point 
labels]\url{http://mathematica.stackexchange.com/questions/41113/plotting-t 
ime-data-with-axes-labels-and-point-labels} 
 
I am trying to create a set of commands to automatically create clinical 
lab value plots. Using time is my major issue here. It is hard to 
dynamically reference the different point positions to  ... 
 
- asked by James Wine (10 votes), answered by ubpdqn (6 votes) 
 
---------------------------- 
 
[Is there a guideline about when to end expressions with 
semicolons?]\url{http://mathematica.stackexchange.com/questions/41086/is-th 
ere-a-guideline-about-when-to-end-expressions-with-semicolons} 
 
Whether for nested Ifs or within scoping constructs like Module and 
Block, I never know whether to end the final expression with a 
semicolon. I know the semicolon suppresses output, but, for example, 
... 
 
- asked by acheong87 (10 votes), answered by Mr.Wizard (13 votes) 
 
---------------------------- 
 
[How to efficiently mask an 
image?]\url{http://mathematica.stackexchange.com/questions/41125/how-to-eff 
iciently-mask-an-image} 
 
I want to extract/cut out a part of an image. Since my mask is not 
rectangular I want to set pixels that are not masked to zero (black). My 
current approach is something like this: 
 
img =  ... 
 
- asked by chromate (9 votes), answered by Pickett (11 votes) 
 
---------------------------- 
 
[Why is this code slow and how could I speed it 
up?]\url{http://mathematica.stackexchange.com/questions/41185/why-is-this-c 
ode-slow-and-how-could-i-speed-it-up} 
 
My goal is given an integer number to deduce if its digits increase (or 
remain the same) from left to right or not. 
 
Example: $1236, 123336$ are both considered numbers with increasing 
digits, but  ... 
 
- asked by Zet (8 votes), answered by Kuba (13 votes) 
 
---------------------------- 
 
[How is the mysterious Raw function 
used?]\url{http://mathematica.stackexchange.com/questions/40982/how-is-the- 
mysterious-raw-function-used} 
 
I have never seen an example use for the mysterious Raw function: 
 
 
Raw[h, "hexstring"] 
constructs a raw data object with head h, and 
with contents corresponding to the binary bit pattern  ... 
 
- asked by Mr.Wizard (8 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[How to play with Facebook data inside 
Mathematica?]\url{http://mathematica.stackexchange.com/questions/11673/how- 
to-play-with-facebook-data-inside-mathematica} 
 
I saw this post from Wolfram here and I would like to know how to import 
facebook data into Mathematica. 
 
 
- asked by Murta (20 votes), answered by Murta (24 votes) 
 
---------------------------- 
 
[Is there an open source implementation of 
Mathematica-the-language?]\url{http://mathematica.stackexchange.com/questio 
ns/4454/is-there-an-open-source-implementation-of-mathematica-the-langua 
ge} 
 
I've seen questions before such as "What is the best open-source 
equivalent for Mathematica?", but that specific question (and that line 
of inquiry in general) cares more about the computer algebra  ... 
 
- asked by sblom (46 votes), answered by Simon (39 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Poor CUDALink performance, when calling a kernel multiple 
times]\url{http://mathematica.stackexchange.com/questions/41102/poor-cudali 
nk-performance-when-calling-a-kernel-multiple-times} 
 
When working on a project of mine I noticed that CUDALink shows very 
poor performance when calling CUDA kernels multiple times in a 
loop-construct. 
 
To demonstrate this I put together this little  ... 
 
- asked by definitely.uncertain (6 votes) 
 
---------------------------- 
 
[Does Mathematica compute free-form-input on Wolfram 
servers?]\url{http://mathematica.stackexchange.com/questions/41238/does-mat 
hematica-compute-free-form-input-on-wolfram-servers} 
 
I've just started to use mathematica and I'm using the free-form input 
alot. The computation time for simple problems seems to take alot of 
time and my CPU isn't really used at all. I first thought  ... 
 
- asked by qwertz (4 votes) 
 
---------------------------- 
 
[Non linear model fit 
mathematica]\url{http://mathematica.stackexchange.com/questions/41017/non-l 
inear-model-fit-mathematica} 
 
I want to fit experimental data (temp,alpha) to the following equation 
for calculating k and Ea 
 
-Log[alpha]^n = function(k,Ea,temp) 
 
 
However i do not know exact value of "n". By this time i am  ... 
 
- asked by Farrukh Shehzad (1 vote) 

7.47 January 21, 2014

================================== 
Top new questions this week: 
================================== 
 
[Moving maximum 
function?]\url{http://mathematica.stackexchange.com/questions/40526/moving- 
maximum-function} 
 
How can I construct a moving maximum function? 
 
For example, if I have a list of 12 values: { 5, 6, 9, 3, 2, 6, 7, 8, 1, 
1, 4, 7 } and I want to maximize over 3 values then the expected result 
would  ... 
 
- asked by Tyler Durden (11 votes), answered by rasher (16 votes) 
 
---------------------------- 
 
[AndersonDarlingTest and DistributionFitTest Leaking 
Memory]\url{http://mathematica.stackexchange.com/questions/40661/andersonda 
rlingtest-and-distributionfittest-leaking-memory} 
 
I believe AndersonDarlingTest and probably all other tests are keeping a 
copy of data somewhere and not freeing it: 
 
Quit[]; (*Must be run in different cell*) 
 
 
$HistoryLength = 0; 
memdata =  ... 
 
- asked by Ajasja (8 votes), answered by Ajasja (2 votes) 
 
---------------------------- 
 
[Faster list duplicate 
'limiter']\url{http://mathematica.stackexchange.com/questions/40765/faster- 
list-duplicate-limiter} 
 
Given some list, e.g., {5, 3, 2, 3, 1, 0, 1, 3, 5, 5, 4, 5, 1, 2, 5, 2, 
2, 0, 1, 4}, I need to limit the duplicates, if any, to an arbitrarily 
chosen number. The excess duplicates are to be chopped  ... 
 
- asked by rasher (7 votes), answered by rasher (4 votes) 
 
---------------------------- 
 
[When does a list contain only 
ones?]\url{http://mathematica.stackexchange.com/questions/40670/when-does-a 
-list-contain-only-ones} 
 
I am starting with a list of length n that contains all -1's. For 
instance, when n = 6 the list is {-1, -1, -1, -1, -1, -1}. I pick a 
random integer from 1 to n and toggle the element by multiplying  ... 
 
- asked by bobbym (7 votes), answered by rasher (6 votes) 
 
---------------------------- 
 
[Converting StringJoin to StringForm inside 
Hold]\url{http://mathematica.stackexchange.com/questions/40628/converting-s 
tringjoin-to-stringform-inside-hold} 
 
Let's say I have a piece of code: 
 
Hold[{code1, 
"asdad " &lt;&gt; ToString[testa] &lt;&gt; " adsd " &lt;&gt; 
ToString[testb], 
code2}] (*MWE ofc*) 
 
 
which I want to convert. Each  ... 
 
- asked by Kuba (7 votes), answered by Leonid Shifrin (8 votes) 
 
---------------------------- 
 
[Graph databases / Nosql with 
Mathematica]\url{http://mathematica.stackexchange.com/questions/40731/graph 
-databases-nosql-with-mathematica} 
 
I am very new to mathematica but it looks like an interesting language 
and I would like to explore it for a future project to create a web 
search engine. It seems like it would be fairly well suited  ... 
 
- asked by user2433617 (6 votes), answered by Mike Honeychurch (2 votes) 
 
---------------------------- 
 
[Counting adjacent elements in a 
Matrix?]\url{http://mathematica.stackexchange.com/questions/40593/counting- 
adjacent-elements-in-a-matrix} 
 
To start, I have a situation where I have some matrix, for example 
 
$$ 
A=\left[ 
\begin{matrix} 
4&amp;2&amp;2&amp;3&amp;3\\ 
2&amp;3&amp;1&amp;2&amp;3\\ 
3&amp;0&amp;4&amp;0&amp;4\\ 
... 
 
- asked by Alizter (6 votes), answered by Rojo (3 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Automatic e-mail/text message when a calculation has 
finished?]\url{http://mathematica.stackexchange.com/questions/30167/automat 
ic-e-mail-text-message-when-a-calculation-has-finished} 
 
Sometimes Mathematica takes quite a while to finish calculations and it 
would be convenient to be able to move away from the computer while it 
is working. I was wondering if there is any "clever" hack  ... 
 
- asked by Paco (36 votes), answered by rm -rf (41 votes) 
 
---------------------------- 
 
[How to check if a 2D point is in a 
polygon?]\url{http://mathematica.stackexchange.com/questions/9405/how-to-ch 
eck-if-a-2d-point-is-in-a-polygon} 
 
Background: I use code from An Efficient Test For A Point To Be In A 
Convex Polygon Wolfram Demonstration to check if a point ( mouse pointer 
) is in a ( convex ) polygon. Clearly this code fails for  ... 
 
- asked by ndroock1 (42 votes), answered by kguler (30 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Schedule programing problem with integer linear 
programming]\url{http://mathematica.stackexchange.com/questions/40739/sched 
ule-programing-problem-with-integer-linear-programming} 
 
I know how to model this question on paper, but I don't know how doing 
it in Mathematica. 
 
Imagine , there is a university student who want to choose courses for 
this semester and he got the  ... 
 
- asked by DSaad (4 votes) 
 
---------------------------- 
 
[Cannot compile OpenGL code in Mathematica (vc2010-windows 
8.1)]\url{http://mathematica.stackexchange.com/questions/40705/cannot-compi 
le-opengl-code-in-mathematica-vc2010-windows-8-1} 
 
LinkError of OpenGL 
 
 
 
My enviroment is windows 8.1 x64, Mathematica 9.0.1, opengl 1.1 
 
targetDirectory = "E:\\Users\\Hyper\\Documents\\OpenGL"; 
sourceDirectory =  ... 
 
- asked by HyperGroups (1 vote) 
 
---------------------------- 
 
[BubbleChart bubble scale depends on y 
position]\url{http://mathematica.stackexchange.com/questions/40576/bubblech 
art-bubble-scale-depends-on-y-position} 
 
I noticed that the scaling of bubbles in the BubbleChart function 
depends on the y position of a bubble. 
 
Compare these two examples. 
 
BubbleChart[{{60.0, 20.0, 50.0}, {60.0, 90.0, 50.0}}, 
... 
 
- asked by Jeff Lapides (1 vote)

7.48 January 14, 2014

================================== 
Top new questions this week: 
================================== 
 
[Generating visually pleasing circle 
packs]\url{http://mathematica.stackexchange.com/questions/40334/generating- 
visually-pleasing-circle-packs} 
 
I would like to generate a circle pack that mimics this: (don't pay 
attention on numbers, and colors at all, at the moment I am interested 
in circle positions and radii only) 
 
 
 
or this: 
 
 
 
I am new  ... 
 
- asked by VividD (23 votes), answered by Istvan Zachar (30 votes) 
 
---------------------------- 
 
[Why do certain values in ArcSin not fully 
evaluate?]\url{http://mathematica.stackexchange.com/questions/40080/why-do- 
certain-values-in-arcsin-not-fully-evaluate} 
 
This is a continuation of: Why do certain fractional values in 
TriangleWave not evaluate? 
The analysis by R.M and rasher revealed that problem to reduce to the 
behavior of: 
 
ArcSin[Sin[Pi/ 10]] 
 
 
 
... 
 
- asked by Mr.Wizard (14 votes), answered by Simon Woods (14 votes) 
 
---------------------------- 
 
[More efficient way of generating list of occurrence 
counts?]\url{http://mathematica.stackexchange.com/questions/40377/more-effi 
cient-way-of-generating-list-of-occurrence-counts} 
 
Given a list, e.g., target = {a, b, c, b, c, d, c, d, e, f, a, h, g}, I 
want to generate a list containing the occurrence count of the 
corresponding element of the target list, e.g., {1, 1, 1, 2, 2,  ... 
 
- asked by rasher (11 votes), answered by s0rce (7 votes) 
 
---------------------------- 
 
[How to avoid an expensive subset of a Manipulate computation when 
dependent variables have not 
changed?]\url{http://mathematica.stackexchange.com/questions/40066/how-to-a 
void-an-expensive-subset-of-a-manipulate-computation-when-dependent-vari 
> } 
 
I have a Manipulate where a portion of the calculation that ends up 
displayed is dependent on a subset of the Manipulate control variables. 
It would make sense to cache that portion of the  ... 
 
- asked by Peeter Joot (9 votes), answered by Nasser (8 votes) 
 
---------------------------- 
 
[help to plot Poincare section for double 
pendulum]\url{http://mathematica.stackexchange.com/questions/40122/help-to- 
plot-poincare-section-for-double-pendulum} 
 
I am reading a book about classical mechanics. In the chapter about 
chaos, it gives the simplified and scaled equations for double pendulum 
as 
 
$$ 
\frac{d}{dt}\left[ 
\begin{matrix} 
\alpha \\[3mm]  ... 
 
- asked by user1285419 (8 votes), answered by belisarius (5 votes) 
 
---------------------------- 
 
[Another difference between Set and Setdelayed. Evaluation 
shortcut?]\url{http://mathematica.stackexchange.com/questions/40182/another 
-difference-between-set-and-setdelayed-evaluation-shortcut} 
 
A little while ago I wondered why 
 
f[x_] = f[x] 
 
 
gives an infinite iteration. I ended up discovering the following 
difference in evaluation between Set and SetDelayed with Evaluate. 
 
count = 0; 
... 
 
- asked by Jacob Akkerboom (7 votes), answered by Jacob Akkerboom (1 
vote) 
 
---------------------------- 
 
[Arbitrary precision spline 
interpolation]\url{http://mathematica.stackexchange.com/questions/40163/arb 
itrary-precision-spline-interpolation} 
 
Current implementation of Interpolation does not allow arbitrary 
precision spline interpolation. Yu-Sung Chang say here that "it is not 
hard to implement it manually for arbitrary precision using  ... 
 
- asked by Alexey Popkov (7 votes), answered by belisarius (3 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[How can I improve Mathematica's resolution on a macbook retina 
display?]\url{http://mathematica.stackexchange.com/questions/18419/how-can- 
i-improve-mathematicas-resolution-on-a-macbook-retina-display} 
 
Mathematica 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 
 
 
 
 
- asked by Tom Wellington (32 votes), answered by programming_historian 
(14 votes) 
 
---------------------------- 
 
[Reconstruct text pages cut by 
shredder]\url{http://mathematica.stackexchange.com/questions/32612/reconstr 
uct-text-pages-cut-by-shredder} 
 
Q1: I have a page of printed text file, but it was cut by a paper 
shredder (from top to bottom). You can download all the paper fragment 
here. There are some examples of them. How can I reconstruct  ... 
 
- asked by mm.Jang (35 votes), answered by Kuba (31 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[InverseFunction 
oddity]\url{http://mathematica.stackexchange.com/questions/40398/inversefun 
ction-oddity} 
 
InverseFunction[ConditionalExpression[#, 0 &lt;= # &lt;= 1] &amp;] 
InverseFunction[ConditionalExpression[#, -1 &lt;= # &lt;= 1] &amp;] 
 
 
The first line produces what I would expect: 
 
... 
 
- asked by Will Vousden (4 votes) 
 
---------------------------- 
 
[How to Check Spelling strings written inside input 
cells]\url{http://mathematica.stackexchange.com/questions/40199/how-to-chec 
k-spelling-strings-written-inside-input-cells} 
 
Is it possible to check the spelling of strings? Strings are often used 
to show messages in my user interfaces, and I would like to have an 
automatic checking. 
 
Methods that export all the strings to  ... 
 
- asked by P. Fonseca (4 votes) 
 
---------------------------- 
 
[Biorthogonal Projector Construction in 
Mathematica]\url{http://mathematica.stackexchange.com/questions/40294/biort 
hogonal-projector-construction-in-mathematica} 
 
(Note: This was originally posted on SE Mathematics, but I'm reposting 
it here as suggested by rm-rf, as I'm translating the theorem into 
Mathematica code to test it) 
 
I was trying to prove that the  ... 
 
- asked by DumpsterDoofus (2 votes)

7.49 January 7, 2014

================================== 
Top new questions this week: 
================================== 
 
[Create a torus with a hexagonal mesh for 
3D-printing]\url{http://mathematica.stackexchange.com/questions/39879/creat 
e-a-torus-with-a-hexagonal-mesh-for-3d-printing} 
 
I am new to Mathematica, and I'm looking for a way to create patterns on 
the surface of 3D objects. One thing I have not been able to do is 
create a hexagonal mesh on a torus. What I would like to  ... 
 
- asked by Manna (24 votes), answered by rm -rf (34 votes) 
 
---------------------------- 
 
[Benchmarking Mathematica performance on the Raspberry 
Pi]\url{http://mathematica.stackexchange.com/questions/39684/benchmarking-m 
athematica-performance-on-the-raspberry-pi} 
 
It is not surprising that Mathematica on the Raspberry Pi is slow and 
clunky.  In Stephen Wolfram's words, the command line is "quite zippy" 
but the notebook interface is "a trifle sluggish by modern  ... 
 
- asked by bobthechemist (20 votes), answered by bobthechemist (22 
votes) 
 
---------------------------- 
 
[Fast 
DensityPlot]\url{http://mathematica.stackexchange.com/questions/39826/fast- 
densityplot} 
 
Is it possible to increase the perforamce the DensityPlot? 
 
For example, let's try to plot this "flower" 
 
f[x_, y_] := (x^2 + y^2) Exp[-x^2 - y^2] Sin[10 Sqrt[x^2 + y^2] + 10 
ArcTan[x, y]]^4; 
 
... 
 
- asked by ybeltukov (16 votes), answered by ybeltukov (14 votes) 
 
---------------------------- 
 
[How to plot ternary density 
plots?]\url{http://mathematica.stackexchange.com/questions/39733/how-to-plo 
t-ternary-density-plots} 
 
How can I get a ternary density plot just like the plots from OriginLab? 
 
 
ContourPlot and DensityPlot seemingly can solve the 
[f,{x},{y}]-style, but cannot solve the [f,{x},{y},{z}]-style 
 
 
- asked by Scott Wang (15 votes), answered by Michael E2 (17 votes) 
 
---------------------------- 
 
[Get tab key to indent a block of 
code]\url{http://mathematica.stackexchange.com/questions/39876/get-tab-key- 
to-indent-a-block-of-code} 
 
Is there some way I can change Mathematica keyboard behavior so I could 
select a block of text/code, press tab, and the selection would be 
indented to right? Similarly, I would like shift+tab to  ... 
 
- asked by Murta (9 votes), answered by Leonid Shifrin (5 votes) 
 
---------------------------- 
 
[Probability of the sum of the largest n 
samples]\url{http://mathematica.stackexchange.com/questions/39848/probabili 
ty-of-the-sum-of-the-largest-n-samples} 
 
15 numbers are randomly chosen from U(0,1), what is the probability that 
the sum of largest four numbers is greater than 3.5? 
 
With[{f = OrderDistribution[{UniformDistribution[], 15}, #] &amp;}, 
... 
 
- asked by bobbym (9 votes), answered by belisarius (9 votes) 
 
---------------------------- 
 
[Create a new infix 
operator]\url{http://mathematica.stackexchange.com/questions/39696/create-a 
-new-infix-operator} 
 
It is well known that the infix operator @@ is used as a short form of 
Apply. 
 
For example, both Apply[f,{a,b,c}] and f@@{a,b,c} return f[a,b,c]} 
 
Also the infix operator @@@ is used as a short form  ... 
 
- asked by tchronis (8 votes), answered by Rojo (7 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[How to find the phase difference of two sampled sine 
waves?]\url{http://mathematica.stackexchange.com/questions/11046/how-to-fin 
d-the-phase-difference-of-two-sampled-sine-waves} 
 
I'm trying to measure a phase difference between two Sine functions I've 
acquired with a computer. I'm uploading one of the .txt files with the 
data I'm working with here: txt file. To remove the  ... 
 
- asked by Juan (19 votes), answered by bill s (18 votes) 
 
---------------------------- 
 
[Finding the best way to visualize rather complicated 
data]\url{http://mathematica.stackexchange.com/questions/33429/finding-the- 
best-way-to-visualize-rather-complicated-data} 
 
I have the following data 
 
data = {{7.5, 12.45, 12.45, 12.75, 12.75, 12.25, 12.25, 12.53, 12.53}, 
{8.5, 12.22, 12.22, 12.23, 12.23, 13, 13, 12.54, 12.54}, 
{9.5, 11.58, 11.53, 12.75, 13.48, 12.39,  ... 
 
- asked by Vaggelis_Z (12 votes), answered by Pinguin Dirk (10 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[How can I take a function as data from a text field in order to plot 
it?]\url{http://mathematica.stackexchange.com/questions/39755/how-can-i-tak 
e-a-function-as-data-from-a-text-field-in-order-to-plot-it} 
 
I would like to create a window where a student may enter an equation 
and, by clicking on a button, the function gets plotted. 
 
(Quiero realizar una ventana en la cual el alumno tenga la opcion de 
... 
 
- asked by Jenny Ojeda (1 vote) 
 
---------------------------- 
 
[Want explanation of when different looping constructs are 
appropriate]\url{http://mathematica.stackexchange.com/questions/39704/want- 
explanation-of-when-different-looping-constructs-are-appropriate} 
 
For example when would you use a Do loop over a For loop? For which 
tasks would you use Map, Table, Scan, et cetera? I'm quite new to 
Mathematica and I don't really get what the advantages of any of  ... 
 
- asked by Aron (1 vote) 
 
---------------------------- 
 
[Error messages from 
NDSOlve]\url{http://mathematica.stackexchange.com/questions/39820/error-mes 
sages-from-ndsolve} 
 
I am trying to solve a boundary value problem with NDSolve. The code is: 
 
sol = Block[{M = 0.0}, 
NDSolve[{ 
f'''[x] + f[x]*f''[x] - f'[x]*f'[x] - M*f'[x] == 0, 
f[0] == 0, f'[0] == 1, f'[15]  ... 
 
- asked by usman saeed (1 vote) 

Chapter 8
Year 2013

8.1 December 31, 2013
8.2 December 24, 2013
8.3 December 17, 2014
8.4 December 10, 2013
8.5 December 3, 2013
8.6 November 26, 2013
8.7 November 19, 2013
8.8 November 12, 2013
8.9 November 5, 2013
8.10 October 29, 2013
8.11 October 22, 2013
8.12 October 15, 2013
8.13 October 1, 2013
8.14 September 24, 2013
8.15 September 17, 2013
8.16 September 10, 2013
8.17 September 3, 2013
8.18 August 27, 2013
8.19 August 20, 2013
8.20 April 29, 2013
8.21 April 22, 2013
8.22 April 8, 2013

8.1 December 31, 2013

================================== 
Top new questions this week: 
================================== 
 
[How to generate a random 
snowflake]\url{http://mathematica.stackexchange.com/questions/39361/how-to- 
generate-a-random-snowflake} 
 
'Tis the season... 
And it's about time I posed my first question on Mathematica Stack 
Exchange. 
So, here's an holiday quest for you Graphics (and P-Chem?) gurus. 
 
What is your best code for generating  ... 
 
- asked by Peltio (79 votes), answered by Silvia (107 votes) 
 
---------------------------- 
 
[Exporting extremely large images; arrays generated via TensorProduct 
use 5 times as much RAM as 
expected?]\url{http://mathematica.stackexchange.com/questions/39412/exporti 
ng-extremely-large-images-arrays-generated-via-tensorproduct-use-5-times 
> } 
 
I am generating plots of the roots of certain classes of polynomials, in 
the spirit of the multicolored visuals on the Wiki page on algebraic 
numbers. I've thus far been able to make some extremely  ... 
 
- asked by DumpsterDoofus (15 votes), answered by ybeltukov (11 votes) 
 
---------------------------- 
 
[Plot discontinuous function with black and white disks marking 
discontinuities]\url{http://mathematica.stackexchange.com/questions/39445/p 
lot-discontinuous-function-with-black-and-white-disks-marking-discontinu 
ities} 
 
Let's say I'd like to plot Sign[x + 0.5]: 
 
Plot[Sign[x + 0.5], {x, -1, 1}] 
 
 
Mathematica will give this: 
 
 
 
This plot does not show very clearly the value of Sign[x + 0.5] at x = 
-0.5: is it 1? is  ... 
 
- asked by user11426 (11 votes), answered by Michael E2 (15 votes) 
 
---------------------------- 
 
[Zero-dimensional 
matrices]\url{http://mathematica.stackexchange.com/questions/39522/zero-dim 
ensional-matrices} 
 
In a recent Mathematica project, $(n \times 0)$- and $(0 \times 
n)$-dimensional matrices have suddenly become a frustratingly common 
edge case for me.  For instance, consider the following two  ... 
 
- asked by Eric Peterson (10 votes), answered by Michael E2 (4 votes) 
 
---------------------------- 
 
[Can I return lists with different dimensions from a compiled 
function?]\url{http://mathematica.stackexchange.com/questions/39360/can-i-r 
eturn-lists-with-different-dimensions-from-a-compiled-function} 
 
Sometimes I'll need several lists with different dimensions to be 
returned by a compiled function, but compiled function will fail if an 
irregular list contained: 
 
(* The real case is of course much  ... 
 
- asked by xzczd (10 votes), answered by Michael E2 (3 votes) 
 
---------------------------- 
 
[Output from Wolfram language in 
Python]\url{http://mathematica.stackexchange.com/questions/39546/output-fro 
m-wolfram-language-in-python} 
 
I have a Python program which will run a script in the Wolfram language 
and then return to the main program. Is it possible to return 
values/variables to the main program? 
 
This is the code in Python  ... 
 
- asked by Hamoudy (9 votes), answered by halirutan (14 votes) 
 
---------------------------- 
 
[Is it Possible to change dashes into circles with Plot 
command?]\url{http://mathematica.stackexchange.com/questions/39394/is-it-po 
ssible-to-change-dashes-into-circles-with-plot-command} 
 
Is it possible to change the Dashed Style of a curve into circles with 
Plot command ? 
 
Plot[Cos[x], {x, 0, 2*Pi}, PlotStyle -&gt; Directive[Dashed, 
Thickness[0.005]]] 
 
 
 
 
 
- asked by kamran (9 votes), answered by m_goldberg (4 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Are you interested in purchasing David Wagner's "Power programming with 
Mathematica"?]\url{http://mathematica.stackexchange.com/questions/16485/are 
-you-interested-in-purchasing-david-wagners-power-programming-with-mathe 
mat} 
 
I recently contacted McGraw-Hill to see if they have a mechanism in 
place for printing out-of-print books that are still of interest. 
Specifically, I asked about "Power programming with Mathematica"  ... 
 
- asked by Todd Allen (98 votes), answered by Todd Allen (126 votes) 
 
---------------------------- 
 
[Pick elements of largest absolute 
value]\url{http://mathematica.stackexchange.com/questions/31385/pick-elemen 
ts-of-largest-absolute-value} 
 
For example, given 
 
list = {{1, -3, -5}, {2, 1, 6}, {0, 2, 4}, {-9, 2, 6}} 
 
 
should return: 
 
{-5, 6, 4, -9} 
 
 
Updated 
 
I found a undocumented function called "Internal`MaxAbs",but it only 
accept two  ... 
 
- asked by expression (16 votes), answered by Simon Woods (20 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[How to extract structured array data from DefineDLLFunction in 
Mathematica]\url{http://mathematica.stackexchange.com/questions/39637/how-t 
o-extract-structured-array-data-from-definedllfunction-in-mathematica} 
 
I want to use my Bluechip PCI-ADC acquisition card in Mathematica via 
his dynamic link library Bcdll32.dll; (used to access functions on my 
PCI data acquisition cards). My problem is the function  ... 
 
- asked by ROSU CONSTANTIN (3 votes) 
 
---------------------------- 
 
[Return struct from function (with 
DownValues)]\url{http://mathematica.stackexchange.com/questions/39520/retur 
n-struct-from-function-with-downvalues} 
 
In Mathematica there is a way to create struct-like data type: 
 
struct[myField]=value 
 
 
I want to return myStruct from a function: 
 
getStruct[input_List] := Module[{struct}, 
(*populate  ... 
 
- asked by EvgenijM86 (3 votes) 
 
---------------------------- 
 
[Setting bash environment within external 
call]\url{http://mathematica.stackexchange.com/questions/39509/setting-bash 
-environment-within-external-call} 
 
I would like to run external command from Mathematica. For this I need 
to have bash environment configured via reading the content of 
${HOME}/.bashrc file. When I execute the following code in  ... 
 
- asked by mmal (1 vote) 
 

8.2 December 24, 2013

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

8.3 December 17, 2014

================================== 
Top new questions this week: 
================================== 
 
[How to plot contours in the faces of a 
cube]\url{http://mathematica.stackexchange.com/questions/38656/how-to-plot- 
contours-in-the-faces-of-a-cube} 
 
I'm trying to plot contours of a function f[x,y,z] on the faces of a 
cube as the example below, which represents the domain of this function. 
 
Is there a way to do it in Mathematica? The  ... 
 
- asked by RaphaelDavid (25 votes), answered by belisarius (10 votes) 
 
---------------------------- 
 
[Creating new graphics primitive (EdgeForm, 
FaceForm)]\url{http://mathematica.stackexchange.com/questions/38753/creatin 
g-new-graphics-primitive-edgeform-faceform} 
 
My question is strongly related to this question, nevertheless I would 
like to bring it to every ones attention. Lets say I want to create a 
new graphics primitive Boing which should look like this 
 
... 
 
- asked by halirutan (23 votes), answered by Simon Woods (18 votes) 
 
---------------------------- 
 
[Graphics elements do not line up perfectly in exported 
PDFs]\url{http://mathematica.stackexchange.com/questions/38745/graphics-ele 
ments-do-not-line-up-perfectly-in-exported-pdfs} 
 
Graphics elements do not always line up perfectly in exported PDFs. 
Take for example 
 
Graphics[{Point[{0, 1}], Line[{{0, 0}, {0, 1}}]}, AspectRatio -&gt; 
Automatic] 
 
 
It looks like this on screen: 
 
 
... 
 
- asked by Szabolcs (15 votes), answered by Szabolcs (13 votes) 
 
---------------------------- 
 
[Drawing an arrow pointing at the "Enable Dynamics" 
button]\url{http://mathematica.stackexchange.com/questions/38692/drawing-an 
-arrow-pointing-at-the-enable-dynamics-button} 
 
Sometimes my students are given Mathematica notebooks as part of an 
assignment, and asked to go through some demonstrations contained in the 
.nb file.  A lot of times I get complaints that the "graphs  ... 
 
- asked by Steve D (11 votes), answered by Alexei Boulbitch (9 votes) 
 
---------------------------- 
 
[ReplaceRepeated seemingly omits some 
rules]\url{http://mathematica.stackexchange.com/questions/38668/replacerepe 
ated-seemingly-omits-some-rules} 
 
Is there a simple way in Mathematica to prevent rule reordering? Let me 
give an example: 
 
a -&gt; b //. {b -&gt; c, (x_ -&gt; y_) -&gt; (x -&gt; Expand[y])} 
(* a -&gt; b *) 
 
 
though 
 
a -&gt; b /. {b  ... 
 
- asked by jondaman21 (10 votes), answered by Mr.Wizard (6 votes) 
 
---------------------------- 
 
[Formatting Excel Borders with 
.Net]\url{http://mathematica.stackexchange.com/questions/38891/formatting-e 
xcel-borders-with-net} 
 
I have various tables generated in a Mathematica application and need to 
export this to MSExcel formatted in a specific way. 
 
The Excel formatting has to be generated by Mathematica. I am not  ... 
 
- asked by BlueMac (9 votes), answered by WReach (11 votes) 
 
---------------------------- 
 
[Problem with numerical evaluation of analytically solved integral, 
solution way 
off]\url{http://mathematica.stackexchange.com/questions/38734/problem-with- 
numerical-evaluation-of-analytically-solved-integral-solution-way} 
 
The following command in Version 9.0.1: 
 
N[Integrate[x^50*Sin[x], {x, 0, 1}]] 
 
 
gives $1.4615\times 10^{48}$ which is way off from the correct solution 
which is between $0$ and $0.5$. 
 
Interestingly  ... 
 
- asked by vonjd (9 votes), answered by Szabolcs (12 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[ShowLegend 
values]\url{http://mathematica.stackexchange.com/questions/6236/showlegend- 
values} 
 
How do I get ShowLegend to put the max and min values that a plot 
produces. 
 
for example, when using ListDensityPlot, with PlotRange-&gt;Automatic, 
the plot can sometimes clip.  How do I get  ... 
 
- asked by Andrew Spott (23 votes), answered by Jens (30 votes) 
 
---------------------------- 
 
[Get a "step by step" evaluation in 
Mathematica]\url{http://mathematica.stackexchange.com/questions/148/get-a-s 
tep-by-step-evaluation-in-mathematica} 
 
Is it possible in Mathematica to get a step-by-step evaluation of some 
functions; that's to say, outputting not only the result but all the 
stages that have led to it? 
 
Example : Let's say I want to  ... 
 
- asked by Skydreamer (43 votes), answered by J.M. (38 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[What are the limits of the 
Prime-functions?]\url{http://mathematica.stackexchange.com/questions/38819/ 
what-are-the-limits-of-the-prime-functions} 
 
Will Prime and PrimePi test up to 3 * 10^12? Where can I find the limits 
for these funtions? Also, what are the limits for PrimeOmega and 
PrimeNu? More generally, is there any documentation that gives  ... 
 
- asked by martin (2 votes) 
 
---------------------------- 
 
[Efficient storage of Kronecker sum of circulant matrices+diagonal 
matrix]\url{http://mathematica.stackexchange.com/questions/38901/efficient- 
storage-of-kronecker-sum-of-circulant-matricesdiagonal-matrix} 
 
I have a square matrix of the form 
$$M=D+\overset{N}{\underset{n=1}\bigoplus}R_n,$$ 
 
where $R_n$ are circulant matrices, $D$ is a diagonal matrix and 
$\oplus$ is Kronecker sum. Its size is quite big,  ... 
 
- asked by Ruslan (2 votes) 
 
---------------------------- 
 
[What is available for editing Mathematica source code with 
Emacs?]\url{http://mathematica.stackexchange.com/questions/38838/what-is-av 
ailable-for-editing-mathematica-source-code-with-emacs} 
 
I can find several Emacs libraries for Mathematica, but I'm not aware of 
a clear favourite, a definitive list, or of a library which is actively 
maintained and developed. None of these appear to be in  ... 
 
- asked by Ian Hinder (6 votes)

8.4 December 10, 2013

================================== 
Top new questions this week: 
================================== 
 
[Unexpected dots from 
Line]\url{http://mathematica.stackexchange.com/questions/38443/unexpected-d 
ots-from-line} 
 
I have noticed cases where Line produces dots in a graphics object when 
I think it shouldn't. The first of these is: 
 
Line[{{0., 0.}}] 
 
 
The second is: 
 
Line[{{0., 0.}, {0., 0.}}] 
 
 
Longer lists of  ... 
 
- asked by m_goldberg (14 votes), answered by ybeltukov (3 votes) 
 
---------------------------- 
 
[How to replace an element in a list based on the value of the next 
element?]\url{http://mathematica.stackexchange.com/questions/38472/how-to-r 
eplace-an-element-in-a-list-based-on-the-value-of-the-next-element} 
 
I use Mathematica a little bit. I try to understand it, but it is hard 
 
I have a list of 5 numbers selected randomly from 0 and -1. I have to 
replace a 0 with a 1 when the 0 is followed by -1. 
 
My  ... 
 
- asked by user11021 (14 votes), answered by ybeltukov (14 votes) 
 
---------------------------- 
 
[How to pick increasing numbers from the 
list]\url{http://mathematica.stackexchange.com/questions/38325/how-to-pick- 
increasing-numbers-from-the-list} 
 
How to pick increasing numbers from the list. 
 
lst = {5, 3, 6, 2, 7, 4, 8}; 
 
 
out: 
 
{5,6,7,8} 
 
 
So many interesting answers, is it possible know the index of result 
elements or position of  ... 
 
- asked by Thomas (11 votes), answered by Simon Woods (6 votes) 
 
---------------------------- 
 
[How to collect expressions from cells created by 
Print?]\url{http://mathematica.stackexchange.com/questions/38216/how-to-col 
lect-expressions-from-cells-created-by-print} 
 
I have a notebook where evaluation of a certain cell produced hundreds 
of adjacent output cells using Print. I need to create a list containing 
all expressions from those output cells as elements, and  ... 
 
- asked by Vladimir Reshetnikov (11 votes), answered by belisarius (17 
votes) 
 
---------------------------- 
 
[How to constrain memory usage on 
HPC?]\url{http://mathematica.stackexchange.com/questions/38403/how-to-const 
rain-memory-usage-on-hpc} 
 
I found the performance of built-in function MemoryConstrained is very 
poor. It stops the evaluation after the memory already exceeds greatly 
than the values I set. 
 
There are several other questions  ... 
 
- asked by matheorem (9 votes) 
 
---------------------------- 
 
[Different results for integration using Mathematica and 
MATLAB]\url{http://mathematica.stackexchange.com/questions/38457/different- 
results-for-integration-using-mathematica-and-matlab} 
 
I have the following integration: 
 
$$\text{y}=2 \sqrt{\frac{1}{\pi }} \int_0^{\infty } \frac{e^{-z} 
\left(1-e^{-\frac{z}{b}} \left(\frac{a}{a+c 
z}\right)^L\right)}{\sqrt{z}} \, dz$$ 
 
I get different  ... 
 
- asked by barznjy (9 votes), answered by Peltio (8 votes) 
 
---------------------------- 
 
[Disconnected Frame/Axes in 
Plots]\url{http://mathematica.stackexchange.com/questions/38581/disconnecte 
d-frame-axes-in-plots} 
 
Is it possible to have "Tufte" style figure axes? That is so that the 
axes do not need to connect or span the entire data range? 
 
For an example of what I mean from the R's default histogram style: 
 
 
 
... 
 
- asked by Gabriel (8 votes), answered by Silvia (6 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[How to determine the center and radius of a circle given three points 
in 
3D?]\url{http://mathematica.stackexchange.com/questions/16209/how-to-determ 
ine-the-center-and-radius-of-a-circle-given-three-points-in-3d} 
 
I was wondering if anyone could give me a hand with this problem I have. 
 
I have six points on a plane, and I am trying to determine if they form 
a circle or not. 
 
I know that any three points in 2D  ... 
 
- asked by RedPotatoe (9 votes), answered by Mark McClure (15 votes) 
 
---------------------------- 
 
[Get a "step by step" evaluation in 
Mathematica]\url{http://mathematica.stackexchange.com/questions/148/get-a-s 
tep-by-step-evaluation-in-mathematica} 
 
Is it possible in Mathematica to get a step-by-step evaluation of some 
functions; that's to say, outputting not only the result but all the 
stages that have led to it? 
 
Example : Let's say I want to  ... 
 
- asked by Skydreamer (43 votes), answered by  J.M. (38 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Manipulating the pitch of a 
sound]\url{http://mathematica.stackexchange.com/questions/38423/manipulatin 
g-the-pitch-of-a-sound} 
 
After reading Manipulating a continuous stream of sounds I have to ask 
about controlling the frequency of a Sin sound in a continuous manner, 
with a Play inside a Manipulate, for example. The result  ... 
 
- asked by Andrestand (3 votes) 
 
---------------------------- 
 
[How to get vertices of a polytope given by equalities and 
inequalities?]\url{http://mathematica.stackexchange.com/questions/38414/how 
-to-get-vertices-of-a-polytope-given-by-equalities-and-inequalities} 
 
I have a polytope given by some equalities and inequalities, how can I 
get all the vertices of the polytope? 
If there's a way to deal with the one given by inequalities only, how 
can I reduce the  ... 
 
- asked by Jason (3 votes) 
 
---------------------------- 
 
[Solar system simulation (n-body physics) with 
OpenCL]\url{http://mathematica.stackexchange.com/questions/38478/solar-syst 
em-simulation-n-body-physics-with-opencl} 
 
I would like to simulate a n-body solar system in Mathematica. I have 
found the following example:  ... 
 
- asked by shrx (1 vote) 

8.5 December 3, 2013

================================== 
Top new questions this week: 
================================== 
 
[Can Mathematica determine part-of-speech for each word in a 
text?]\url{http://mathematica.stackexchange.com/questions/38053/can-mathema 
tica-determine-part-of-speech-for-each-word-in-a-text} 
 
I've found that WordData has a database of English words and their 
possible parts of speech. But some words are ambiguous, e.g. result can 
be a verb or a noun: 
 
In[7]:= WordData["result",  ... 
 
- asked by F'x (16 votes), answered by ssch (12 votes) 
 
---------------------------- 
 
[Whether Wolfram Mathematica suits well for doing app in it instead of 
C++]\url{http://mathematica.stackexchange.com/questions/37888/whether-wolfr 
am-mathematica-suits-well-for-doing-app-in-it-instead-of-c} 
 
At uni I have an yearly essay. I'm allowed to use any technology for 
implementing it. I've been coding it in C++ with Qt. I thought of about 
Wolfram Mathematica because I have some expirience in it. 
 
... 
 
- asked by gekannt (14 votes), answered by Murta (27 votes) 
 
---------------------------- 
 
[How to enumerate all possible binary 
associations?]\url{http://mathematica.stackexchange.com/questions/37869/how 
-to-enumerate-all-possible-binary-associations} 
 
Suppose I have a list of symbols like: 
 
{a,b,c,d} 
 
 
I would like to enumerate all possible binary associations (combining 
symbols and/or sublists pairwise): 
 
{{{a,b},c},d} 
{{a,b},{c,d}} 
{a,{b,{c,d}}} 
... 
 
- asked by Everett You (12 votes), answered by ybeltukov (11 votes) 
 
---------------------------- 
 
[How to get list of duplicates when using 
DeleteDuplicates?]\url{http://mathematica.stackexchange.com/questions/37936 
/how-to-get-list-of-duplicates-when-using-deleteduplicates} 
 
This might be easy, but can't find a way to use DeleteDuplicates to get 
also list of the actual duplicates. 
 
Example: 
 
lstA = {1, 2, 4, 4, 6, 7, 8, 8}; 
r = DeleteDuplicates[lstA] 
(* {1, 2, 4, 6, 7,  ... 
 
- asked by Nasser (11 votes), answered by Mr.Wizard (13 votes) 
 
---------------------------- 
 
[Raspberry Pi GPIO operations with 
Mathematica]\url{http://mathematica.stackexchange.com/questions/37926/raspb 
erry-pi-gpio-operations-with-mathematica} 
 
I started exploring GPIO operations on the RPi with Mathematica by 
following this brief tutorial which describes how to use DeviceWrite to 
cycle an LED on and off.  A natural extension is to use  ... 
 
- asked by bobthechemist (11 votes), answered by Daniel Chisholm (6 
votes) 
 
---------------------------- 
 
[Reduce can't reduce an equation without appropriate 
assumptions]\url{http://mathematica.stackexchange.com/questions/38118/reduc 
e-cant-reduce-an-equation-without-appropriate-assumptions} 
 
When the number of unknowns is three (x, y, z), Mathematica can solve 
it: 
 
Reduce[Abs[x] + Abs[y] + Abs[z] == 1 &amp;&amp; z != 0, {x, y, z}, 
Reals, Backsubstitution -&gt; True] 
 
 
for four variables  ... 
 
- asked by expression (9 votes), answered by Artes (11 votes) 
 
---------------------------- 
 
[Pasting monospaced text into Mathematica notebook destroys 
aligment]\url{http://mathematica.stackexchange.com/questions/38073/pasting- 
monospaced-text-into-mathematica-notebook-destroys-aligment} 
 
I drew the little ASCII-art electronics schema below in vim. 
 
When i try to paste it into a Mathematica notebook, with: 
 
A) A code cell 
B) A monospaced font (Courier New) 
 
Mathematica insists on  ... 
 
- asked by blondiepassesby (9 votes), answered by WReach (11 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Mathematica9 linux version crash, how to fix 
it?]\url{http://mathematica.stackexchange.com/questions/17163/mathematica9- 
linux-version-crash-how-to-fix-it} 
 
Ubuntu 12.04  x86_64   kernel 3.2.0-35-generic 
Mathematica 9 linux version (x86_64) crashes with errors: 
 
 
X Error of failed request:  BadGC (invalid GC parameter) 
Major opcode of failed request:   ... 
 
- asked by goodluck (10 votes), answered by goodluck (14 votes) 
 
---------------------------- 
 
[Calling MATLAB from 
Mathematica]\url{http://mathematica.stackexchange.com/questions/10231/calli 
ng-matlab-from-mathematica} 
 
How can I call MATLAB functions directly from Mathematica and transfer 
data/variables between the two systems? 
 
 
- asked by siva82kb (29 votes), answered by Szabolcs (35 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[ParametricNDSolve and 
ProcessEquations]\url{http://mathematica.stackexchange.com/questions/37942/ 
parametricndsolve-and-processequations} 
 
I have a question regarding NDSolve`ProcessEquations and 
ParametricNDSolve. 
 
When using the regular NDSolve we have the option to divide the 
integration into the three steps ProcessEquations, Iterate  ... 
 
- asked by jaclea (1 vote) 
 
---------------------------- 
 
[How to set the working precision globally? $MinPrecision does not 
work]\url{http://mathematica.stackexchange.com/questions/38114/how-to-set-t 
he-working-precision-globally-minprecision-does-not-work} 
 
I want to increase the precision globally to 50 at least, but 
$MinPrecision does not work. 
 
$MinPrecision = 50; 
x = Sin[2.] 
(* -&gt; 0.909297 *) 
 
Precision[x] 
(* -&gt; MachinePrecision *) 
 
 
How to set  ... 
 
- asked by renphysics (3 votes) 
 
---------------------------- 
 
[matrix with IF/THEN 
condition]\url{http://mathematica.stackexchange.com/questions/37905/matrix- 
with-if-then-condition} 
 
How to generate all posible matrices with some conditions on the 
elements? 
 
I need to make for given $n$ all $n\times n$ matrices $A=(a_{ij})$ with 
three conditions: 
 
 
I. $a_{ij}=+1$ or $0$ or $-1$. 
... 
 
- asked by aeiklmkv (1 vote)

8.6 November 26, 2013

================================== 
Top new questions this week: 
================================== 
 
[Is Mathematica an Implementation of the Wolfram 
Language?]\url{http://mathematica.stackexchange.com/questions/37557/is-math 
ematica-an-implementation-of-the-wolfram-language} 
 
I am trying to figure out what the announcement of the Wolfram Language 
means for Mathematica. 
 
Is Mathematica an implementation of the Wolfram Language, or is it 
something else? 
 
 
- asked by Eric Brown (21 votes) 
 
---------------------------- 
 
[How to plot a certain surface? What is its parametric 
equation?]\url{http://mathematica.stackexchange.com/questions/37698/how-to- 
plot-a-certain-surface-what-is-its-parametric-equation} 
 
The surface show below is very beautiful; however, I don't know its 
function either as an implicit function or in parametric form. 
 
Anyone have an idea about it and how to draw it with Mathematica? 
 
 
 
 
- asked by LCFactorization (14 votes), answered by kirma (35 votes) 
 
---------------------------- 
 
[CompiledFunction returns machine numbers smaller than 
$MinMachineNumber]\url{http://mathematica.stackexchange.com/questions/37764 
/compiledfunction-returns-machine-numbers-smaller-than-minmachinenumber> 
) 
 
When thinking on the workaround for this LogLogPlot bug suggested by 
halirutan I noticed that CompiledFunction actually can return machine 
numbers smaller than $MinMachineNumber. Consider: 
 
f =  ... 
 
- asked by Alexey Popkov (13 votes), answered by ybeltukov (12 votes) 
 
---------------------------- 
 
[Laplace transform of $\frac{1-\cos 
(t)}{t}$]\url{http://mathematica.stackexchange.com/questions/37480/laplace- 
transform-of-frac1-cos-tt} 
 
In the documentation, it states that 
 
 
The Laplace transform of a function $f(t)$ is defined to be 
$\int_0^{\infty } f(t) e^{-s t} \, \mathrm{d}t$. 
 
 
But why can Mathematica not get the Laplace  ... 
 
- asked by xslittlegrass (13 votes), answered by Vladimir Reshetnikov 
(17 votes) 
 
---------------------------- 
 
[Why is multidimensional Reverse 
slow?]\url{http://mathematica.stackexchange.com/questions/37777/why-is-mult 
idimensional-reverse-slow} 
 
I have found that multidimensional Reverse is ~10 times slower than 
exact -1 ;; 1 ;; -1: 
 
n = 1000; 
mat = RandomReal[1, {n, n}]; 
 
mat2 = Reverse[mat, 2]; // AbsoluteTiming 
mat3 = mat[[All, -1 ;; 1 ;;  ... 
 
- asked by ybeltukov (12 votes), answered by Mr.Wizard (3 votes) 
 
---------------------------- 
 
[How can I remove the singleton dimensions of an 
array?]\url{http://mathematica.stackexchange.com/questions/37656/how-can-i- 
remove-the-singleton-dimensions-of-an-array} 
 
If I have an array A, for which Dimensions[A] is {9, 9, 1, 1, 3, 4}, how 
can I convert A' into an array with dimensions {9, 9, 3, 4}? 
 
I think there is a built-in function for this, but I can't  ... 
 
- asked by LCFactorization (11 votes), answered by Simon Woods (10 
votes) 
 
---------------------------- 
 
[Concatenation of lists in a Fibonacci-like 
pattern]\url{http://mathematica.stackexchange.com/questions/37705/concatena 
tion-of-lists-in-a-fibonacci-like-pattern} 
 
I am trying to create a List of elements that follow the general 
pattern: 
 
$$X_{n+1} = X_n X_{n-1}$$ 
 
where the operation on the right hand side is concatenation, i.e., 
joining. 
 
I want to achieve the  ... 
 
- asked by user106492 (10 votes), answered by Simon Woods (11 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Mathematica9 linux version crash, how to fix 
it?]\url{http://mathematica.stackexchange.com/questions/17163/mathematica9- 
linux-version-crash-how-to-fix-it} 
 
Ubuntu 12.04  x86_64   kernel 3.2.0-35-generic 
Mathematica 9 linux version (x86_64) crashes with errors: 
 
 
X Error of failed request:  BadGC (invalid GC parameter) 
Major opcode of failed request:   ... 
 
- asked by goodluck (9 votes), answered by goodluck (13 votes) 
 
---------------------------- 
 
[How do I save a variable or function definition to a 
file?]\url{http://mathematica.stackexchange.com/questions/1959/how-do-i-sav 
e-a-variable-or-function-definition-to-a-file} 
 
Is it possible to save a function which was created via Interpolation of 
some data in such a way that I can use this function in a new 
Mathematica session without repeated interpolation of the data? 
 
... 
 
- asked by partial81 (27 votes), answered by acl (24 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Plotting basin 
boundary]\url{http://mathematica.stackexchange.com/questions/37611/plotting 
-basin-boundary} 
 
How to plot the basin boundary in Mathematica? 
I have been trying to do this using the system 
 
y''[t] == -R y'[t] + (( Y[1] - y[t])/(Sqrt[(X[1] - x[t])^2 + (Y[1] - 
y[t])^2 + d^2])^3 
... 
 
- asked by HQH (1 vote) 
 
---------------------------- 
 
[How do I use Greek characters in the WindowTitle option of 
CreateWindow?]\url{http://mathematica.stackexchange.com/questions/37635/how 
-do-i-use-greek-characters-in-the-windowtitle-option-of-createwindow} 
 
I am trying to write some exercises in Greek using CreateWindow. My 
problem is with using Greek characters in the option WindowTitle. For 
example, with 
 
CreateWindow[DocumentNotebook[{a}, WindowTitle  ... 
 
- asked by kornaros (2 votes) 
 
---------------------------- 
 
[Need help fixing fit, eliminating the error of property values assuming 
unconstrained model, and correcting script for an implicit 
function]\url{http://mathematica.stackexchange.com/questions/37570/need-hel 
p-fixing-fit-eliminating-the-error-of-property-values-assuming-unconstr> 
) 
 
I fit some data with FindFit and NonlinearModelFit as well as obtained 
the parameter table and ANOVA table: 
 
data = {{82.5, 5.75}, {75, 5.965}, {68.75, 6}, {63.45, 6.01}, {58.95, 
6.03}, {55, 6.04}}; 
 
... 
 
- asked by chy (2 votes)

8.7 November 19, 2013

================================== 
Top new questions this week: 
================================== 
 
[Even Fibonacci 
numbers]\url{http://mathematica.stackexchange.com/questions/37266/even-fibo 
nacci-numbers} 
 
Today, I found the Euler Project. Problem #2 is 
 
 
Each new term in the Fibonacci sequence is generated by adding the 
previous two terms. By starting with 1 and 2, the first 10 terms will 
be: 
 
1,  ... 
 
- asked by Tangshutao (19 votes), answered by rcollyer (28 votes) 
 
---------------------------- 
 
[How to split list into disjoint 
lists?]\url{http://mathematica.stackexchange.com/questions/37249/how-to-spl 
it-list-into-disjoint-lists} 
 
I wonder if there is any simple way to split a list into its disjoint 
sublists, e.g. from 
 
list={{a,b},{e,f},{b,c},{c,d},{f,g,h}} 
 
 
get a result 
 
listdis={{{a,b},{b,c},{c,d}},{{e,f},{f,g,h}}}, 
 
 
so  ... 
 
- asked by krzysiekb (13 votes), answered by Leonid Shifrin (11 votes) 
 
---------------------------- 
 
[How to draw a 
spring?]\url{http://mathematica.stackexchange.com/questions/37207/how-to-dr 
aw-a-spring} 
 
I am new to Mathematica and have recently been exploring graphical 
animations. So I was experimenting with simple concepts in periodic 
motion and hence wondered how can I draw a simple spring? Is  ... 
 
- asked by David McHarg (13 votes), answered by belisarius (11 votes) 
 
---------------------------- 
 
[How to programmatically remove menu 
items]\url{http://mathematica.stackexchange.com/questions/36923/how-to-prog 
rammatically-remove-menu-items} 
 
I would like to do the opposite of what is described here. So rather 
than add a menu item I would like to programmatically remove one (or 
more). So given a knowledge of the structure of the menu *.tr  ... 
 
- asked by Mike Honeychurch (9 votes) 
 
---------------------------- 
 
[Impact Crater 
Simulation]\url{http://mathematica.stackexchange.com/questions/37183/impact 
-crater-simulation} 
 
I have been trying to model crater formation on a given planetary 
surface - $500\,\textrm{km}^2$. The locations of impacts are random, 
however, if an impact is within $30\,\textrm{km}$ of another, the  ... 
 
- asked by Benjamin L (8 votes), answered by belisarius (6 votes) 
 
---------------------------- 
 
[What is wrong with my expression for 
compiling?]\url{http://mathematica.stackexchange.com/questions/37262/what-i 
s-wrong-with-my-expression-for-compiling} 
 
Following code was translated from a snippet matlab code. Without 
compiling it worked slowly. I want to compile it, but am getting a 
numerical error. How do I compile this in a correct way? 
 
 
 
data =  ... 
 
- asked by expression (7 votes), answered by ybeltukov (10 votes) 
 
---------------------------- 
 
[how to simplify large expression with lots of special functions in it 
(BesselY, Hypergeometric, MeijerG 
etc...)]\url{http://mathematica.stackexchange.com/questions/37289/how-to-si 
mplify-large-expression-with-lots-of-special-functions-in-it-bessely} 
 
I saw this DE in Maple forum. When solving it using Mathematica 9.01, 
even though the result was correct (both solutions gave the same 
numerical answer for some random values), Mathematica's answer  ... 
 
- asked by Nasser (7 votes), answered by ssch (1 vote) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[How can I improve Mathematica's resolution on a macbook retina 
display?]\url{http://mathematica.stackexchange.com/questions/18419/how-can- 
i-improve-mathematicas-resolution-on-a-macbook-retina-display} 
 
Mathematica 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 
 
 
 
 
- asked by Tom Wellington (28 votes), answered by programming_historian 
(11 votes) 
 
---------------------------- 
 
[Where can I find examples of good Mathematica programming 
practice?]\url{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. (234 votes), answered by Faysal Aberkane (220 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[The number of real values assumed by combinations of complex roots of a 
decic]\url{http://mathematica.stackexchange.com/questions/36933/the-number- 
of-real-values-assumed-by-combinations-of-complex-roots-of-a-decic} 
 
Define complex conjugate as the pair of complex numbers $a+bi,a-bi$. 
Assume you have 5 such pairs and they are the 10 roots $x_i$ of a 
10th-deg equation with integer coefficients. In general, how many  ... 
 
- asked by Tito Piezas III (1 vote) 
 
---------------------------- 
 
[Odd colourization for FourierParameters. UI 
bug?]\url{http://mathematica.stackexchange.com/questions/37133/odd-colouriz 
ation-for-fourierparameters-ui-bug} 
 
The Mathematica UI colourizes the FourierParameters in the following 
 
Clear[x, y] 
g[x_, y_] = x^2 y ; 
f[x_, y_] = 
FourierSeries[x^2 y, {x, y}, {4, 4}, FourierParameters -&gt; {1, 2 Pi}] 
 
 
as in the  ... 
 
- asked by Peeter Joot (2 votes) 
 
---------------------------- 
 
[Using FunctionExpand[] to evaluate symbolic 
derivatives]\url{http://mathematica.stackexchange.com/questions/37293/using 
-functionexpand-to-evaluate-symbolic-derivatives} 
 
Some symbolic derivatives of certain special function are not expanded 
automatically, but FunctionExpand often helps to get a derivative-free 
closed form expression. 
 
Derivative[1, 0][BesselJ][0, 1] 
... 
 
- asked by Vladimir Reshetnikov (5 votes) 

8.8 November 12, 2013

================================== 
Top new questions this week: 
================================== 
 
[Kernel inexplicably hangs if I define a pure function without 
suppressing 
output]\url{http://mathematica.stackexchange.com/questions/35629/kernel-ine 
xplicably-hangs-if-i-define-a-pure-function-without-suppressing-output} 
 
Save any unsaved work before trying as it may crash Mathematica and 
other programs 
 
In v9.0.1.0 on OSX 10.8.5, if I start a new session and define two 
functions 
 
f1P = Sin[#^Sin[Sqrt[Gamma[#]]]]  ... 
 
- asked by gpap (14 votes), answered by m_goldberg (4 votes) 
 
---------------------------- 
 
 
[Bug in 
RepeatedNull?]\url{http://mathematica.stackexchange.com/questions/36850/bug 
-in-repeatednull} 
 
RepeatedNull appears to be buggy (version 8.0). 
 
Define f as follows: 
 
In[1]:= f@s:{h_@___...} := List @@@ s 
 
 
f is intended to accept (possibly empty) List of non-atomic (possibly 
empty) expressions  ... 
 
- asked by Akater (13 votes), answered by m_goldberg (5 votes) 
 
---------------------------- 
 
[Equivalent Nested Loop 
Structure]\url{http://mathematica.stackexchange.com/questions/35560/equival 
ent-nested-loop-structure} 
 
Consider the following examples: 
 
Flatten @ Table[ f[a, b, c], {a, 1, 3}, {b, 1, 3}, {c, 1, 3}] == 
f @@@ Tuples[ Range[3], 3] 
 
Flatten @ Table[ If[ a != b != c, f[a, b, c], Unevaluated[]], 
... 
 
- asked by expression (12 votes), answered by Ray Koopman (2 votes) 
 
---------------------------- 
 
[Finding the volume of a sphere using the Monte Carlo 
algorithm]\url{http://mathematica.stackexchange.com/questions/35683/finding 
-the-volume-of-a-sphere-using-the-monte-carlo-algorithm} 
 
I used the following code to find the volume of the sphere $x^2+y^2+z^2 
= 1$ in the first octant: 
 
McVolume[Num_] := 
Module[{hit, miss, index, x, y, z}, hit = 0; miss = 0; 
 
For[index = 1, index  ... 
 
- asked by johny (12 votes), answered by Szabolcs (15 votes) 
 
---------------------------- 
 
[Making code version 
aware]\url{http://mathematica.stackexchange.com/questions/36806/making-code 
-version-aware} 
 
Mathics, a free Mathematica-compatible project has been recently 
launched. It provides a subset of the functions and capabilities of 
Mathematica at a slower pace. 
 
This opens us the tantalizing  ... 
 
- asked by magma (11 votes), answered by magma (5 votes) 
 
---------------------------- 
 
[Partitioning a list of numbers the Mathematica 
way]\url{http://mathematica.stackexchange.com/questions/36867/partitioning- 
a-list-of-numbers-the-mathematica-way} 
 
I have two sorted lists, one list will be called the "fences" and the 
other the "values" 
 
Fences could be: $\{1, 5, 9, 14\}$ 
 
Values could be $\{-1, 1, 3, 4, 6, 9, 10, 13, 14, 15\}$ 
 
I want to  ... 
 
- asked by muzzlator (10 votes), answered by Ray Koopman (18 votes) 
 
---------------------------- 
 
[Any way to make my equations look better, more Latex 
like?]\url{http://mathematica.stackexchange.com/questions/36697/any-way-to- 
make-my-equations-look-better-more-latex-like} 
 
I find that the equations I write in Mathematica are not always 
publication quality. Here is a typical example: 
 
 
 
If I copy as Latex, then I get the following code: 
 
\frac{\sum _{i=1}^N \frac{(k|k)  ... 
 
- asked by Tyler Durden (9 votes), answered by Mike Honeychurch (9 
votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[How to manipulate 2D 
plots?]\url{http://mathematica.stackexchange.com/questions/7142/how-to-mani 
pulate-2d-plots} 
 
When it comes to visual analysis, large datasets or data with intricate 
internal details often makes plotting in 2D useless, as the outcome is 
either just a fraction of the full dataset, or no details  ... 
 
- asked by Istvan Zachar (58 votes), answered by Istvan Zachar (56 
votes) 
 
---------------------------- 
 
[Programmatic approach to HDR photography with Mathematica image 
processing 
functions]\url{http://mathematica.stackexchange.com/questions/9342/programm 
atic-approach-to-hdr-photography-with-mathematica-image-processing-funct 
> } 
 
The High dynamic range imaging (HDR or HDRI) direction in photography 
and image processing became very popular recently. Besides obvious photo 
art applications (see examples), there are many great  ... 
 
- asked by Vitaliy Kaurov (44 votes), answered by Simon Woods (30 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[How can I set constraints on parameters in NelderMeadMinimize 
package?]\url{http://mathematica.stackexchange.com/questions/35651/how-can- 
i-set-constraints-on-parameters-in-neldermeadminimize-package} 
 
I read about NelderMeadMinimize package. How can I set constraints on 
the parameters? For example I want to minimize an equation with 10 
parameters such as {a1, a2, ....}. I want to put the condition  ... 
 
- asked by Soodeh Z. (1 vote) 
 
---------------------------- 
 
[WhenEvent method with 3 
conditions]\url{http://mathematica.stackexchange.com/questions/36869/whenev 
ent-method-with-3-conditions} 
 
I am trying to solve system of differential equations below 
 
$x''(t)=-2.25cos(1.5t)-x(t)-x'(t)$ 
 
$y''(t)=-1.125cos(1.5t)-4y(t)-y'(t)$ 
 
for $x&gt;(1+y)$ then  $z'(t)=x(t)-(1+y(t))$ 
for $|x|&lt;(1+y)$  ... 
 
- asked by Dadan Ari Wibowo (1 vote) 
 
---------------------------- 
 
[Caching data in Mathematica 
package]\url{http://mathematica.stackexchange.com/questions/36875/caching-d 
ata-in-mathematica-package} 
 
Consider the following: 
 
m=Quantity[1,"meter"] 
 
 
If I run the package, it will return 1m 
 
But when I load the package, the package is re-evaluated meaning, that 
internet i required. 
 
Is it possible to  ... 
 
- asked by OskarNS (1 vote)

8.9 November 5, 2013

================================== 
Top new questions this week: 
================================== 
 
[Incorrect result from 
Integrate]\url{http://mathematica.stackexchange.com/questions/35324/incorre 
ct-result-from-integrate} 
 
I attempted to calculate the following integral: 
 
Integrate[ Sqrt[x] Exp[-(x - a)^2], {x, 0, Infinity}, Assumptions -&gt; a &gt; 
0] 
 
1/(4 Sqrt[a])I E^(-(a^2/2)) Pi( a^2 BesselI[-(1/4), a^2/2] - (1 + a^2) 
... 
 
- asked by DumpsterDoofus (12 votes), answered by Michael E2 (10 votes) 
 
---------------------------- 
 
[Unpacked eigenvectors of complex 
matrices]\url{http://mathematica.stackexchange.com/questions/35266/unpacked 
-eigenvectors-of-complex-matrices} 
 
I want to calculate eigenvectors of a Hermitian matrix. For example 
 
$HistoryLength = 0; 
n = 3000; 
mat = # + ConjugateTranspose[#] &amp;@RandomComplex[{0, 1 + I}, {n, n}]; 
evec = Eigenvectors[mat]; 
 
 
... 
 
- asked by ybeltukov (11 votes), answered by halirutan (8 votes) 
 
---------------------------- 
 
[Wrong numerical value while exporting to a JSON 
string]\url{http://mathematica.stackexchange.com/questions/35165/wrong-nume 
rical-value-while-exporting-to-a-json-string} 
 
The following code: 
 
ExportString[{"a" -&gt; 2000000., "b" -&gt; 0.000001}, "JSON"] 
 
 
Gives the results 
 
{"a" : 2.e60, 
"b" : 1.e-6} 
 
 
The first one is obviously having a wrong numerical value. Also,  ... 
 
- asked by hwlau (11 votes), answered by hwlau (6 votes) 
 
---------------------------- 
 
[Boundary effect of Graphics3D object 
Tube[]]\url{http://mathematica.stackexchange.com/questions/35331/boundary-e 
ffect-of-graphics3d-object-tube} 
 
I draw a Graphics3D object of two tubes: 
 
Graphics3D[{Tube[{{-0.2, -1, 0}, {-0.2, 1, 0}}, 0.05], 
Tube[{{0, 0, -1}, {0, 0, 1}}, 0.05]}, Boxed -&gt; False] 
 
 
And I get this: 
 
 
 
Now I want to have  ... 
 
- asked by 9527 (10 votes), answered by ybeltukov (10 votes) 
 
---------------------------- 
 
[Monitoring progress of long 
calculations]\url{http://mathematica.stackexchange.com/questions/35139/moni 
toring-progress-of-long-calculations} 
 
I've came upon a few methods of how to display "processing" information 
while Mathematica is running. But, from what I've understood, this only 
works in between lines of codes. Is it possible to  ... 
 
- asked by Gabriel (10 votes), answered by Simon Woods (8 votes) 
 
---------------------------- 
 
[How to find a specific color in one 
picture?]\url{http://mathematica.stackexchange.com/questions/35132/how-to-f 
ind-a-specific-color-in-one-picture} 
 
In a picture, there are many different colors. How can I just want to 
find the position of one color. In the following picture, if I would 
like to find the coordinates of the position of blue, how can  ... 
 
- asked by KathyLL (9 votes), answered by cormullion (12 votes) 
 
---------------------------- 
 
[Is there a way to make the "Details" section of the documentation 
expand by 
default?]\url{http://mathematica.stackexchange.com/questions/35370/is-there 
-a-way-to-make-the-details-section-of-the-documentation-expand-by-defa} 
 
By default, the Mathematica documentation opens with the "Details" 
section collapsed. 
 
 
 
This is never what I'm looking for  in fact, I've lost count of the 
times I've sought help on a feature and  ... 
 
- asked by raxacoricofallapatorius (8 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[xkcd-style 
graphs]\url{http://mathematica.stackexchange.com/questions/11350/xkcd-style 
-graphs} 
 
 
 
I received an email to which I wanted to respond with a xkcd-style 
graph, but I couldn't manage it. Everything I drew looked perfect, and I 
don't have enough command over PlotLegends to have these  ... 
 
- asked by Amatya (392 votes), answered by Simon Woods (261 votes) 
 
---------------------------- 
 
[Can one identify the design patterns of 
Mathematica?]\url{http://mathematica.stackexchange.com/questions/24988/can- 
one-identify-the-design-patterns-of-mathematica} 
 
... or are they unnecessary in such a high-level language? 
 
I've been thinking about programming style, coding standards and the 
like quite a bit lately, the result of my current work on a mixed  ... 
 
- asked by Verbeia (52 votes), answered by Leonid Shifrin (43 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Problem in exporting a plot with background to 
pdf]\url{http://mathematica.stackexchange.com/questions/35131/problem-in-ex 
porting-a-plot-with-background-to-pdf} 
 
Just wondering if someone could help me for this problem. I have 
utilised prolog to use a jpg image as the background of my plot in order 
to compare my results with a reference plot. 
Although the  ... 
 
- asked by mak maak (1 vote) 
 
---------------------------- 
 
[Series expansion: Taylor series takes huge amount of 
time]\url{http://mathematica.stackexchange.com/questions/35372/series-expan 
sion-taylor-series-takes-huge-amount-of-time} 
 
I'm working on a notebook, trying to expand the root of a cubic 
polynomial in Taylor series.  When I type: 
 
Series[(Sqrt[46656 a^2 - 864 (3 2^(1/3) a^(2/3) + 2 a B)^3] + 216 
a)^(1/3) , {a, 0, 2}] 
 
 
... 
 
- asked by user10387 (2 votes) 
 
---------------------------- 
 
[How to define tensor fields in 
Mathematica?]\url{http://mathematica.stackexchange.com/questions/35374/how- 
to-define-tensor-fields-in-mathematica} 
 
I am wondering if the is any (neat) way to define tensor fields in 
Mathematica. Let me be more specific, using an example: 
 
For instance a tensor W with 3 indices, which is anti symmetric in the 
first  ... 
 
- asked by user10389 (1 vote)

8.10 October 29, 2013

================================== 
Top new questions this week: 
================================== 
 
[Nice formatting for the results of a dice game 
simulation]\url{http://mathematica.stackexchange.com/questions/34861/nice-f 
ormatting-for-the-results-of-a-dice-game-simulation} 
 
One of my Mathematica interests is in problems related to the formatting 
of  output. Getting nice formatting from Mathematica is often 
frustrating, but occasionally Mathematica will delight me by  ... 
 
- asked by m_goldberg (22 votes), answered by ssch (16 votes) 
 
---------------------------- 
 
[Export Code to 
Pseudocode?]\url{http://mathematica.stackexchange.com/questions/34997/expor 
t-code-to-pseudocode} 
 
I'm writing a paper and all my code is in Mathematica. The snippets are 
mostly simple, and consist of loops, maps, variables, and conditionals. 
I'd like add it to my paper, however, not many academic  ... 
 
- asked by M.R. (13 votes) 
 
---------------------------- 
 
[How to efficiently find moments of a multinormal 
distribution?]\url{http://mathematica.stackexchange.com/questions/34779/how 
-to-efficiently-find-moments-of-a-multinormal-distribution} 
 
I have a multinormal distribution with covariance matrix $\sigma$ and 
zero mean. I want to find moment 
 
$$ 
E[x_1^{r_1}x_2^{r_2}\cdots x_n^{r_n}] =\,? 
$$ 
 
Of course, there is a build-in function  ... 
 
- asked by ybeltukov (9 votes), answered by ybeltukov (9 votes) 
 
---------------------------- 
 
[Problem importing a JCAMP-DX mass spectral 
file]\url{http://mathematica.stackexchange.com/questions/34624/problem-impo 
rting-a-jcamp-dx-mass-spectral-file} 
 
I have some problems importing a JCAMP-DX EI-mass spectral file using 
Mathematica 9. 
For example, if I download the mass spectrum of nonacosane in JCAMP 
format from NIST, 
... 
 
- asked by Tom Wenseleers (8 votes), answered by Sjoerd C. de Vries (8 
votes) 
 
---------------------------- 
 
[How to partition a list of numbers in two lists of numbers such that 
each lists elements sums up to the same 
number?]\url{http://mathematica.stackexchange.com/questions/34952/how-to-pa 
rtition-a-list-of-numbers-in-two-lists-of-numbers-such-that-each-lists} 
 
I have the following list of squares. 
 
{1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256} 
 
 
Their sum is $1496$, I want to make two partitions with the given 
numbers and each  ... 
 
- asked by Gustavo Bandeira (7 votes), answered by Daniel Lichtblau (8 
votes) 
 
---------------------------- 
 
[finding 
anagrams]\url{http://mathematica.stackexchange.com/questions/34720/finding- 
anagrams} 
 
What I'm trying to find are the 4 letter words in the mathematica 
dictionary that have the most anagrams and the amount of anagrams these 
have each. 
 
But I can't seem to find all the 4 letter words in  ... 
 
- asked by jas (7 votes), answered by rcollyer (7 votes) 
 
---------------------------- 
 
[How can I scale a plot in vector graphic or PDF 
form?]\url{http://mathematica.stackexchange.com/questions/34909/how-can-i-s 
cale-a-plot-in-vector-graphic-or-pdf-form} 
 
I am not at all a computer graphics expert, but it seems that portable 
document format (PDF) files have a "native size," even though they may 
(and usually do!) contain vector graphics that can be  ... 
 
- asked by Andrew (6 votes), answered by Alexey Popkov (4 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Mathematica9 linux version crash, how to fix 
it?]\url{http://mathematica.stackexchange.com/questions/17163/mathematica9- 
linux-version-crash-how-to-fix-it} 
 
Ubuntu 12.04  x86_64   kernel 3.2.0-35-generic 
Mathematica 9 linux version (x86_64) crashes with errors: 
 
 
X Error of failed request:  BadGC (invalid GC parameter) 
Major opcode of failed request:   ... 
 
- asked by goodluck (9 votes), answered by goodluck (13 votes) 
 
---------------------------- 
 
[Finding all simple paths between two vertices in a 
graph]\url{http://mathematica.stackexchange.com/questions/25779/finding-all 
-simple-paths-between-two-vertices-in-a-graph} 
 
There are built-in methods to find a shortest path between two vertices 
in a graph, and the question on finding all shortest paths between two 
vertices has gathered quite a bit of attention. 
 
A path  ... 
 
- asked by mrm (9 votes), answered by trybik (8 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Visualizing nested lists for easier human 
understanding]\url{http://mathematica.stackexchange.com/questions/34651/vis 
ualizing-nested-lists-for-easier-human-understanding} 
 
When interacting with Mathematica, I often find myself staring blankly 
at waves of curly braces, trying to understand how data is organized 
hierarchically. For example, the beginning of the result to 
 
... 
 
- asked by duozmo (3 votes) 
 
---------------------------- 
 
[how to load packages on local computer when using remote 
kernels]\url{http://mathematica.stackexchange.com/questions/34966/how-to-lo 
ad-packages-on-local-computer-when-using-remote-kernels} 
 
I usually works remotely using kernels on our hpc and front-end on my 
local laptop. This enable me do relatively large computation within my 
laptop(IP address of my laptop may change frequently). But  ... 
 
- asked by xslittlegrass (1 vote) 
 
---------------------------- 
 
[Strange behaviour of 
Internal`InheritedBlock]\url{http://mathematica.stackexchange.com/questions 
/34698/strange-behaviour-of-internalinheritedblock} 
 
I was going to post an answer for fast way to replace all zeros in the 
matrix. I was even quite happy because timings were the same order of 
magnitude as others. 
 
The idea was to overwrite Identity: 
 
... 
 
- asked by Kuba (4 votes) 

8.11 October 22, 2013

================================== 
Top new questions this week: 
================================== 
 
[How to remap a fisheye 
image?]\url{http://mathematica.stackexchange.com/questions/34264/how-to-rem 
ap-a-fisheye-image} 
 
I want to flatten a series of fisheye images by remapping them to a 
rectinlinear projection. 
 
To achieve this, I need to be able to remap the pixels of the image 
using fisheye correction formulas for  ... 
 
- asked by ErikP (10 votes), answered by Simon Woods (9 votes) 
 
---------------------------- 
 
[Using With to scope over pure 
functions]\url{http://mathematica.stackexchange.com/questions/34345/using-w 
ith-to-scope-over-pure-functions} 
 
Consider this example: given an option for a function func as "x" :&gt; 
(a&amp;), how can one assign different values to a locally inside func? 
 
a = False; (* global value of a *) 
func[opt_] :=  ... 
 
- asked by Istvan Zachar (10 votes), answered by Rojo (12 votes) 
 
---------------------------- 
 
[How do I place a texture on an irregular 3D 
model?]\url{http://mathematica.stackexchange.com/questions/34144/how-do-i-p 
lace-a-texture-on-an-irregular-3d-model} 
 
I'm trying to reproduce a textured head in Mathematica, and I'm using a 
kind of 'net' of a head which contains all the features on the face. The 
texture looks like this: 
 
which is supposed to look  ... 
 
- asked by user10035 (9 votes), answered by Sjoerd C. de Vries (2 votes) 
 
---------------------------- 
 
[Finding a point from a set of contours such that it is nearest to a 
given 
point]\url{http://mathematica.stackexchange.com/questions/34204/finding-a-p 
oint-from-a-set-of-contours-such-that-it-is-nearest-to-a-given-point} 
 
I have several contour lines and one point. How can I find a point in 
one of those contour lines which is nearest to the given point? 
 
(*Create the implicit curves*) 
... 
 
- asked by c_susetyo (9 votes), answered by PlatoManiac (11 votes) 
 
---------------------------- 
 
[Organise a graph's vertices into 
levels]\url{http://mathematica.stackexchange.com/questions/34106/organise-a 
-graphs-vertices-into-levels} 
 
I would like to organise a graph's vertices in levels. Consider 
 
g = { 
0 -&gt; 1, 1 -&gt; 2, 2 -&gt; 3, 0 -&gt; 4, 0 -&gt; 5, 2 -&gt; 6, 2 
-&gt; 7, 8 -&gt; 3, 4 -&gt; 9, 5 -&gt; 9, 
6 -&gt; 9, 6  ... 
 
- asked by    (7 votes), answered by ybeltukov (6 votes) 
 
---------------------------- 
 
[Limit of sequence of functions behaving 
strange]\url{http://mathematica.stackexchange.com/questions/34124/limit-of- 
sequence-of-functions-behaving-strange} 
 
I'm trying to determine the limit of the sequence of functions 
 
$$f_n(x)=\left(\frac{1}{\pi}\arctan(n x) + 1/2\right)^n. 
$$ 
 
I define 
 
f[x_, n_] := (1/2 + ArcTan[n x]/Pi)^n 
 
 
And enter 
 
Limit[f[x,  ... 
 
- asked by Isak Kupersmidt (7 votes) 
 
---------------------------- 
 
[Extract urls from 
list]\url{http://mathematica.stackexchange.com/questions/34484/extract-urls 
-from-list} 
 
If I have a list like 
 
list = {"my element 1 http://link.com", "http://link2.com my element 2"} 
 
 
how do I get a list of the links inside each element? 
 
Something like 
 
StringCases[list, "http" ~~  ... 
 
- asked by su1 (6 votes), answered by Yves Klett (9 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Are you interested in purchasing David Wagner's "Power programming with 
Mathematica"?]\url{http://mathematica.stackexchange.com/questions/16485/are 
-you-interested-in-purchasing-david-wagners-power-programming-with-mathe 
mat} 
 
I recently contacted McGraw-Hill to see if they have a mechanism in 
place for printing out-of-print books that are still of interest. 
Specifically, I asked about "Power programming with Mathematica"  ... 
 
- asked by Todd Allen (92 votes), answered by Todd Allen (119 votes) 
 
---------------------------- 
 
[How to create new "person 
curve"?]\url{http://mathematica.stackexchange.com/questions/17704/how-to-cr 
eate-new-person-curve} 
 
Wolfram|Alpha has a whole collection of parametric curves that create 
images of famous people. To see them, enter WolframAlpha["person curve"] 
into a Mathematica notebook, or person curve into  ... 
 
- asked by Simon (41 votes), answered by Vitaliy Kaurov (14 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Exporting graphics to PDF results in destroyed fonts on Windows 
8]\url{http://mathematica.stackexchange.com/questions/34303/exporting-graph 
ics-to-pdf-results-in-destroyed-fonts-on-windows-8} 
 
Executing 
 
plot = Plot[x^2, {x, 0, 100}, PlotLabel -&gt; "Plot"]; 
SetDirectory[NotebookDirectory[]]; 
Export["plot.pdf", plot, "PDF"]; 
 
 
results in 
 
 
 
Is this a bug? OS is Windows 8, 64bit. 
 
 
- asked by Frederik Ziebell (1 vote) 
 
---------------------------- 
 
[TableHeading Lines Do Not Show 
Up]\url{http://mathematica.stackexchange.com/questions/34287/tableheading-l 
ines-do-not-show-up} 
 
For a list list = {{"a", "b", "c"}, {"d", "e"}}; Table heading lines do 
not show up 
 
TableForm[list, TableHeadings -&gt; Automatic] 
 
 
 
 
But it works if the list list = {{"a", "b", "c"}, {"d", "e",  ... 
 
- asked by Deco (2 votes) 
 
---------------------------- 
 
[Syntax for 
FrontEnd`SelectionSetStyle]\url{http://mathematica.stackexchange.com/questi 
ons/34297/syntax-for-frontendselectionsetstyle} 
 
I know FrontEnd`SelectionSetStyle is undocumented, but its name suggests 
it does what I need. What is its syntax? 
 
I have already tried several variations of the following button on some 
selected code  ... 
 
- asked by Hector (2 votes)

8.12 October 15, 2013

================================== 
Top new questions this week: 
================================== 
 
[Strip waste braces in nested 
list]\url{http://mathematica.stackexchange.com/questions/33837/strip-waste- 
braces-in-nested-list} 
 
I have nested lists wherein there are a lot of waste levels which looks 
like 
 
l = {{{{{{2, 2}}, 3}, 2, {{2, 33}}, 4, 5}}}; 
 
 
I would like to reduce it to somthing like 
 
l = {{{2, 2}, 3}, 2, {2, 33},  ... 
 
- asked by   (16 votes), answered by Leonid Shifrin (19 
votes) 
 
---------------------------- 
 
[How to get intersection values from a parametric 
graph?]\url{http://mathematica.stackexchange.com/questions/33947/how-to-get 
-intersection-values-from-a-parametric-graph} 
 
I have this graphed: 
 
ParametricPlot[{2.4*Cos[t] + 1.6*Cos[3 t/2], 2.4*Sin[t] - 1.6 Sin[3 
t/2]}, {t, 0, 4*Pi}] 
 
 
 
 
It is a star, and the lines cross each other twice in the third 
quadrant.  I need to  ... 
 
- asked by guest (14 votes), answered by Artes (17 votes) 
 
---------------------------- 
 
[Mathematica gives wrong result while Wolfram|Alpha is 
correct]\url{http://mathematica.stackexchange.com/questions/33866/mathemati 
ca-gives-wrong-result-while-wolframalpha-is-correct} 
 
 
 
Why does Mathematica and Wolfram|Alpha give different results based upon 
the same code? 
 
I know Wolfram|Alpha's 7.85 is correct. 
 
 
- asked by dansu (11 votes), answered by Michael E2 (12 votes) 
 
---------------------------- 
 
[Replace elements in list not matching elements of another list at the 
same 
position]\url{http://mathematica.stackexchange.com/questions/33731/replace- 
elements-in-list-not-matching-elements-of-another-list-at-the-same-posit 
> } 
 
I would like to compare two arrays: 
 
m = {a,b,c,d,d,f}; 
n = {b,b,a,d,d,e}; 
 
 
and get: 
 
{0,b,0,d,d,0} 
 
 
I have tried all kinds of things, like: 
 
m = {a,b,c,d,d,f}; 
n = {b,b,a,d,d,e}; 
Transpose[{m,  ... 
 
- asked by martin (11 votes), answered by Leonid Shifrin (18 votes) 
 
---------------------------- 
 
[How can I type-check the arguments of a Mathematica 
function?]\url{http://mathematica.stackexchange.com/questions/33884/how-can 
-i-type-check-the-arguments-of-a-mathematica-function} 
 
(For educational purposes) I defined the following functions: 
 
Translation (in $\mathbb{R}^2$): 
 
trM[vec_] := {{1, 0, vec[[1]]}, {0, 1, vec[[2]]}, {0, 0, 1}} 
 
 
Rotation (in $\mathbb{R}^2$): 
 
... 
 
- asked by ndroock1 (10 votes), answered by RunnyKine (6 votes) 
 
---------------------------- 
 
[How to bend a logarithmic number line into a 
circle]\url{http://mathematica.stackexchange.com/questions/33924/how-to-ben 
d-a-logarithmic-number-line-into-a-circle} 
 
One way to plot a sequence of numbers on a logarithmic number line is 
this: 
 
LogLogPlot[0, {t, 8, 16}, Axes -&gt; {True, False}, 
Ticks -&gt; {{8, 9, 10, 11, 12, 13, 14, 15, 16}}] 
 
 
 
 
How can the  ... 
 
- asked by Bogdan (9 votes), answered by ybeltukov (4 votes) 
 
---------------------------- 
 
[Is there a way to find out who is importing a 
package?]\url{http://mathematica.stackexchange.com/questions/33949/is-there 
-a-way-to-find-out-who-is-importing-a-package} 
 
After calling some functions, if I look into $ContextPath, I can see 
that JLink` is in there. Is there a way to find out what sequence of 
functions calls (like a stack-trace) imported a particular  ... 
 
- asked by Adal (9 votes), answered by Leonid Shifrin (8 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[How can I extract data points from a black and white 
image?]\url{http://mathematica.stackexchange.com/questions/3831/how-can-i-e 
xtract-data-points-from-a-black-and-white-image} 
 
Consider the following graph (source): 
 
 
 
Is there any way to extract the data points from this image in a 
semi-automatic way? I have seen, and tried the methods suggested in this 
question, but they  ... 
 
- asked by Eli Lansey (29 votes), answered by Sjoerd C. de Vries (33 
votes) 
 
---------------------------- 
 
[Finding the centroid of the area between two 
curves]\url{http://mathematica.stackexchange.com/questions/17170/finding-th 
e-centroid-of-the-area-between-two-curves} 
 
When I have an area bounded by curves, is there a built-in way to find 
the center of the area? Or do I have to plot it first and then use 
ComponentMeasurements on it? 
 
For example: the area under $y=  ... 
 
- asked by a3f (10 votes), answered by george2079 (3 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[How can I find the source of a memory 
leak?]\url{http://mathematica.stackexchange.com/questions/33707/how-can-i-f 
ind-the-source-of-a-memory-leak} 
 
I found a really weird issue using NDSolve`ProcessEquations inside 
module. 
 
We start by setting HistoryLength to 0. After this we define a function 
which takes in an integer and creates a Table of  ... 
 
- asked by jaclea (4 votes) 
 
---------------------------- 
 
[Is there something like 
MaxProcessorUsed?]\url{http://mathematica.stackexchange.com/questions/33775 
/is-there-something-like-maxprocessorused} 
 
For standard procedures it is easy to test if the implementation is 
better or worse than other by using Timing etc. 
 
It does not help us with creating Dynamic interfaces/visualisations. 
Sometimes it  ... 
 
- asked by Kuba (5 votes) 
 
---------------------------- 
 
[How does Mathematica estimate error on fit 
parameters?]\url{http://mathematica.stackexchange.com/questions/33685/how-d 
oes-mathematica-estimate-error-on-fit-parameters} 
 
When performing a fit using NonlinearModelFit (or any of Mathematica 
fitting functions, but I am particularly interested in nonlinear 
models), Mathematica makes a covariance matrix available for all  ... 
 
- asked by ydl (1 vote)

8.13 October 1, 2013

================================== 
Top new questions this week: 
================================== 
 
[Compiling ColorFunction for faster complex phase-amplitude 
plots]\url{http://mathematica.stackexchange.com/questions/32977/compiling-c 
olorfunction-for-faster-complex-phase-amplitude-plots} 
 
I have gotten into the habit of plotting complex-valued functions on a 
plane using a color-function along the lines of 
 
Function[{z}, Hue[Arg[z]/(2 Pi), 1, Abs[z]]]. 
 
 
For example, the following code  ... 
 
- asked by user93655 (16 votes), answered by halirutan (15 votes) 
 
---------------------------- 
 
[Pattern to match L, but not 
L[_]]\url{http://mathematica.stackexchange.com/questions/33025/pattern-to-m 
atch-l-but-not-l} 
 
I have an expression where I want to replace L but not L[_] 
 
For example, the following doesn't work and 
 
sub = {L :&gt; 2}; 
L + L[tilde] /. sub 
(* 2 + 2[tilde], but I want 2 + L[tilde]*) 
 
 
Is there  ... 
 
- asked by jlperla (13 votes), answered by Szabolcs (20 votes) 
 
---------------------------- 
 
[Is there a Mathematica barcode 
reader?]\url{http://mathematica.stackexchange.com/questions/33093/is-there- 
a-mathematica-barcode-reader} 
 
Is there a Mathematica barcode image reader (much like TextRecognize) 
that allows the user to enter an image of a barcode and then read it to 
get an output string? 
 
 
- asked by David G. Stork (12 votes), answered by belisarius (13 votes) 
 
---------------------------- 
 
[How to enlarge $\it{Mathematica}$'s knowledge about certain 
functions?]\url{http://mathematica.stackexchange.com/questions/33251/how-to 
-enlarge-itmathematicas-knowledge-about-certain-functions} 
 
I'm often troubled with the following task. I need to carry out 
symbolical computations involving certain special functions. Let me take 
as an example Barnes gamma-function. It is included in  ... 
 
- asked by Weather Report (9 votes), answered by WalkingRandomly (6 
votes) 
 
---------------------------- 
 
[Labeling a three-dimensional 
plot]\url{http://mathematica.stackexchange.com/questions/33236/labeling-a-t 
hree-dimensional-plot} 
 
As the title says, I want to add some text in a three-dimensional plot, 
thus labeling specific parts of it. Here is the corresponding 
Mathematica code 
 
V = 1/2*(x^2 + y^2 + z^2) + (x^2*y^2 + x^2*z^2 +  ... 
 
- asked by Vaggelis_Z (7 votes), answered by Kuba (7 votes) 
 
---------------------------- 
 
[Mathematica: computing a difficult 
integral]\url{http://mathematica.stackexchange.com/questions/33217/mathemat 
ica-computing-a-difficult-integral} 
 
I am trying to compute the following integral: 
 
Integrate[Exp[Sum[-((cw*\[Lambda] - b[i])^2/(2*\[Sigma]^2)), {i, 1, n}]], {cw, 0, 1}] 
 
 
And currently Mathematica outputs 
 
 
(Sqrt[\[Pi]/2]\[Sigma](Erf[(Sqrt[n](\[Lambda]- 
 
- asked by emaster70 (7 votes), answered by ybeltukov (8 votes) 
 
---------------------------- 
 
[How to always display current section identifier (number, name) in 
notebook?]\url{http://mathematica.stackexchange.com/questions/33173/how-to- 
always-display-current-section-identifier-number-name-in-notebook} 
 
Because I find myself relocating frequently within a long notebook 
divided into sections, subsections, &amp; subsubsections, I would like 
to display the identifying information for the section, etc.  ... 
 
- asked by Brandon Marshall (7 votes), answered by ybeltukov (4 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Plotting Complex Quantity 
Functions]\url{http://mathematica.stackexchange.com/questions/3458/plotting 
-complex-quantity-functions} 
 
Trying to plot with complex quantities seems not to work properly in 
what I want to accomplish. I would like to know if there is a general 
rule/way of plotting when you have complex counterparts in  ... 
 
- asked by night owl (8 votes), answered by Artes (12 votes) 
 
---------------------------- 
 
[How can I extract data points from a black and white 
image?]\url{http://mathematica.stackexchange.com/questions/3831/how-can-i-e 
xtract-data-points-from-a-black-and-white-image} 
 
Consider the following graph (source): 
 
 
 
Is there any way to extract the data points from this image in a 
semi-automatic way? I have seen, and tried the methods suggested in this 
question, but they  ... 
 
- asked by Eli Lansey (29 votes), answered by Sjoerd C. de Vries (33 
votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[How to embed graphic-element-specific metadata within a Graphics 
object?]\url{http://mathematica.stackexchange.com/questions/33207/how-to-em 
bed-graphic-element-specific-metadata-within-a-graphics-object} 
 
One of the most crucial requirements for rich, interactive scientific 
graphics is being able to "annotate" individual graphic elements (e.g. 
the data points of a scatterplot, the individual curves in  ... 
 
- asked by kjo (1 vote) 
 
---------------------------- 
 
[How to compute the Lovasz number for the given graph in 
Mathematica?]\url{http://mathematica.stackexchange.com/questions/33010/how- 
to-compute-the-lovasz-number-for-the-given-graph-in-mathematica} 
 
Here is a graph whose adjacency matrix is 
 
m = { 
{0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0}, 
{0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0}, 
{0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1}, 
{0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1,  ... 
 
- asked by Eden Harder (3 votes) 
 
---------------------------- 
 
[NDSolve error when solving 
pde]\url{http://mathematica.stackexchange.com/questions/33166/ndsolve-error 
-when-solving-pde} 
 
I am trying to calculate speed of viscous fluid in a rotating hollow 
sphere. The sphere is rotating round z axis. The fluid is 
incompressible. I used Navier-Stockes equations. The only boundry  ... 
 
- asked by Jure (1 vote) 
 
 
================================== 
New blog post: 
================================== 
 
[Plotting electronic orbitals using 
Mathematica]\url{http://mathematica.blogoverflow.com/2013/09/plotting-elect 
ronic-orbitals-using-mathematica/} by Jason B on Sep 27 

8.14 September 24, 2013

================================== 
Top new questions this week: 
================================== 
 
[Reconstruct text pages cut by 
shredder]\url{http://mathematica.stackexchange.com/questions/32612/reconstr 
uct-text-pages-cut-by-shredder} 
 
Q1: I have a page of printed text file, but it was cut by a paper 
shredder (from top to bottom). You can download all the paper fragment 
here. There are some examples of them. How can I reconstruct  ... 
 
- asked by mm.Jang (24 votes), answered by Kuba (20 votes) 
 
---------------------------- 
 
[Generate a Random 
Polygon]\url{http://mathematica.stackexchange.com/questions/32767/generate- 
a-random-polygon} 
 
Does some package exist with a function that takes a parameter $n$ and 
generates a random 2D $n$-sided simple polygon (convex or non-convex), 
possibly within a certain bounding box? 
 
It does not  ... 
 
- asked by Herng Yi (13 votes), answered by Simon Woods (7 votes) 
 
---------------------------- 
 
[How to examine the structure of Graphics 
objects]\url{http://mathematica.stackexchange.com/questions/32716/how-to-ex 
amine-the-structure-of-graphics-objects} 
 
One difficulty I'm encountering in studying the structure of Graphics 
objects is that I have not yet found a way to print or display such 
structure that is sufficiently general. 
 
The FullForm of  ... 
 
- asked by kjo (12 votes), answered by Hector (11 votes) 
 
---------------------------- 
 
[Size distribution of nanoparticles from a transmission electron 
microscopic 
image]\url{http://mathematica.stackexchange.com/questions/32830/size-distri 
bution-of-nanoparticles-from-a-transmission-electron-microscopic-imag} 
 
I have found a research article about Martian sand grain size 
determination from the image using Mathematica (Figure 2 in the linked 
article). They have not provided any detail of the methodology. It  ... 
 
- asked by Uttam Pal (11 votes), answered by RM1618 (16 votes) 
 
---------------------------- 
 
[Slideshow mode: how to cycle slides 
automatically?]\url{http://mathematica.stackexchange.com/questions/32768/sl 
ideshow-mode-how-to-cycle-slides-automatically} 
 
I'm doing a slideshow for an informative conference, so I need a 
slideshow running in background on some monitors. 
 
My question is: is there any way to make Mathematica to cycle slides 
automatically? 
... 
 
- asked by markus (11 votes), answered by Hector (7 votes) 
 
---------------------------- 
 
[What's the cleanest functional-programming style way to perform this 
list 
operation?]\url{http://mathematica.stackexchange.com/questions/32675/whats- 
the-cleanest-functional-programming-style-way-to-perform-this-list-opera 
t} 
 
I am looking for the correct method for accomplishing the unknown piece 
in the following code snippet: 
 
rolls = Tuples[Range[1, 4], {2}] 
 
 
 
{{1, 1}, {1, 2}, {1, 3}, {1, 4}, {2, 1}, {2, 2}, {2, 3}, {2,  ... 
 
- asked by Techrocket9 (11 votes), answered by RunnyKine (6 votes) 
 
---------------------------- 
 
[Solving Killing 
equations]\url{http://mathematica.stackexchange.com/questions/32843/solving 
-killing-equations} 
 
Is it possible to solve Killing equations in Mathematica for a general 
vector? 
 
I am looking for a way to create Killing equations and then find what 
the vectors are, but I have a problem with this. 
 
 
... 
 
- asked by dingo_d (10 votes), answered by Daniel Lichtblau (11 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[xkcd-style 
graphs]\url{http://mathematica.stackexchange.com/questions/11350/xkcd-style 
-graphs} 
 
 
 
I received an email to which I wanted to respond with a xkcd-style 
graph, but I couldn't manage it. Everything I drew looked perfect, and I 
don't have enough command over PlotLegends to have these  ... 
 
- asked by Amatya (387 votes), answered by Simon Woods (256 votes) 
 
---------------------------- 
 
[How to compile 
effectively?]\url{http://mathematica.stackexchange.com/questions/1803/how-t 
o-compile-effectively} 
 
What are the best practices of compiling functions? I understand that 
this is a vague question, but let me list some aspects that might 
trigger useful answers. Some of these have already been answered  ... 
 
- asked by Istvan Zachar (65 votes), answered by Leonid Shifrin (60 
votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[NDSolve and memory 
usage]\url{http://mathematica.stackexchange.com/questions/32640/ndsolve-and 
-memory-usage} 
 
After some googling, i've found similar problems around, but didn't find 
a 100% satisfactory answer, so let me ask here: 
 
I'd like to solve a 1+1 problem using the method of lines. In spherical 
... 
 
- asked by Paolo (3 votes) 
 
---------------------------- 
 
[How to simplify really complicated symbolic 
expression?]\url{http://mathematica.stackexchange.com/questions/32759/how-t 
o-simplify-really-complicated-symbolic-expression} 
 
I have an expression that contains Sinh[x], Cosh[x] and Sin[g], and I 
want to simplify it into an easier form, based on the physics situation 
(I am doing some general relativity calculation), I know  ... 
 
- asked by Jason (1 vote) 
 
---------------------------- 
 
[When should I begin a new line for more readable 
code]\url{http://mathematica.stackexchange.com/questions/32870/when-should- 
i-begin-a-new-line-for-more-readable-code} 
 
After a quick coding, I often try a lot of line feeds patterns on it. 
And no matter how much I do, there's seems to be no end in sight. 
 
Front end automatically indents the code, but I cannot fully  ... 
 
- asked by asoldat (4 votes)

8.15 September 17, 2013

================================== 
Top new questions this week: 
================================== 
 
[Is it possible to use RandomChoice to choose without other choices 
being 
evaluated?]\url{http://mathematica.stackexchange.com/questions/32175/is-it- 
possible-to-use-randomchoice-to-choose-without-other-choices-being-evalu 
at} 
 
I'm trying to do this: 
 
i1 = 1; 
i2 = 1; 
 
RandomChoice[{ 
(i1 = i1 + 1), 
(i1 = i1 - 1), 
(i2 = i1 + 1), 
(i2 = i2 - 1)}] 
 
 
In order to chose randomly which variable is going to be incremented or 
... 
 
- asked by Gustavo Bandeira (14 votes), answered by ybeltukov (13 votes) 
 
---------------------------- 
 
[Color Histogram3D by Bin 
Location]\url{http://mathematica.stackexchange.com/questions/32460/color-hi 
stogram3d-by-bin-location} 
 
I am using a Histogram3D plot to view the correlation of the R &amp; G 
of an RGB image.  Naturally, I want the bins to have a color 
corresponding to their $x$, $y$ (R,G) position on the chart. 
 
... 
 
- asked by Perfect Tommy (11 votes), answered by Kuba (10 votes) 
 
---------------------------- 
 
[Method -> {"AxesInFront" -> False} for 
Graphics3D]\url{http://mathematica.stackexchange.com/questions/32168/method 
-axesinfront-false-for-graphics3d} 
 
I'm aware of two ways to manage positioning of Axes for Graphics3D: 
AxesOrigin and AxesEdge. They seem to be quite different in terms of 
what is actually happening: 
 
GraphicsRow[{ 
... 
 
- asked by Kuba (11 votes), answered by Brett Champion (2 votes) 
 
---------------------------- 
 
[Why does Mathematica return a Fourier transform for a function for 
which it is not 
defined?]\url{http://mathematica.stackexchange.com/questions/32387/why-does 
-mathematica-return-a-fourier-transform-for-a-function-for-which-it-is-n 
> } 
 
The following function 
 
$$g(x) = (1 + x^{1/a} )^a $$ 
 
should NOT have a Fourier transform, as far as I am aware, for any real 
values of $a$ since $g(x)$ is not nice in the sense of decays quickly 
... 
 
- asked by Luap Nalehw (10 votes), answered by ybeltukov (11 votes) 
 
---------------------------- 
 
[Find eigen energies of time-independent Schrodinger 
equation]\url{http://mathematica.stackexchange.com/questions/32293/find-eig 
en-energies-of-time-independent-schrodinger-equation} 
 
I'm trying to get the eigenvalues of a one dimensional time-independent 
Schrodinger equation, 
 
$-\frac{h^2}{2m_0}\frac{d^2\psi}{dx^2}+U(x)~\psi=Ei~\psi$ 
 
where U(x) is some potential and Ei is the  ... 
 
- asked by xslittlegrass (10 votes), answered by Jens (13 votes) 
 
---------------------------- 
 
[Is there a triangle like 
this?]\url{http://mathematica.stackexchange.com/questions/32338/is-there-a- 
triangle-like-this} 
 
I want to find the numbers $a$, $b$, $c$, $d$ of the function $y = 
\dfrac{a x + b}{c x + d}$ so that the triangle $ABC$ with three points 
$A$, $B$, $C$  have integer coordinates and lies on the graph  ... 
 
- asked by minthao_2011 (8 votes), answered by belisarius (15 votes) 
 
---------------------------- 
 
[Unexpected behaviour of Solve applied to two equations in two 
variables]\url{http://mathematica.stackexchange.com/questions/32246/unexpec 
ted-behaviour-of-solve-applied-to-two-equations-in-two-variables} 
 
I have a simple Mathematica expression 
 
Solve[{a(a-1)Sqrt[1+a^2+b^2] == b(a^3-1), b(b-1)Sqrt[1+a^2+b^2] == 
a(b^3-1)}] 
 
 
which returns (on version 8.0, and also version 9.0) 
 
 
{{b -&gt; -(a/(1 + a))},  ... 
 
- asked by Ashley Montanaro (8 votes), answered by gpap (2 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Finding the centroid of the area between two 
curves]\url{http://mathematica.stackexchange.com/questions/17170/finding-th 
e-centroid-of-the-area-between-two-curves} 
 
When I have an area bounded by curves, is there a built-in way to find 
the center of the area? Or do I have to plot it first and then use 
ComponentMeasurements on it? 
 
For example: the area under $y=  ... 
 
- asked by a3f (9 votes), answered by george2079 (3 votes) 
 
---------------------------- 
 
[How can I improve Mathematica's resolution on a macbook retina 
display?]\url{http://mathematica.stackexchange.com/questions/18419/how-can- 
i-improve-mathematicas-resolution-on-a-macbook-retina-display} 
 
Mathematica 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 
 
 
 
 
- asked by Tom Wellington (23 votes), answered by programming_historian 
(10 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Setting PropertyValue for VertexWeight is not 
persistent]\url{http://mathematica.stackexchange.com/questions/32320/settin 
g-propertyvalue-for-vertexweight-is-not-persistent} 
 
g = CompleteGraph[8, VertexSize -&gt; Medium]; 
 
 
PropertyValue[{g, VertexList[g][[1]]}, VertexWeight] = 10; 
PropertyValue[g, VertexWeight] 
 
 
 
{10, 1, 1, 1, 1, 1, 1, 1} 
 
 
 
PropertyValue[{g,  ... 
 
- asked by Ilya Sorokin (2 votes) 
 
---------------------------- 
 
[Orthogonal basis of a hermitian 
matrix]\url{http://mathematica.stackexchange.com/questions/32350/orthogonal 
-basis-of-a-hermitian-matrix} 
 
Is there a way to extract an orthogonal basis for a hermitian matrix in 
Mathematica? 
 
A simple diagnolization returns a non orthogonal basis and later using a 
Grahm-Schmidt process which isn't aware  ... 
 
- asked by user9522 (1 vote) 
 
---------------------------- 
 
[Convert ImageSize to 
FieldSize]\url{http://mathematica.stackexchange.com/questions/32459/convert 
-imagesize-to-fieldsize} 
 
How might I construct a function called EmToPX[p] such that the 
following 2 InputFields would be the same width.  If not please explain 
why doing such isn't possible. 
 
InputField["a", ImageSize -&gt;  ... 
 
- asked by Liam William (1 vote)

8.16 September 10, 2013

================================== 
Top new questions this week: 
================================== 
 
[Chart illustrating options that affect Graphics/Graphics3D 
objects]\url{http://mathematica.stackexchange.com/questions/31745/chart-ill 
ustrating-options-that-affect-graphics-graphics3d-objects} 
 
In Mathematica there is a seemingly never-ending list of parameters that 
affect the appearance of Graphics and Graphics3D objects: ImageSize, 
ImageSizeRaw, ImagePadding, ImageMargins, PlotRange,  ... 
 
- asked by kjo (19 votes), answered by Vitaliy Kaurov (18 votes) 
 
---------------------------- 
 
[The dangers of SaveDefinitions --- should this really 
happen?]\url{http://mathematica.stackexchange.com/questions/31998/the-dange 
rs-of-savedefinitions-should-this-really-happen} 
 
I have been bitten hard by SaveDefinitions -&gt; True.  I'll describe in 
detail what happened below. 
 
My questions are: Is this a bug?  What is the most convenient 
workaround? 
 
 
 
Consider a definition  ... 
 
- asked by Szabolcs (17 votes), answered by Rojo (12 votes) 
 
---------------------------- 
 
[How to get Cases to wrap results in an arbitrary 
head?]\url{http://mathematica.stackexchange.com/questions/31754/how-to-get- 
cases-to-wrap-results-in-an-arbitrary-head} 
 
A number of functions provide for results to be wrapped in an arbitrary 
head.  This is very important in cases where the results should not be 
evaluated.  Take Level as an example: 
 
expr = Hold[{2/2,  ... 
 
- asked by Mr.Wizard (17 votes), answered by Mr.Wizard (15 votes) 
 
---------------------------- 
 
[Do Mathematica notebooks include personal 
metadata?]\url{http://mathematica.stackexchange.com/questions/31928/do-math 
ematica-notebooks-include-personal-metadata} 
 
I am about to send a Mathematica notebook to someone and I would like to 
make sure it does not contain any information that could personally 
identify me. I would also like to produce pdf files from  ... 
 
- asked by episanty (13 votes) 
 
---------------------------- 
 
[How to determine numeric equivalent of Tiny, Small, etc. image sizes 
for 
Graphics?]\url{http://mathematica.stackexchange.com/questions/31726/how-to- 
determine-numeric-equivalent-of-tiny-small-etc-image-sizes-for-graphic} 
 
Is there a way to find the numeric equivalents of Tiny, Small, Medium, 
and Large for for ImageSize?  In other words, what are the integers t, 
s, m, and l such that, for Graphics objects, the  ... 
 
- asked by kjo (13 votes), answered by Szabolcs (12 votes) 
 
---------------------------- 
 
[Can ReplacePart be sped 
up?]\url{http://mathematica.stackexchange.com/questions/31648/can-replacepa 
rt-be-sped-up} 
 
Test case: 
 
data = RandomReal[1, {1000, 1000}]; 
pos = RandomInteger[{1, 1000}, {5*10^5, 2}]; 
r1 = ReplacePart[data, pos -&gt; 0]; // AbsoluteTiming 
(data[[##]] = 0) &amp; @@@ pos; // AbsoluteTiming 
... 
 
- asked by explorer (12 votes), answered by jVincent (4 votes) 
 
---------------------------- 
 
[How to identify chemical substance from 
tattoo?]\url{http://mathematica.stackexchange.com/questions/31657/how-to-id 
entify-chemical-substance-from-tattoo} 
 
A friend of mine made a tattoo on his chest of some chemical substance 
formula. 
 
He challenged us to identify which substance is that. I thought that 
perhaps a combination of: 
 
 
Mathematica image  ... 
 
- asked by Zet (12 votes), answered by Sjoerd C. de Vries (18 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[How to manipulate 2D 
plots?]\url{http://mathematica.stackexchange.com/questions/7142/how-to-mani 
pulate-2d-plots} 
 
When it comes to visual analysis, large datasets or data with intricate 
internal details often makes plotting in 2D useless, as the outcome is 
either just a fraction of the full dataset, or no details  ... 
 
- asked by Istvan Zachar (54 votes), answered by Istvan Zachar (53 
votes) 
 
---------------------------- 
 
[QR Code in shopping cart 
handle]\url{http://mathematica.stackexchange.com/questions/26268/qr-code-in 
-shopping-cart-handle} 
 
This week, the market people from my work wanted to put QR codes in 
shopping cart handles, but when they tested it, the QR code did not 
work. I noted that the cylindrical curvature (even small)  ... 
 
- asked by Murta (122 votes), answered by halirutan (121 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[How can I create jpeg images of a given file 
size?]\url{http://mathematica.stackexchange.com/questions/31814/how-can-i-c 
reate-jpeg-images-of-a-given-file-size} 
 
Cross-posted at Wolfram Community 
 
I would like to have a function makeJPG[megabytes_]  that generates 
random jpg images of given file sizes with itf filesize (in megabytes) 
watermarked on the image  ... 
 
- asked by M.R. (3 votes) 
 
---------------------------- 
 
[Understanding the discrepancy between txt file import and export times, 
and possibly speeding up 
Import]\url{http://mathematica.stackexchange.com/questions/31817/understand 
ing-the-discrepancy-between-txt-file-import-and-export-times-and-poss} 
 
I attempted to import a very short .txt file string using the Import 
command: 
 
Import["C:\\TestFile.txt"] // AbsoluteTiming 
 
Out: {0.020001, "Test"} 
 
 
Why does this take 20 milliseconds?  Export is  ... 
 
- asked by Sparse Pine (1 vote) 
 
---------------------------- 
 
[Setting OperatorSubstitution to false causes Plot's labels of 
sufficiently small size not to appear in the specified typeface. Is this 
a 
bug?]\url{http://mathematica.stackexchange.com/questions/31784/setting-oper 
atorsubstitution-to-false-causes-plots-labels-of-sufficiently-small} 
 
If I set OperatorSubstitution to False, the labels of Plot will not use 
the typeface specified by FontFamily unless FontSize is more than 
certain number. 
 
In this test scenario, that certain number is  ... 
 
- asked by Taiki (2 votes) 

8.17 September 3, 2013

================================== 
Top new questions this week: 
================================== 
 
[How to create a wind rose with 
Mathematica?]\url{http://mathematica.stackexchange.com/questions/31257/how- 
to-create-a-wind-rose-with-mathematica} 
 
I am trying to plot wind rose in Mathematica, but have no idea how to do 
this. 
 
 
Any suggestions ? 
 
 
- asked by bushiwo (22 votes), answered by David Carraher (16 votes) 
 
---------------------------- 
 
[How to include Mathematica animation in a PowerPoint 
presentation?]\url{http://mathematica.stackexchange.com/questions/31511/how 
-to-include-mathematica-animation-in-a-powerpoint-presentation} 
 
I want to include a Mathematica animation in PowerPoint presentation. 
My code is: 
 
SetDirectory[NotebookDirectory[]]; 
data = ReadList[ 
"C:\\Users\\luka\\Desktop\\GRAFI- DIPLOMA\\9_gibanje \ 
... 
 
- asked by Luka (15 votes), answered by Vitaliy Kaurov (18 votes) 
 
---------------------------- 
 
[How do I calculate the area of a polygon given its 
coordinates?]\url{http://mathematica.stackexchange.com/questions/31241/how- 
do-i-calculate-the-area-of-a-polygon-given-its-coordinates} 
 
I have a polygon: 
 
Polygon[{{0, 200 }, {200, 100}, {500, 300}, {100, 700}}] 
 
 
How can I figure out its area? The docs page does not have any example. 
 
So far I've reached this point with no success: 
 
... 
 
- asked by caligula (15 votes), answered by Kuba (14 votes) 
 
---------------------------- 
 
[Pick elements of largest absolute 
value]\url{http://mathematica.stackexchange.com/questions/31385/pick-elemen 
ts-of-largest-absolute-value} 
 
For example, given 
 
list = {{1, -3, -5}, {2, 1, 6}, {0, 2, 4}, {-9, 2, 6}} 
 
 
should return: 
 
{-5, 6, 4, -9} 
 
 
 
- asked by explorer (15 votes), answered by Simon Woods (19 votes) 
 
---------------------------- 
 
[How to partition a list to make each subset's size equal and mean as 
close as 
possible]\url{http://mathematica.stackexchange.com/questions/31469/how-to-p 
artition-a-list-to-make-each-subsets-size-equal-and-mean-as-close-as-po> 
) 
 
Suppose we have 3 lists each with 18 numbers like this: 
 
list1 = {7.49, 7.56, 7.98, 8.09, 8.16, 8.21, 
8.73, 8.64, 8.68, 8.46, 8.57, 8.29, 9.38, 9.43, 8.95, 9.04, 8.9, 9.07}; 
list2 = {21.08,  ... 
 
- asked by incognito007 (13 votes), answered by Vitaliy Kaurov (4 votes) 
 
---------------------------- 
 
[How can one write a robust ListableQ 
function?]\url{http://mathematica.stackexchange.com/questions/31498/how-can 
-one-write-a-robust-listableq-function} 
 
I would like to have a test that determines if a particular function is 
Listable.  In the case of Symbols this is merely a matter of checking 
Attributes.  Function definitions with the Listable  ... 
 
- asked by Mr.Wizard (12 votes), answered by Mr.Wizard (5 votes) 
 
---------------------------- 
 
[How can I efficiently "remap" an 
image?]\url{http://mathematica.stackexchange.com/questions/31274/how-can-i- 
efficiently-remap-an-image} 
 
Many image processing libraries like OpenCV, Intel Performance 
Primitives or Octave have a useful function called "remap", that takes 
an image, an array with X coordinates and an array with Y  ... 
 
- asked by nikie (11 votes), answered by ssch (7 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Voronoi diagrams for generators other than 
points]\url{http://mathematica.stackexchange.com/questions/20696/voronoi-di 
agrams-for-generators-other-than-points} 
 
Any suggestions how to determine Voronoi diagram for sites other than 
points, as e.g. in the picture below? Input is a raster image. 
 
 
 
 
- asked by DeeDee (22 votes), answered by whuber (26 votes) 
 
---------------------------- 
 
[How to compile 
effectively?]\url{http://mathematica.stackexchange.com/questions/1803/how-t 
o-compile-effectively} 
 
What are the best practices of compiling functions? I understand that 
this is a vague question, but let me list some aspects that might 
trigger useful answers. Some of these have already been answered  ... 
 
- asked by Istvan Zachar (65 votes), answered by Leonid Shifrin (59 
votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Generating an obstacle-avoiding closed-curve with a fixed perimeter and 
a target 
area]\url{http://mathematica.stackexchange.com/questions/31365/generating-a 
n-obstacle-avoiding-closed-curve-with-a-fixed-perimeter-and-a-target} 
 
I was wondering if there was a neat way to solve the following problem 
in Mathematica v9 - 
 
Provided a binarized image (where we call black pixels "obstacles" or 
vice versa, whichever is most  ... 
 
- asked by TilePath (3 votes) 
 
---------------------------- 
 
[What was added to the LibraryLink API in version 
9?]\url{http://mathematica.stackexchange.com/questions/31433/what-was-added 
-to-the-librarylink-api-in-version-9} 
 
Looking at the LibraryLink examples, there are several new functions and 
objects, as well as example programs, that appeared in version 9.  Are 
these documented?  If yes, where? 
 
If would be nice to  ... 
 
- asked by Szabolcs (9 votes) 
 
---------------------------- 
 
[Stochastic differential equations in the weak 
sense]\url{http://mathematica.stackexchange.com/questions/31443/stochastic- 
differential-equations-in-the-weak-sense} 
 
There are some good discussions in http://mathematica.stackexchange.com 
regarding the numerical solution of SDEs of the form 
$dX(t)=a(t,X)dt+b(t,X)dW_t$, wherein $X(0)=X_{0},$ $W_t$ is the Wiener 
... 
 
- asked by Fazlollah Soleymani (1 vote) 

8.18 August 27, 2013

================================== 
Top new questions this week: 
================================== 
 
[Cropping a Voronoi 
diagram]\url{http://mathematica.stackexchange.com/questions/31187/cropping- 
a-voronoi-diagram} 
 
Someone know how can I get the correct crop of this Voronoi image using 
RegionFunction? 
 
 
As you can see, there is a lot of undesired white regions inside the 
left polygon. 
Some clue on how to correct  ... 
 
- asked by Murta (12 votes), answered by Kuba (7 votes) 
 
---------------------------- 
 
[Automatically close 
Mathematica]\url{http://mathematica.stackexchange.com/questions/30974/autom 
atically-close-mathematica} 
 
It seems there are a lot of related topics but I haven't found an 
answer. 
 
I want to automatically quit Mathematica after some procedures are done 
but dialog window appears: 
 
1 + 1; 
... 
 
- asked by Kuba (11 votes), answered by John Fultz (11 votes) 
 
---------------------------- 
 
[Encrypt the password used for 
SendMail]\url{http://mathematica.stackexchange.com/questions/30836/encrypt- 
the-password-used-for-sendmail} 
 
I want Mathematica to send me an email when the computation is finished. 
To that end, I have a cell with SendMail[...] which I place behind my 
computation in the evaluation queue. The problem I have  ... 
 
- asked by simsurace (11 votes), answered by Murta (10 votes) 
 
---------------------------- 
 
[Detecting and correcting gradational brightness variations in a 
grayscale 
image]\url{http://mathematica.stackexchange.com/questions/30823/detecting-a 
nd-correcting-gradational-brightness-variations-in-a-grayscale-image} 
 
I am trying to quantify the proportions of various components in a 
greyscale image (backscattered electron image of a polished rock 
sample). 
Here is the original image: 
 
bse =  ... 
 
- asked by geordie (10 votes), answered by Simon Woods (5 votes) 
 
---------------------------- 
 
[Select and 
Blank]\url{http://mathematica.stackexchange.com/questions/30970/select-and- 
blank} 
 
I try to filter sublists of a list which match a pattern. 
 
test = {{"String1", "a"}, {"String2", "b"}, {"String3", 
"a"}, {"String4", "a"}}; 
 
 
The result should be: 
 
result = {{"String1", "a"},  ... 
 
- asked by RMMA (8 votes), answered by halirutan (13 votes) 
 
---------------------------- 
 
[Cannot find the maximum value of a 
function]\url{http://mathematica.stackexchange.com/questions/31032/cannot-f 
ind-the-maximum-value-of-a-function} 
 
Consider the following function: 
 
$a Sin(x)+b Cos(x)$ 
 
I tried to obtain the maximum value of this function using MaxValue[]: 
 
MaxValue[a Sin[x] + b Cos[x], x, Reals] 
 
 
I expect Mathematica to return  ... 
 
- asked by M6299 (7 votes), answered by george2079 (3 votes) 
 
---------------------------- 
 
[How can I draw a grid behind graphics without using 
Plot?]\url{http://mathematica.stackexchange.com/questions/31114/how-can-i-d 
raw-a-grid-behind-graphics-without-using-plot} 
 
I want to a show simple vector summation but I don't know how to draw a 
grid behind the vectors. I am pretty sure I can do it with Mathematica 
but how? 
 
It should look like this: 
 
 
 
 
- asked by Serkan (7 votes), answered by Mr.Wizard (15 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Using the Mathematica front-end efficiently for editing 
notebooks]\url{http://mathematica.stackexchange.com/questions/8310/using-th 
e-mathematica-front-end-efficiently-for-editing-notebooks} 
 
Background: 
 
I have used Vim for 15+ years. There is a certain "one"-ness with the 
editor one achieves. Emacs users also experience this. Notepad users do 
not. 
 
My current interaction with the  ... 
 
- asked by user1602 (40 votes), answered by rm -rf (38 votes) 
 
---------------------------- 
 
[How can this image (optical illusion) be created with 
Mathematica?]\url{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  ... 
 
- asked by Mike Honeychurch (32 votes), answered by halirutan (48 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[Assign variables from list inside With or 
Module]\url{http://mathematica.stackexchange.com/questions/30847/assign-var 
iables-from-list-inside-with-or-module} 
 
I have found that it is possible to assign variables from lists, as 
follows. 
 
In[1]:= r = {1, 2, 3}; 
In[2]:= {a, b, c} = r; 
In[3]:= b 
Out[3]= 2 
 
 
However, if I try to do this within a With or Module  ... 
 
- asked by Gyppo (2 votes) 
 
---------------------------- 
 
[Is there a way to speed up Simplify and/or PolynomialReduce Modulus-> 
2?]\url{http://mathematica.stackexchange.com/questions/31029/is-there-a-way 
-to-speed-up-simplify-and-or-polynomialreduce-modulus-2} 
 
I'm trying to simplify a series of equations with at most 64 input 
terms.   As the number of terms involved in the equations increase, the 
runtime seems to grow exponentially. 
Does anyone know of ways  ... 
 
- asked by botnet (1 vote) 
 
---------------------------- 
 
[FrontEndTokens, MathLink, and 
Serializer.exe]\url{http://mathematica.stackexchange.com/questions/31118/fr 
ontendtokens-mathlink-and-serializer-exe} 
 
I have been using some basic MathLink programming in my work and  wanted 
to create some more sophisticated MathLink programs. I came across the 
book "MathLink: Network Programming with Mathematica",  ... 
 
- asked by user2694879 (2 votes)

8.19 August 20, 2013

================================== 
Top new questions this week: 
================================== 
 
[What bug fixes can be implemented in 
init.m?]\url{http://mathematica.stackexchange.com/questions/30599/what-bug- 
fixes-can-be-implemented-in-init-m} 
 
In comments on this question, Mr. Wizard suggested a community wiki to 
share the bug fixes/workarounds (or possibly other tricks) people load 
in their init.m. I think this could provide a nice  ... 
 
- asked by jkrich (16 votes), answered by Mr.Wizard (8 votes) 
 
---------------------------- 
 
[when is f@g not the same as 
f[g]?]\url{http://mathematica.stackexchange.com/questions/30425/when-is-fg- 
not-the-same-as-fg} 
 
I have always thought that f@g will give the same result as f[g] in all 
cases, and it is just a matter of style which one to use and that g will 
always evaluates first, and then f will evaluate using  ... 
 
- asked by Nasser (16 votes), answered by Mr.Wizard (22 votes) 
 
---------------------------- 
 
[Blend code for "Sunset 
Colors"]\url{http://mathematica.stackexchange.com/questions/30508/blend-cod 
e-for-sunset-colors} 
 
Hi I want to get a blend similar to "SunsetColors". To make those slight 
modifications, I would like to know the precise blend of that 
ColorScheme. 
 
My try: 
 
Graphics[Table[{Blend[{Black,  ... 
 
- asked by Francisco (14 votes), answered by Simon Woods (13 votes) 
 
---------------------------- 
 
[Looking for a way to insert multiple elements into multiple positions 
simultaneously in a 
list]\url{http://mathematica.stackexchange.com/questions/30647/looking-for- 
a-way-to-insert-multiple-elements-into-multiple-positions-simultaneo} 
 
I would like to take the following data: 
 
insertvalues = {r, x}; 
insertpositions = {{1}, {5}}; 
origlist = {a, b, c, d, e, f, g}; 
 
 
and generate output that looks like this: 
 
{r,a,b,c,d,x,e,f,g} 
 
 
... 
 
- asked by Todd Allen (13 votes), answered by Mr.Wizard (14 votes) 
 
---------------------------- 
 
[How can I manipulate 
TemporalData?]\url{http://mathematica.stackexchange.com/questions/30712/how 
-can-i-manipulate-temporaldata} 
 
Version 9 introduced TemporalData but, truth be told, the documentation 
doesn't suggest that one can do much with it. Many of us have probably 
assumed we'd be better off sticking with the date-value  ... 
 
- asked by Verbeia (13 votes), answered by Verbeia (15 votes) 
 
---------------------------- 
 
[Measure perimeter of black edge in 
Mathematica]\url{http://mathematica.stackexchange.com/questions/30461/measu 
re-perimeter-of-black-edge-in-mathematica} 
 
I have a pattern like the one below. How could I measure the total 
length of the perimeter of the black/white edge? This would give me a 
measure of spatial frequency. Any tips would be great! 
 
Thanks! 
... 
 
- asked by Levi (13 votes), answered by belisarius (11 votes) 
 
---------------------------- 
 
[Filtering elements from a list that appear only 
once]\url{http://mathematica.stackexchange.com/questions/30610/filtering-el 
ements-from-a-list-that-appear-only-once} 
 
I want to be able to select elements from a list that only appear once. 
I originally had this: 
 
Select[Table[Count[list, i], {i, list}], # == 1] 
 
 
But the issue is that my list has about 60,000  ... 
 
- asked by Mark (12 votes), answered by belisarius (17 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[How to create hedcut style 
images?]\url{http://mathematica.stackexchange.com/questions/8716/how-to-cre 
ate-hedcut-style-images} 
 
Yesterday the hedcut style was brought up in chat.  How can we create a 
hedcut-like style automatically in Mathematica, using a photograph as a 
starting point? 
 
 
 
I am looking to create a similar  ... 
 
- asked by Szabolcs (43 votes), answered by Simon Woods (32 votes) 
 
---------------------------- 
 
[Plotting Complex Quantity 
Functions]\url{http://mathematica.stackexchange.com/questions/3458/plotting 
-complex-quantity-functions} 
 
Trying to plot with complex quantities seems not to work properly in 
what I want to accomplish. I would like to know if there is a general 
rule/way of plotting when you have complex counterparts in  ... 
 
- asked by night owl (8 votes), answered by Artes (12 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[NDSolve: ProcessEquations and Reinitialize with Piecewise 
functions]\url{http://mathematica.stackexchange.com/questions/30426/ndsolve 
-processequations-and-reinitialize-with-piecewise-functions} 
 
I am having trouble with using NDSolve`Reinitialize when the system 
consists of a pieceise function. 
 
If we define the ODE system 
 
simplesys = {r'[t] == 
Piecewise[{{1, 0 &lt;= t &lt;= 10}, {0, 10  ... 
 
- asked by jaclea (3 votes) 
 
---------------------------- 
 
[Does one need to be careful about loading multiple (many) contexts or 
packages in the same 
session?]\url{http://mathematica.stackexchange.com/questions/30758/does-one 
-need-to-be-careful-about-loading-multiple-many-contexts-or-packages-i} 
 
I have a number of large pieces of precomputed data which I am 
considering putting into individual packages in order to load them (via 
DeclarePackage) and unload them (via Leonid Shifrin's  ... 
 
- asked by Tobias Hagge (4 votes) 
 
---------------------------- 
 
[Mathematica and strong 
AI]\url{http://mathematica.stackexchange.com/questions/30585/mathematica-an 
d-strong-ai} 
 
David Deutsch (physicist / quantum computing theorist) wrote an article 
for Aeon Magazine last year: On Artificial Intelligence that got me 
thinking. 
 
The article assesses and critiques the  ... 
 
- asked by Jagra (7 votes)

8.20 April 29, 2013

================================== 
Top new questions this week: 
================================== 
 
[Detecting patterns of black and white stones on a 2D 
board]\url{http://mathematica.stackexchange.com/questions/46631/detecting-p 
atterns-of-black-and-white-stones-on-a-2d-board} 
 
I'm writing a program to play a game of Pente, and I'm struggling with 
the following question: 
 
 
What's the best way to detect patterns on a two-dimensional board? 
 
 
For example, in Pente a pair of  ... 
 
- asked by Victor K. (20 votes), answered by Mr.Wizard (9 votes) 
 
---------------------------- 
 
[Is there a better way to add elements to a Graphics expression 
repeatedly?]\url{http://mathematica.stackexchange.com/questions/46746/is-th 
ere-a-better-way-to-add-elements-to-a-graphics-expression-repeatedly} 
 
Consider simple example where a set of points is generated and some are 
displayed. 
 
k = 10^5; 
p = RandomReal[{-1, 1}, {k, 2}]; 
n = 2 
Graphics[Dynamic@Point@p[[;; n]], Frame -&gt; True, PlotRange -&gt;  ... 
 
- asked by Kuba (13 votes), answered by Rom38 (5 votes) 
 
---------------------------- 
 
[Full documentation for 
AppearanceElements]\url{http://mathematica.stackexchange.com/questions/4679 
2/full-documentation-for-appearanceelements} 
 
As explained in this solution, 
 
ListAnimate[Table[Plot[Sin[n x], {x, 0, 2}], {n, 3}]]//InputForm 
 
 
will allow me to view the types of appearance element for the 
ListAnimate controller.  But the same  ... 
 
- asked by fairflow (8 votes), answered by Nasser (8 votes) 
 
---------------------------- 
 
[StringReplace, ReplaceAll and Rule interact in a bizarre 
way]\url{http://mathematica.stackexchange.com/questions/46611/stringreplace 
-replaceall-and-rule-interact-in-a-bizarre-way} 
 
I have the following pair of things: 
 
ClearAll[foo, labeledFoo]; 
 
labeledFoo = {"FooBarBazQuux", foo}; 
 
 
This works like you'd expect: 
 
labeledFoo /. hdr_String :&gt; 
StringReplace[hdr,  ... 
 
- asked by Pillsy (8 votes), answered by Leonid Shifrin (11 votes) 
 
---------------------------- 
 
[Is it possible to create iOS apps with 
Mathematica?]\url{http://mathematica.stackexchange.com/questions/46888/is-i 
t-possible-to-create-ios-apps-with-mathematica} 
 
I am fairly new to Mathematica and don't have much experience with other 
programming languages, but I can already see that Mathematica and the 
Wolfram language are far easier to use than most others. 
... 
 
- asked by Aron (7 votes), answered by Vitaliy Kaurov (9 votes) 
 
---------------------------- 
 
[Creating a Mathieu stability 
diagram]\url{http://mathematica.stackexchange.com/questions/46750/creating- 
a-mathieu-stability-diagram} 
 
I am attempting to re-create a Mathieu stability diagram like the one 
shown here: 
 
 
 
I expected that I could use MathieuC to generate this graph by assuming 
that instability occurs when the function  ... 
 
- asked by bobthechemist (7 votes), answered by Oleksandr R. (10 votes) 
 
---------------------------- 
 
[How to request financial data from Yahoo's 
YQL?]\url{http://mathematica.stackexchange.com/questions/46760/how-to-reque 
st-financial-data-from-yahoos-yql} 
 
How can I download historical data from Yahoo ? Although Mathematica's 
FinancialData function uses Yahoo it could be useful to have more 
control on how to retrieve data from Yahoo's YQL. 
 
 
- asked by Faysal Aberkane (7 votes), answered by Faysal Aberkane (12 
votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[Get a "step by step" evaluation in 
Mathematica]\url{http://mathematica.stackexchange.com/questions/148/get-a-s 
tep-by-step-evaluation-in-mathematica} 
 
Is it possible in Mathematica to get a step-by-step evaluation of some 
functions; that's to say, outputting not only the result but all the 
stages that have led to it? 
 
Example : Let's say I want to  ... 
 
- asked by Skydreamer (50 votes), answered by J.M. (44 votes) 
 
---------------------------- 
 
[How to create word 
clouds?]\url{http://mathematica.stackexchange.com/questions/2334/how-to-cre 
ate-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,  ... 
 
- asked by Istvan Zachar (91 votes), answered by Heike (78 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[What is " (Dialog) Input [ ] := " after evaluating a 
cell?]\url{http://mathematica.stackexchange.com/questions/46669/what-is-dia 
log-input-after-evaluating-a-cell} 
 
I have done a time-consuming run and calculation. After many hours ( 
about 7 hours!), the black color which shows that the cell is 
evaluating, turn into gray and a strange text appears like this : 
 
... 
 
- asked by Shellp (2 votes) 
 
---------------------------- 
 
[make mathematica recognize CCompiler and NVCC on remote Windows 
machine]\url{http://mathematica.stackexchange.com/questions/46971/make-math 
ematica-recognize-ccompiler-and-nvcc-on-remote-windows-machine} 
 
I have setup a mathematica remote kernel on a Windows 7 64 bit machine, 
which has MS Visual Studio 2010 installed. When I start mathematica on 
the windows machine mathematica recognizes the MS  ... 
 
- asked by Wizard (1 vote) 
 
---------------------------- 
 
[Function with a sharp resonance which Mathematica fails to integrate. 
Why?]\url{http://mathematica.stackexchange.com/questions/46737/function-wit 
h-a-sharp-resonance-which-mathematica-fails-to-integrate-why} 
 
I'm a new user of Mathematica and I'm trying to use it to calculate the 
collisional cross-section as a function of energy for a given potential 
and decay rate.  I know that the resulting function  ... 
 
- asked by Woody (3 votes)

8.21 April 22, 2013

================================== 
Top new questions this week: 
================================== 
 
[Undocumented form for 
Extract]\url{http://mathematica.stackexchange.com/questions/46261/undocumen 
ted-form-for-extract} 
 
Prompted by a comments conversation here, here's an interesting (and 
often performance enhancing) use of Extract: 
 
target = Join[Range[100], {{1, 2, 3, Range[20]}}]; 
 
Rest@Extract[target, {{{}}, {2 ;;  ... 
 
- asked by rasher (17 votes), answered by Jacob Akkerboom (7 votes) 
 
---------------------------- 
 
[Bizarre behavior of With, Compile and 
Break]\url{http://mathematica.stackexchange.com/questions/46315/bizarre-beh 
avior-of-with-compile-and-break} 
 
I'm guessing this is almost certainly a bug in Compile (because they're 
fairly common), but it's pretty weird and I spent about an hour tracking 
down the issue and finding a test case. Consider this  ... 
 
- asked by Pillsy (10 votes), answered by Leonid Shifrin (10 votes) 
 
---------------------------- 
 
[Finding "Maxima" and "Minima" on a 
B-Spline]\url{http://mathematica.stackexchange.com/questions/46517/finding- 
maxima-and-minima-on-a-b-spline} 
 
I need to find the "Maxima" and "Minima" on a B-Spline or more correct 
the points where the 2nd components of the derivate equal zero. 
 
For example: 
 
g = BSplineFunction[{{1, 2}, {2, 4}, {3, -1},  ... 
 
- asked by cxkoda (8 votes), answered by Silvia (12 votes) 
 
---------------------------- 
 
[Select cases from a 
list]\url{http://mathematica.stackexchange.com/questions/46472/select-cases 
-from-a-list} 
 
I have a list in the form : 
 
{1,1,1,0,-1,-1,1,1,1,0,0,0,0,-1,-1} 
 
 
No I'm trying to select only those sequences which start with 1 have a 
zero (or many zeros) between and are followed by -1. For  ... 
 
- asked by holistic (8 votes), answered by halirutan (11 votes) 
 
---------------------------- 
 
[Filling a curve between a line and the 
x-axis]\url{http://mathematica.stackexchange.com/questions/46332/filling-a- 
curve-between-a-line-and-the-x-axis} 
 
I'm trying to plot the function $f(x)=\dfrac{1}{x^2}$, filling the 
square area from (0,0) to (1,1) with purple and filling the area under 
the curve from 1 to 4 with red. 
 
However, Mathematica is not  ... 
 
- asked by Eudokia (8 votes), answered by Kuba (7 votes) 
 
---------------------------- 
 
[Explain the difference between ViewPoint and 
ViewVector?]\url{http://mathematica.stackexchange.com/questions/46266/expla 
in-the-difference-between-viewpoint-and-viewvector} 
 
I've read the documentation, but am still very unclear as to what the 
difference is between ViewVector and ViewPoint for Graphics3D. Could 
someone explain it concisely and clearly enough so that an  ... 
 
- asked by Aron (7 votes), answered by Pickett (3 votes) 
 
---------------------------- 
 
[Measuring curve length on a binarized 
image]\url{http://mathematica.stackexchange.com/questions/46342/measuring-c 
urve-length-on-a-binarized-image} 
 
With the help of almighty Mathematica 9, I got from this 
 
 
 
To this: 
 
 
 
with this code: 
 
MorphologicalBinarize[ 
Import["http://i.stack.imgur.com/79l19.jpg"]~ 
ColorConvert~"Grayscale"]; 
... 
 
- asked by iccthedral (7 votes), answered by halirutan (6 votes) 
 
 
================================== 
Greatest hits from previous weeks: 
================================== 
 
[How to generate a random 
snowflake]\url{http://mathematica.stackexchange.com/questions/39361/how-to- 
generate-a-random-snowflake} 
 
'Tis the season... 
And it's about time I posed my first question on Mathematica Stack 
Exchange. 
So, here's an holiday quest for you Graphics (and P-Chem?) gurus. 
 
What is your best code for generating  ... 
 
- asked by Peltio (86 votes), answered by Silvia (117 votes) 
 
---------------------------- 
 
[What is the best Mathematica tutorial for young 
people?]\url{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  ... 
 
- asked by noisy (32 votes), answered by Vitaliy Kaurov (17 votes) 
 
 
================================== 
Can you answer these? 
================================== 
 
[How to get mathematica to simplify a 
result]\url{http://mathematica.stackexchange.com/questions/46254/how-to-get 
-mathematica-to-simplify-a-result} 
 
I have the following output $\text{Li}_2\left(3-2 \sqrt{2}\right)-4 
\text{Li}_2\left(-1+\sqrt{2}\right)$. 
 
This turns out to be equivalent to 
$\displaystyle\log^2(1+\sqrt{2})-\frac{\pi^2}{4}$. 
 
How  ... 
 
- asked by Oliver (3 votes) 
 
---------------------------- 
 
[Why does Network`GraphPlot`wrapper appear in my 
GraphPlot?]\url{http://mathematica.stackexchange.com/questions/46377/why-do 
es-networkgraphplotwrapper-appear-in-my-graphplot} 
 
I'm making a GraphPlot of data similar to this: 
 
gpd =  ... 
 
- asked by ArgentoSapiens (1 vote) 
 
---------------------------- 
 
[Simplifying trig expressions containing Sqrt or 
Abs]\url{http://mathematica.stackexchange.com/questions/46560/simplifying-t 
rig-expressions-containing-sqrt-or-abs} 
 
The following Maple code can simplify abs(sin(x)) into -sin(x) given the 
condition -3Pi/4 &lt; x &lt; -Pi/2 
 
simplify(abs(sin(x))) assuming -3*Pi &lt; x, x &lt; -5*Pi/2; 
 
 
I tried what I thought would  ... 
 
- asked by mathe (6 votes) 

8.22 April 8, 2013

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