Mathematica Weekly Newsletter
Mathematica Weekly Newsletter

Top new questions this week:

Maximize[Cos[x - 1], x] is not evaluated

No explanation needed: Maximize[Cos[x + 1], x] Maximize[Cos[x - 1], x] producing {1, {x -> -1 + 2 π}} Maximize[Cos[1 - x], x] Needless to say, this is pretty amusing. Does anyone know why ...

maximum  
asked by DumpsterDoofus 18 votes
answered by Michael E2 9 votes

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

core-language built-in-symbols  
asked by ShutaoTang 15 votes
answered by Mr.Wizard 14 votes

I define a variable as local to a module BUT then the module uses its global value! Why?

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

scoping core-language  
asked by pan_e_gaban 11 votes
answered by Leonid Shifrin 12 votes

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

graphics bugs crash  
asked by SquareOne 10 votes

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: <<SocketLink` host = ...

undocumented streams web-access  
asked by MBryn 10 votes

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 /. {{-∞, mid___, ∞} :> { mid }, {-∞, mid___ } :> { mid, ∞}, { mid___, ∞} :> ...

list-manipulation programming replacement  
asked by Mr.Wizard 10 votes
answered by ybeltukov 5 votes

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

set part  
asked by Eric Parker 9 votes
answered by Leonid Shifrin 11 votes

Greatest hits from previous weeks:

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

graphics random simulation generative-art  
asked by Peltio 100 votes
answered by Silvia 131 votes

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

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

image-processing  
asked by s.s.o 38 votes
answered by nikie 38 votes

Can you answer these?

$3\times 3 = 6 + \bar{3}$ in Mathematica?

Can Mathematica handle this type of algebra, which is used very frequently in e.g. particle/nuclear physics? That is, I want to decompose a product of representations (in $SU(N)$ say) into irreducible ...

linear-algebra group-theory  
asked by Love Learning 7 votes

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

version-10 summation assumptions  
asked by Parhs 5 votes

Rendering a 3D volume with Image3D

I have 2D JPEG images, of 1024 x 1024 pixels, corresponding to a 500 x 500 square micron section. These images are taken from slices of tissue, each slice seperated by 10 microns. I've been trying to ...

image rendering image3d  
asked by DRG 3 votes
Subscribe to more Stack Exchange newsletters


Unsubscribe from this newsletter or change your email preferences by visiting your subscriptions page on stackexchange.com.

Questions? Comments? Let us know on our feedback site. If you no longer want to receive mail from Stack Exchange, unsubscribe from all stackexchange.com emails.

Stack Exchange, Inc. 110 William St, 28th Floor, NY NY 10038 <3