Re: Create subspace from Basis : Maple
- From: israel@xxxxxxxxxxx (Robert Israel)
- Date: 25 May 2006 22:17:40 GMT
In article <1148567059.226496.293590@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
matrix <iyerns@xxxxxxxxx> wrote:
Hi,
I have the Basis vectors of a subspace. How can I form the whole
subspace (all possible linear combinations) from these basis vectors in
Maple ?
I use symbolic computations mod 2.
If your field is Z_2 (i.e. the integers mod 2), and the "vectors" are
implemented as lists or Vectors, then the span of a set of vectors V
can be obtained as follows:
T:= combinat[cartprod]([seq]([0,1],i=V);n:= nops(V);
makevec:= proc(L) add(L[i]*V[i],i=1..n); % mod 2 end;
{seq}(makevec(T[nextvalue]()), i=1..2^n);
Note: if the set is not necessarily linearly independent, it's
better using lists here rather than Maple's Vectors,
because duplicate lists are automatically removed from a set, while
duplicate Vectors are not. Of course you can easily convert from
lists to Vectors or vice versa.
Robert Israel israel@xxxxxxxxxxx
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia Vancouver, BC, Canada
.
- References:
- Create subspace from Basis : Maple
- From: matrix
- Create subspace from Basis : Maple
- Prev by Date: Re: Create subspace from Basis : Maple
- Next by Date: Financial Mathematics programs for MathCad please ?
- Previous by thread: Re: Create subspace from Basis : Maple
- Next by thread: Financial Mathematics programs for MathCad please ?
- Index(es):
Relevant Pages
|
|