From: Bruce Colletti on 31 Jan 2010 05:58 Re 7.0.1 under WinXP. Is there simpler code (than that below) for this task: - For numeric list X = {x1,...,xN}, color and display the form x1 + ... + xN - To color, first split X into m-element sublists - Color red (blue) the elements in odd (even) numbered sublists Thanks. Bruce f[X_List, m_Integer] := Module[{Y}, Y = Partition[X, m]; Z = MapThread[(c = If[OddQ@#2, Red, Blue]; Style[#, c, Bold, 18] & /@ #1) &, {Y, Range(a)Length@Y}]; Infix[Flatten@Z, Style["+", 18]]]; f[Table[1,{15}],3]
|
Pages: 1 Prev: Journals dying?, apparently rather slowly (was Next: Prime Rotating Diagram |