# Tag Info

2

I will use NumericQ to test whether something is a scalar. First, some NonCommutativeMultiply properties: Unprotect[NonCommutativeMultiply]; NonCommutativeMultiply[H__, c_, T__] := c NonCommutativeMultiply[H, T] /; NumericQ[c] NonCommutativeMultiply[H___, Times[c_, factors__], T___] := c NonCommutativeMultiply[ H, Times[factors], T] /; NumericQ[c] ...

5

Since you're specifically asking about $SU(2)$, we have a convenient representation in the form of the $2\times 2$ Pauli matrices. This makes it seem very beneficial to map your problem onto a matrix multiplication. Here is how you can do it. First I define the three single spin matrices, then embed them into the product space of the $N$ spin system using ...

8

A different interpretation would be that the acceleration is always in the same direction, but that the sensor actually rotates. In that case: {pt, px, py, pz} = Transpose@Rest@Import["http://pastebin.com/raw.php?i=jZ57mqZT"]; {pa, pθ, pϕ} = Transpose@CoordinateTransform["Cartesian" -> "Spherical", Transpose@{px, py, pz}]; θi = ...

10

Assuming that all the initial positions (x[0], y[0] and z[0]) and the initial velocities (x'[0], y'[0] and z'[0]) are equal to 0 you can do: adat = Rest@Import["http://pastebin.com/raw.php?i=jZ57mqZT"]; {ax, ay, az} = Interpolation /@ (adat[[All, {1, #}]] & /@ {2, 3, 4}); {xt, yt, zt} = (x /. Quiet@First@NDSolve[{ x[0] == 0, x'[0] == 0, ...

2

Here's a qualitative way to do the computation using FFTs. First, make some data (in this, the disks all have phase 1, but that can be easily fixed): w1 = 600; w2 = 800; dat = Sum[ RotateRight[ DiskMatrix[ RandomInteger[{1, 150}], {w1, w2}], {RandomInteger[{-1000, 1000}], RandomInteger[{-1000, 1000}]}], {k, 6}]; Here's a plot of ...

10

The inertia tensor is defined as an integral of the following tensor over the body region vars = {x, y, z}; r2 = IdentityMatrix[3] Tr[#] - # &@Outer[Times, vars, vars]; r2 // MatrixForm It is very simple to do with integration over a region Integrate[r2, vars ∈ region] It can be wrapped in the following function inertiaTensor[reg_, assum_: {}] ...

Top 50 recent answers are included