Tag Info

New answers tagged

4

V = (-G*Mn)/Sqrt[x^2 + y^2 + z^2 + cn^2]; Vx = D[V, x] /. {x -> x[1], y -> y[1], z -> z[1]}; StringReplace[ToString[Vx, FortranForm], " " -> ""]


1

The issue, as I understand it, is to display a graphic with its ImageSize proportional to its "real" size. So, in an ideal world one would use something like plt=Graphics[ ... ]; plt=Show[plt, ImageSize -> AbsoluteOptions[plt, RealSize][[1,2]]/scalefactor] The problems are, there may be no Option equivalent to RealSize and, if there is, ...


1

Your problem arises from another Graphics option,PlotRange, having the default value Automatic, which gives each Graphics object its own plot range. To get what you want you will need to force each Graphics object to have the same plot range. Here is something that works for your example. I have made it a little more general than needed because I think you ...


4

$PlotTheme is exactly the included mechanism for setting a global Plot Theme: $PlotTheme gives the default setting for the option PlotTheme for graphics functions. To declare this "dodgey" without further explanation is rather peculiar. Many System parameters are configured the same way: $Pre, $Post, $PreRead, $PrePrint, $MessagePrePrint, ...


2

First of all, I don't see any need for the Notation package here. So I'll just omit that. Also, you need to replace -> by :> in the definition for c, otherwise a may be polluted by a global value. The rest can be done as follows: (*Creates a subscripted integer*) fock[n_Integer, m_] := Subscript[n, m] (*Creates a series of 0's indexed from 1 to nm*) ...


7

Since python has pretty close syntax as Fortran, converting the expression to FortranForm is what I usually do in this case. testing2 = ExpandAll[ D[(x - A)^2 + (y - B)^2 + (v - C)^2 + (x + y - (S + v) - D)^2 - \[Lambda]1*x - \[Lambda]2*y - \[Lambda]3* v - \[Lambda]4*(x + y - (S + v)), {{x, y, v}}]] sols = {x, y, v, x, y, v, \[Lambda]1, ...


9

From very old documentation (I think Mathematica 4): Parentheses within a single RowBox by default grow to span whatever other objects appear in the RowBox. Some expandable characters, however, grow by default only to a limited extent. The latter seems to apply to square brackets. But we can overcome that by using a StyleBox: StyleBox [RowBox[{"[", ...


2

Since you are cutting and pasting output into perl, you may find this easier than explicitly converting your output expression into input form string. Select the cell with your output. Bring up the contextual menu (right mouse click) Select Convert To > Raw Input Form The result will be


2

Thank you march for my solution: ToString[InputForm[Det[matry]]]


3

To work with Stylesheets proficiently you need to be able to edit Style Cell code directly, not only make changes via the menus. While in most cases you can perform the same actions via the Option Inspector there is always a layer of abstraction between you and the code. After opening the editor via Format > Edit Stylesheet ... you should see something ...


0

DSolve[{M[t] x ''[t] == G u, x[0] == 0, x'[0] == 0}, x[t], t] // FullSimplify[#, t < 50] & (* {{x[t] -> 600 (t + (-50 + t) Log[-(50/(-50 + t))])}} *) cancels the explicit imaginary term for t < 50. The imaginary term cannot be eliminated for larger t except by applying the boundary conditions in the first ODE at some t value greater than 50 ...


2

EDIT: added detail for provided equations. $Version "10.1.0 for Mac OS X x86 (64-bit) (March 24, 2015)" x0 = 15000; y0 = 10; m0 = 150; v0 = 210; G = 3; u = 600; g = 98/10; v1[h_] = Sqrt[v0^2 - 2 g h]; t1[h_] = (v0 - v1[h])/g; M[t_] = m0 - G t; Clear[x, y] x[t_] = x[t] /. DSolve[ {M[t] x''[t] == G u, x[0] == 0, x'[0] == 0}, x[t], t][[1]] ...



Top 50 recent answers are included