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[#>0,1,2]& 
 
 
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 &, {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 -> Automatic, PlotRange -> {{x0, x1}, {y0, y1}}, 
 ImageSize -> Small, 
 Frame -> 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)