Tag Info

Hot answers tagged

7

x = E^-n (2 E^-1 + E^2) + E^n (2 E^-2 + E); x /. Times[a_, b_] :> Times[a, ExpToTrig@b] E^n (E + 2 Cosh[2] - 2 Sinh[2]) + E^-n (2 Cosh[1] + Cosh[2] - 2 Sinh[1] + Sinh[2])


2

Update: Öskå informs me that what you wanted is not in fact what you asked for. Next time ask the right question to get the right answer. Output formatting is often completely different and if that is your goal you need to clearly state it. f[v_, {r_, c_}] := HoldForm[#[#2] = v;] &[{"x", "y"}[[c]], r - 1] out = MapIndexed[f, data, {2}]\[Transpose] ...


2

You aren't doing anything wrong, it's just that Mathematica uses a linear form for the units in Quantity expressions. As mfvonh commented, the expression Power[Quantity["ElectricConstant"], -1] is evaluated to Quantity[1, Power["ElectricConstant", -1]] i.e. a Quantity with a magnitude of 1 and units of "reciprocal electric constants". The unit ...


2

This is not yet a real answer as I offer no solution, only observations. Attempting to answer this by spelunking Quantity formatting is like falling down the rabbit hole. One internal function leads to another ad infinitum. I shall stop for now with the observation that the Box formatting comes from this function: ...


2

Pardon me if this is unjustifiably curt but I don't see how this problem is different from many others that result from placing Dynamic too deep within an expression. Move the Dynamic to the outside and the element in question updates just fine: on = True; Row@{Checkbox@Dynamic@on, Spacer@10, ExpressionCell[ Dynamic@RawBoxes@ RowBox@{"Block", ...


2

The last three locals are actually String, i.e. "\"local\"" at the box level. The fourth from the end, however, should be due to lacking of syntax highlight at the FrontEnd. For this problem, I guess you'll have to force the FrontEnd re-render the ExpressionCell after each update of the on. Usually this can be done by changing an option of the cell (like ...


1

Kerning in Mathematica has longstanding problems in my opinion, though in this case on my system I'm not seeing anything really "wrong." This looks OK in v10 under Windows: f[Subscript[x, 0]] // TraditionalForm At 18pt font size the kerning is perhaps not ideal: However by selecting the right parenthesis and pressing Alt+← to nudge left I get: ...


1

One-liner: MapThread[Set, {{x[#], y[#]} & /@ Range[0, Length@data - 1], data}];


1

Probably not the prettiest but here you go: data = {{0, 1}, {1, 2}, {2, 3}}; (x[#] = (First /@ data)[[#2]]) & @@@ Thread@{Range[0, Length[First /@ data] - 1], Range[Length[First /@ data]]}; (y[#] = (Last /@ data)[[#2]]) & @@@ Thread@{Range[0, Length[Last /@ data] - 1], Range[Length[Last /@ data]]}; ?x


1

Use data[[All,1]] for all x coordinates and data[[All,2]] for all y coordinates



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