Tag Info

Accepted

Central element of matrix

Assuming "better way" means better performance: Since you know the matrix has odd dimensions, you can skip Floor. Furthermore, you can calculate the index ...
• 29.2k

Special case of CellularAutomaton

If you read the documentation for CellularAutomaton, you will find the line: Explicit initial conditions are assumed cyclic. This works regardless of the ...
• 29.2k

Special case of CellularAutomaton

Here is the solution. If someone could reproduce it with CellularAutomaton, I'll be very appreciated. ...
• 1,894

Special case of CellularAutomaton

Is such a result already known and can it be proved that the process always ends in a static state? For asynchronous updates (where one cell at a time is chosen, deterministically or at random, and ...

I'm not able to delete -> in {{x -> a}, {x -> b}, {x -> c, x -> d}}

rules = {{x -> a}, {x -> b}, {x -> c, x -> d}}; Using Delete: ...
• 28.4k

I'm not able to delete -> in {{x -> a}, {x -> b}, {x -> c, x -> d}}

rules = {{x -> a}, {x -> b}, {x -> c, x -> d}}; rules /. x : {_Rule, __} :> List @@@ x /. Rule :> Splice @* List {{x, a}, {x, b}, {{x, c}, {x, ...
• 82.2k
1 vote

FindClusters with custom DistanceFunction

Your syntax for the distance function isn't quite right. Define: df[x_, y_] = Abs[x - y]; Then: ...
• 69.5k
1 vote

FindClusters with custom DistanceFunction

Mathematica's FindCluster knows various type of DistanceFunction. So if you want to use 1,2,...,365 as indices of data, try the ...
• 1,930

Top 50 recent answers are included