6.26 Tuesday, July 7, 2015

================================== 
Top new questions this week: 
==================================

[Faster binary Hamming weight for big integers?]http://mathematica.stackexchange.com/questions/87486/faster-binary-hamming-weight-for-big-integers

While working on an answer to Count the sequences in an array I found that DigitCount was the bottleneck in my code when used as DigitCount[num, 2, 1]. DigitCount first expands the number to an ...

- asked by Mr.Wizard (17 votes), answered by Oleksandr R. (15 votes)

—————————-

[Dataset vs an association of associations]http://mathematica.stackexchange.com/questions/87360/dataset-vs-an-association-of-associations

Associations with a record structure (e.g., a flat table) can be organised in one of two main ways. First as a list of associations, which is also used in the case of Mathematica’s data set ...

- asked by Mac (16 votes), answered by WReach (16 votes)

—————————-

[Count the sequences in an array]http://mathematica.stackexchange.com/questions/87406/count-the-sequences-in-an-array

Is there a short and easier way to count number of sequences in a list?

Let’s say I have three lists:

list1 = 0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0

list2 = 0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1 ...

- asked by gurluk (13 votes), answered by Leonid Shifrin (16 votes)

—————————-

[Plot is discontinuous (it shouldn’t be)]http://mathematica.stackexchange.com/questions/87504/plot-is-discontinuous-it-shouldnt-be

Plot[{(E^x)^(-2I \[Pi])Hypergeometric2F1[-2I \[Pi]-2I Sqrt[2]\[Pi], 
   -2I \[Pi]+2I Sqrt[2]\[Pi],1-4I \[Pi],-E^x]+(E^x)^(2I \[Pi])Hypergeometric2F1[2I \[Pi]-2I...

- asked by grdgfgr (12 votes), answered by MarcoB (13 votes)

—————————-

[What’s wrong with Simplify and FullSimplify?]http://mathematica.stackexchange.com/questions/87305/whats-wrong-with-simplify-and-fullsimplify

I have a quite complex list of equations and inequalities I combine to a boundary condition for my cost function. After investigation of two days I found the bug (I really name it a bug!). One of my ...

- asked by akm (11 votes), answered by Bob Hanlon (3 votes)

—————————-

[What function generates random numbers in a compiled function?]http://mathematica.stackexchange.com/questions/87364/what-function-generates-random-numbers-in-a-compiled-function

I am writing a simulation for 2D random walk. I wrote several version of code, and found that the speed is like this (fastest to slowest): C++, Mathematica compiled procedural code, Mathematica ...

- asked by Felix (11 votes), answered by Szabolcs (11 votes)

—————————-

[Trainable WEKA segmentation of images] http://mathematica.stackexchange.com/questions/87256/trainable-weka-segmentation-of-images

Is there a Mathematica equivalent of Trainable WEKA Segmentation as implemented in Fiji, the image processing software? A Google search did not return any relevant links.

I attach the original image ...

- asked by JMarc (11 votes), answered by blochwave (17 votes)

================================== Greatest hits from previous weeks: ==================================

[How to make Jacobian automatically in Mathematica] http://mathematica.stackexchange.com/questions/5790/how-to-make-jacobian-automatically-in-mathematica

If we have two vectors, a and b, how can I make Jacobian matrix automatically in Mathematica?

$$ a=\left( 
\begin{array}{c} 
 \text{x1}^3+2\text{x2}^2 \\ 
 3\text{x1}^4+7\text{x2} 
\end{array} 
$$

- asked by George Mills (19 votes), answered by Jens (26 votes)

—————————-

[Assign the results from a Solve to variable(s)] http://mathematica.stackexchange.com/questions/6669/assign-the-results-from-a-solve-to-variables

I understand Mathematica can’t assign the results of a Solve to the unknowns because there may be more than 1 solution. How can I assign the 4 values of following result to variables?

- asked by stevenvh (18 votes), answered by Artes (14 votes)

================================== Can you answer these? ==================================

[Does Sum calculate all terms before summing them?] http://mathematica.stackexchange.com/questions/87444/does-sum-calculate-all-terms-before-summing-them

After calculating the sum of a large number of large objects, using

B = Sum[RandomInteger[{0, 1}, {10^6}], {100}];

I find that MaxMemoryUsed[] has increased by 400MB, which is about 100 times ...

- asked by Stephen Powell (1 vote)

—————————-

[Performing a convolution for smoothing a function]http://mathematica.stackexchange.com/questions/87674/performing-a-convolution-for-smoothing-a-function

I want to smooth a one-dimensional oscillating function by convolving it with another function that I’ll call the screening function. This screening function should have a trapezoidal form and go to ...

- asked by user34801 (2 votes)

—————————-

[Alternative to use a function as an argument in Compile]http://mathematica.stackexchange.com/questions/87618/alternative-to-use-a-function-as-an-argument-in-compile

I am currently working on problems that require the use of functions such as :

Alpine[x__] := Total@Table[Abs[i*Sin[i] + 0.1*i], {i, x}]; 
ParabolaMin [x__] := Total@Table[i^2, {i, x}]; 
 
 
It may be  ... 
 
- asked by Doedalos (1 vote)