GrassmannCalculus`
ComposeVector |
|
| | ||||
|
| | ||||
Details and Options
Examples
(1)
Basic Examples
(1)
In[1]:=
<<GrassmannCalculus`
Set the default book vector space.
In[2]:=
★A;
You can use the full form of , or its alias .
ComposeVector[c]
★
c
In[3]:=
[c]
//Column
ComposeVector |
,
★ |
c
Out[3]=
c 1 e 1 c 2 e 2 c 3 e 3 |
c 1 e 1 c 2 e 2 c 3 e 3 |
You will get the same result whether you are in a vector space or a point space.
In[4]:=
;
,
;
//Column
★ℬ |
3
★ |
a
★ |
3
★ |
a
Out[4]=
a 1 e 1 a 2 e 2 a 3 e 3 |
a 1 e 1 a 2 e 2 a 3 e 3 |
You can compose vectors in any dimension.
In[5]:=
Table
;
,{i,1,4}//TableForm
★ℬ |
i
★ |
c
Out[5]//TableForm=
c e 1 |
c 1 e 1 c 2 e 2 |
c 1 e 1 c 2 e 2 c 3 e 3 |
c 1 e 1 c 2 e 2 c 3 e 3 c 4 e 4 |
You can compose lists of vectors.
In[6]:=
★ℬ |
3
★ |
{a,b,c}
Out[6]=
a 1 e 1 a 2 e 2 a 3 e 3 |
b 1 e 1 b 2 e 2 b 3 e 3 |
c 1 e 1 c 2 e 2 c 3 e 3 |
You can make the starting index of the coefficients whatever you want.
In[7]:=
★ |
{a,b,c},0
Out[7]=
{++,++,++}
a
0
e
1
a
1
e
2
a
2
e
3
b
0
e
1
b
1
e
2
b
2
e
3
c
0
e
1
c
1
e
2
c
2
e
3
In[8]:=
★ |
{a,b,c},{-3,0,α}
Out[8]=
{++,++,++}
a
-3
e
1
a
-2
e
2
a
-1
e
3
b
0
e
1
b
1
e
2
b
2
e
3
c
α
e
1
c
1+α
e
2
c
2+α
e
3
Note that all the scalar symbols generated as coefficients of the basis elements have been automatically declared as scalar symbols.
In[9]:=
ScalarSymbols
Out[9]=
{a,b,c,d,e,f,g,h,,,,,,,,,,,,,,,,,,}
a
-3
a
-2
a
-1
a
0
a
1
a
2
a
3
b
0
b
1
b
2
b
3
c
0
c
1
c
2
c
3
c
α
c
1+α
c
2+α
You can also generate templates for vectors using the placeholder symbol. This allows you to tab through the composed result and enter your own values,
In[10]:=
★ |
|
Out[10]=
++
e
1
e
2
e
3
Then that could be copied, filled and assigned to a vector.
In[11]:=
vec1=1+-2+a
e
1
e
2
e
3
Out[11]=
e
1
e
2
e
3
Subscripted scalars are convenient for generic derivations. For specific cases it will often be easier simply to dot the Basis with a List of coefficients.
In[12]:=
pt1={1,-2,3}.Basis
Out[12]=
e
1
e
2
e
3
In[13]:=
Clear[vec1]
|
""

