Tag Info

Hot answers tagged

6

Will a = -3; Print[Defer[\[FormalA] x + 5 + x^2] /. \[FormalA] -> a] -3 x + 5 + x^2 work for you?


4

What about Print[HoldForm[3 x + 5 + x^2]] ?


3

I don't use the command line and haven't tried this but I suspect that SetOptions["stdout", PageWidth -> Infinity] may be what you are after.


3

Nothing is rounded internally. It is just the default setting for number display is 6-digits. You can change that default in the Preferences panel. Select the Numbers and Formatting tabs in the Appearance panel. Use the Displayed Precision edit field.


3

Yes, there is such a way. Try this, for example. First define a function to integrate; int[expr_] := Integrate[expr, {z, -h/2, h/2}, {\[Theta], 0, 2 \[Pi]}] Then map this function onto the terms of your expression: r[\[Theta], z] = Sqrt[(h/2)^2 - z^2] + g[\[Theta]] - h/2; Map[int, Expand[1/2 r[\[Theta], z]^2]] This results in: $$\int_0^{2 \pi } ...


3

pp = {{rr, {{0, t, q, dh}, {0, 1, 0, th}, {1, 1, 0, sh}}, {{0, t, q, dh}, {1, 0, 0, th}, {1, 0, 0, sh}}}, {kk, {{0, t, q, dh}, {0, 1,0, th}, {1, 0, 0, sh}}, {{0, t, q, dh}, {0, 0, 0, th}, {0, 1, 0,sh}}}}; MapAt[MatrixForm, pp, {{All, All}, {}}]


3

Let's define your matrix as p = {{rr, {{0, t, q, dh}, {0, 1, 0, th}, {1, 1, 0, sh}}, {{0, t, q, dh}, {1, 0, 0, th}, {1, 0, 0, sh}}}, {kk, {{0, t, q, dh}, {0, 1,0, th}, {1, 0, 0, sh}}, {{0, t, q, dh}, {0, 0, 0, th}, {0, 1, 0,sh}}}}; You could do the MatrixForm on the outermost and the inner levels: #[Map[#,p,{2}]]&@MatrixForm An ...


2

I am not sure of your level of Mathematica experience, or the context of your need. Some basic facts about Mathematica may be helpful. Mathematica sorts output lexicographically (roughly alphabetic order). So if you have a choice of variable names make all of the complex coefficients later in the alphabet than the real coefficients. e.g. ComplexExpand[a ...


2

EDIT Here's a slightly modified version of a suggestion made by Kuba in my separate question on this topic (coordinates[[1]] /. (Sqrt[5]) -> (2 tau - 1) // Simplify) /. tau -> HoldForm@\[Tau] ORIGINAL This is not the most elegant solution to grace this forum, but: Map[ If[ AtomQ@#, #, (Simplify[#/τ]*HoldForm@τ) /. { τ -> ...


2

Use this Monitor[ For[i = 1, i <= n, i++, ... If[Mod[i, stride] == 0, t = {N[i/n], bestsofar}] ],t]


2

The quotes appear because the InputForm does not show them, while the OutputForm does. Programmatically, you can explicitly call OutputForm to avoid this: Export["quotes.png", OutputForm[CharacterRange["a", "z"]]] You can also go into Format > Option inspector… and look for ShowStringCharacters and using Save selection as…:


2

You can set the multiplication symbol in Preferences->Appearance->Numbers->Multiplication


1

I'm on 10.0 for Mac OS X x86 (64-bit) (June 29, 2014) and and have the following observed: highlighting the Output-Cell and using the Command "Save Selection As" leads to the following result; highlighting the Output and using the Command "Save Selection As" leads to the observed result; Wile CellPrint[ExpressionCell[CharacterRange["a", ...


1

With V10 on OS X, I get Might be a platform issue.


1

Try using Pane, e.g. (I used a random chunk of equation for example here): Pane[TreeForm[(Abs[(mod - q2)*(q1 - lent*totalt)] + Abs[q2*(1 + q1 - lent*totalt)])/totalt, ImageSize -> 1000], ImageSize -> {600, 400}, Scrollbars -> True]



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