> To orthogonalise vector A wrt B:
>
> Aorth = A - B (A.B)/(B.B)
I don't know if FSL allows this, but one can also orthogonalise a
vector wrt the space spanned by a set of column vectors (the
expression reduces to the above if the set contains just one vector).
In MATLAB notation:
Aorth = A - B*inv(B'*B)*B'*A
and I think the following also works if B contains some dependent columns:
Aorth = A - B*pinv(B)*A
where pinv is a generalised inverse (e.g. Moore-Penrose pseudo-inverse
as used in MATLAB).
I hope that's of interest,
Ged.
|