Hot answers tagged


With Frame -> All, the automatic Spacings are weird. The automatic BaselinePosition is bad either way. It seems to be a good idea to include substitutes for as many of those options which are Automatic by default as possible: pic2 = ImageResize[ImageCrop@Rasterize@Graphics@Disk[], {Automatic, 40}]; Grid[{{pic2}}, Alignment -> {Center, Center}, ...


Maybe this will fit your needs: myPrint[args__, {style__}] := Print[Row[{args}, BaseStyle -> {style}]] myPrint["Mass of the atmosphere is: ", m, {FontSize -> 18, FontWeight -> Bold, Background -> LightRed}] myPrint["Mass of the atmosphere is: ", m, {"Section"}]


{ConjugateTranspose[c],ConjugateTranspose[c]^2} /. ConjugateTranspose[c]->SuperDagger[c] gives:


As m_goldberg and Jens could not reproduce the problem on Mathematica 10.3.1 I updated my Mathematica and it turns out that the behavior of Mathematica depends on the version. Graphics[Text[Framed[Foobar, RoundingRadius -> 7]]] yields the following. From left to right: V10.2 Notebook, V10.2 PrintOut, V10.3.1 Notebook, V10.3.1 Printout So the problem ...


Perhaps this example could be helpful: pts = RandomReal[1, {10, 2}]; ch = VoronoiMesh[pts]; mp = MeshPrimitives[ch, 2]; ml = MeshPrimitives[ch, 1]; mpt = MeshPrimitives[ch, 0]; Graphics[Riffle[RandomColor[Length@mp], mp]~Join~{Red, Thick, ##} & @@ ml~Join~{Blue, PointSize[0.02], ##} & @@ mpt]


define your styles beforehand, style1 = Style[#, 12] &; style2 = Style[#, 24, Blue, Background -> Pink] &; and then just use them quickly and easily, Print["Variable a = ", style1@a]; Print["Variable b = ", style1@b]; Print["The result: a + b = ", style2@c];


We do not know the form of the output for FSol, RHS or vanhdef because you have not provided that information, so we can only guess. If FSol[RHS[vanhdef] == 0, rh] returns a Rule for rh (i.e. Rule[rh,x] or rh->x) then just use rhdef = rh /. FSol[RHS[vanhdef] == 0, rh] Here /. stands for ReplaceAll so is the same as rhdef = ReplaceAll[rh, ...


(Just answering the first question. Others have answered the second question thoroughly.) It's worth mentioning that you can do {x,y} // (f @@ #) & f[x,y] (No parentheses needed, but I added them for clarity.) You could even make your own function to do this (slightly) more compactly, especially if you have trouble remembering the @'s and #'s ...


To address the issue use some Off[NumberForm::sigz] in Manipulate[...]. It is also better to use simple Epilog with Text[Row[...] (code below): Some code picture:


This is as close as I could get for this expression, but I don't know what other types of expressions you would need to work with. The code is also ugly, so there has got to be something prettier, but here goes: if we set exp = (23991 x^3)/(250000 a^5) + (87271/(5000000 a^6) + 31/(600 a^2) - b/2816) x^4 then exp /. {Rational[x_, y_]*rest_ :> ...


Code: DY = {{Cos[ay], 0, Sin[ay]}, {0, 1, 0}, {-Sin[ay], 0, Cos[ay]}}; Output: A potential error: {{Cos[ay], 0, Sin[ay]}, {0, 1, 0}, {-Sin[ay], 0, Cos[ay], 0}}; Look at the sub-list no. 3, you've got additional 0 in there making the lists of un-equal lengths;

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