Tag Info

Hot answers tagged

3

One part of the problem is answered here: What are the most common pitfalls awaiting new users?. You have to prevent the objective function from being evaluated before the x[i] are assigned numeric values. The rest of the problem is, I think, that Minimize can't deal with this type of optimization, since the function cannot be analyzed symbolically, not ...


3

DiscretizeRegion makes it is easier to deal with Regions: Manipulate[ Module[{p = Table[ngon[1, n, r {Cos[q], Sin[q]}], {q, 0, 2 Pi, (2 Pi)/n}], ps}, ps = RegionUnion[DiscretizeRegion /@ p]; Plot3D[1, {x, y} \[Element] ps, Mesh -> False]], {r, 1, 6}, {n, Range[4, 12]}]


2

Row[SequenceAlignment[original, fixed] /. {s_String, t_String} :> Row[{Style[s, Background -> Lighter@Red], Style[t, Background -> Green]}]]


2

Using Defer or HoldForm in the first argument and StandardForm in the last argument of the outer ToString: ToString[Defer@Flatten[Array[StringJoin["(", ToString[(-1)^#1], ",", ToString[(-1)^#2], ")"] &, {2, 2}]], StandardForm] (* ...



Only top voted, non community-wiki answers of a minimum length are eligible