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[#]} &, 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)