matlab - Non Commutative Multiplication -
I am trying to implement axioms for geometrical products of two vectors in the n-dimensioned Euclidean vector space.
i.e. allowing the user to input the number of dimensions, such as 3
make E1, E2, E3 as the symbol
the user Let the two vectors input input as the function of N shape like vectors such as A = A1A1 + A2A2 + A3A3; B = b1e1 + b2e2 + b3e3
Where a1, a2 ... and b1, b2 ... are scalars
expand two vectors a and b
< P> (A1A1 + A2A2 + A3A3) (B1E1 + B2E2 + B3E3)All this works fine for me when Not even till this point.
From this point, I need to run the expansion of non-computious, i.e. e2e1 = / = e1e2
Is there any way I can do that? After this, if the reader is kind, then one way to implement physics algebra is E1a1 = E2A2 = nan = 1
and e2e1 = -e1e2 -> EEZ = -IG
Thank you very much!
What do you want to "multiply" which calculates all pairs (T1, T2) , Where T1 is a word from the first expression, and T2 is a word from the second term.
function C = partner_most (s1, s2)% 's1, s2 cell array' n1 = number (s1); N2 = number (S2); C = cell (1, N1 * N2); 1 = 1: 2 = 1 for N1: N2 k = k2 + N1 * (k1-1); C {k} = [S1 {k1} S2 {k2}]; End; End; End
You can do it like this:
expr1 = {'a1', 'b1', 'c1'}; Xp2 = {'A2', 'B2'}; Result = pair_famous (xp1, xp2);
Comments
Post a Comment