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