MAMBO logo MAMBO & the MAMBO Toolbox MAMBO logo

CoeffExtract — Extracting a coefficient array [maple]

CoeffExtract(desc, [s1, ..., sn])

desc: Mambo column description

s1, ..., sn: variable names

The function CoeffExtract returns a Mambo description with number of rows equal to the number of rows of its first argument and number of columns equal to the number of variable names.

The (i,j)-th element of the output equals the coefficient of the j-th variable in the i-th row of the first argument.

>Restart(): >DeclareObservers(A): >DeclarePoints(A,P): >DeclareTriads(a): >DefineObservers(A,A,a): >DefinePoints(A,P,a,q1,q2,q3): >DeclareStates(q1,q2,q3): >kde:=DiffTime({q1^2+q2^2+q3^2=0}) union {q1t=u1,q2t=u2}: >kde:=solve(kde,{seq(cat(q,i,t),i=1..3)}): >vel:=VelocityDescription([subs(kde,LinearVelocity(A,P))]);

vel:=table1,1=table1=tableTriad=a,Coordinates=u1u2q1u1+q2u2q3,Type=Vector,Size=1,Type=Description,Size=1,1

>CoeffExtract(vel,[u1,u2]);

table1,2=table1=tableTriad=a,Coordinates=01q2q3,Type=Vector,Size=1,1,1=table1=tableTriad=a,Coordinates=10q1q3,Type=Vector,Size=1,Type=Description,Size=1,2


Toolbox functions