MAMBO logo MAMBO & the MAMBO Toolbox MAMBO logo

CoeffExtract — Extracting a coefficient array [mupad/matlab]

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}:
sol:=linalg::matlinsolve(linalg::expr2Matrix(kde,[q1t,q2t,q3t])):
kde:={_seqgen(_concat(q,i,t)=sol[i],i,1..3)}:
vel:=VelocityDescription([subs(LinearVelocity(A,P),kde)]);

Coeff Extract Output

CoeffExtract(vel,[u1,u2]);

Coeff Extract Output


Toolbox functions