Tag Info

New answers tagged

0

You could put the arguments of Dot, which in general is not commutative but is commutative on vectors, in a canonical order with Sort. relations = p1.p1 == m && p1.p2 == 0 /. d_Dot :> Sort[d]; Simplify[2 (p1.q1) (p3.p2) + (p1.p2)^2 + (p2.p1) /. d_Dot :> Sort[d], relations] (* 2 p1.q1 p2.p3 *) Alternative, using $Assumptions to restrict the ...


1

Let's estimate the parameters for the following model. sample = RandomFunction[ ARProcess[{{{.2, -.4}, {-.2, 0}}}, {{.1, -0.05}, {-0.05, .15}}], {1, 1000}] Next, use the function EstimatedProcess to perform the estimation: α = {{α1, α2}, {α3, α4}}; Σ = {{σ11, σ12}, {σ21, σ22}}; EstimatedProcess[sample, ARProcess[{α}, Σ]] Note that when ...


1

\[GothicCapitalR] = {{{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}, {{0, 1, 0}, {0, 0, 1}, {1, 0, 0}}, {{0, 0, 1}, {1, 0, 0}, {0, 1, 0}}, {{1, 0, 0}, {0, 0, 1}, {0, 1, 0}}, {{0, 0, 1}, {0, 1, 0}, {1, 0, 0}}, {{0, 1, 0}, {1, 0, 0}, {0, 0, 1}}}; i = 1; j = 1; det = 1; a = Subsets[Range[6], {3}]; v = {x, y, z}; k = \[GothicCapitalR].v; PolynomialLCM @@ ...


4

Instead of While[i<21,...], use Table[...,{i,20}]. The ... part can be reduced to r = k[[a[[i]]]]; Factor[Det[r]] To find the PolynomialLCM, simply replace the head ( List) of the table with PolynomialLCM using Apply, or @@ for short: PolynomialLCM @@ Table[...,{i,20}]


2

Replace the Print[det] in the print with: Paste[det]


2

Here is a definition that works for arbitrary number of phasors: ClearAll[phasor] phasor /: Plus[p : _phasor ..] := phasor @@ ToPolarCoordinates@ Total[{p} /. phasor -> (FromPolarCoordinates[{##}] &)] Example: phasor[1, Pi] + phasor[2, Pi/4] + phasor[3, Pi/3] ...



Top 50 recent answers are included