# Tag Info

## New answers tagged vector

3

All you need are Partition and Count. Both were available in V1.1. Lets take it step by step. First some random data. For demonstration purposes 20 elements will be enough. SeedRandom[42]; data = RandomInteger[{0, 2}, 20] {1, 2, 1, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 2} Again for demonstration purposes, 5 groups of 4 elements each will ...

0

I guess this will do what you want! Here an example of the kind of groups of 20 you mentioned. I assume '0', '1', '2' in your elements list are strings. list = RandomChoice[{"0", "1", "2"}, {10, 20}]; Now the counting is easy. and you get those n0,n1,n2. Transpose@(Sort[Tally[#]] & /@ ToExpression[list])[[All, All, 2]] {{2, 9, 8, 7, 7, 9, 4, ...

1

Assuming that you have decided to call the coordinates x, y, and z throughout, you could do this, building on the definition you already have (I shortened your momentum definition, and in addition, you could also use $\hbar$ instead of h by entering ESChbESC): r = {x, y, z}; p= -I h D[#,{{x,y,z}}]& L = Function[{f}, r\[Cross]p[f]]; L[f[x, y, z]] ...

0

Not an answer, mentioning in case anyone knows how to proceed. One might start from uniformly drawn random numbers and see what's their distribution after the constraints are imposed : dist = TransformedDistribution[{b, c, d} \[Conditioned] (1 < d < b < c && b + d < c && b + 2 d > c), ...

2

For real values, there is another way, because then you don't need the Abs which is created by Norm. It is simply Simplify[Sqrt[n.n]] (* 1 *)

5

n1 := Cos[α] Sin[β] n2 := Sin[α] Sin[β] n3 := Cos[β] n := {n1, n2, n3} FullSimplify[Norm[n], {α, β} ∈ Reals] (* 1 *)

3

test = {x^2 y, x}; p = PolynomialGCD @@ test {p, test/p} test = {a b c e, b c e, c d e, e c}; p = PolynomialGCD @@ test {p, test/p} (* {x, {x y, 1}} {c e, {a b, b, d, 1}} *)

Top 50 recent answers are included