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)