Tag Info

New answers tagged

3

As Bob Hanlon comments the original output without Simplify is already in the form you want: efre = Sqrt[-coe // Eigenvalues] {Sqrt[1/2 (5 + Sqrt[5])] Sqrt[k/m], Sqrt[1/2 (3 + Sqrt[5])] Sqrt[k/m], Sqrt[1/2 (5 - Sqrt[5])] Sqrt[k/m], Sqrt[1/2 (3 - Sqrt[5])] Sqrt[k/m]} However, it may help to understand how to work with Simplify and FullSimplify. As ...


2

Remove["Global`*"] coe = k/m SparseArray[{{i_, i_} -> -2, {i_, j_} /; Abs[i - j] == 1 -> 1}, {4, 4}]; efre = Sqrt[k/m] *Simplify[Sqrt[-coe // Eigenvalues]/Sqrt[k/m]]; evec = coe // Eigenvectors // Simplify; Column[Subscript[\[Omega], #] & /@ Range@4 == efre // Thread, Spacings -> 2]


3

In this case, it is advisable to use the Export command: Export["test", data, "Table"] Leads to: Alternative one can use TableSpacing i.e. manipulate space between rows or columns, OutputForm[TableForm[data, TableSpacing -> {0, 0}]] >> "test" this leads to; Edit One can control Accuracy by: data1 = SetAccuracy[RandomReal[{-1, 1}, {3, ...


3

This behavior is present in both version 7 and version 10 (Windows). Illustrated: IdentityMatrix[2] // matrixform {{1, 0}, {0, 1}} // matrixform There is a difference between {{1, 0}, {0, 1}} and (the evaluated form of) IdentityMatrix[2]: the latter is a packed array. {{1, 0}, {0, 1}} // Developer`PackedArrayQ IdentityMatrix[2] // ...


2

I can't explain this strange behaviour of GridBox. But replacing it with Grid I get the desired output (also with a.a // matrixform) matrixform[mat_] := TraditionalForm[ DisplayForm[ RowBox[{StyleBox["[", SpanMaxSize -> \[Infinity]], Grid[mat], StyleBox["]", SpanMaxSize -> \[Infinity]]}]]]; To align the numbers properly use Grid[mat, ...


0

TeXForm /@ {x^a, Sqrt@b, ArcSin[c]} // RowBox // DisplayForm $x^a\sqrt{b}\sin ^{-1}(c)$


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.


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…:


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.


2

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


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.


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]


2

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


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 } ...


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]] ?


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 ...



Top 50 recent answers are included