ssch
Reputation
11,877
Top tag
Next privilege 15,000 Rep.
Protect questions
 Dec12 awarded Popular Question Oct30 awarded Nice Question Sep30 awarded Explainer Sep24 awarded Autobiographer Sep19 awarded Generalist Aug31 awarded Announcer Aug11 awarded Necromancer Jul2 awarded Curious Jun28 awarded Nice Question Jun18 awarded Yearling May24 awarded Nice Question Apr10 awarded Popular Question Dec19 comment How to do subtraction with sets in which the elements have multiplicity indicators? Do you know about Intersection and Complement? Intersection[l1, l2] == {{1, 1}, {2, 2}} and Complement[l1, l2] == {{3, 4}} Dec17 comment Mapping a function that assigns values to a list over a different list I don't think the poster always want position 1 and 3, but position $c_{i1}$ and $c_{i2}$ but without the Do, and presumably something prettier than f[{x_, y_}] := {fx[x, y], fy[x, y]}; Transpose@{Riffle[#, #] &@Range@Length@c, Flatten@c} -> Flatten[f /@ c] // SparseArray // Normal Dec17 comment Can Mathematica identify formulae or sequences of numbers? OEIS in Mathematica Dec16 comment Plotting Voxel in mathematica The size of every voxel in a grid is always the same, by definition. Dec15 comment Opposite function to Normal @MichaelE2 Strange that Band gets worse memory than sparsifying(?) a normal array :) Same thing for a larger matrix like 10k x 1k? (I'm on v8.0.4 and get same for sp and sp2) Dec15 comment Opposite function to Normal @Mencia Doesn't matter what it is, SparseArray only stores information representing position and value for places where the value is not equal to the background value, so for memory use it doesn't matter what the background happens to be. However 0 is very common and is usually what you want (this is why Mathematica assumes you want 0 unless you specify otherwise) Dec15 comment Opposite function to Normal @Mencia the default value that is used where nothing else is specified in the SparseArray e.g. SparseArray[Band[{1,1}]->9, {5,5}, Infinity]//Normal//MatrixForm Dec15 answered Opposite function to Normal