Dew MtxVec NET
TMtx.CopyVec Methods
Summary
Copies values from vector to a matrix.

Class
TMtx

Declaration
Function CopyVec(Vec: TVec; VecIndex, Len, Row, Col: Integer): TMtx;

Description
Copy Vec elements [VecIndex]..[VecIndex+Len-1] to the calling matrix elements starting with [Row,Col]. An exception is raised if ConditionCheck is true and bounds are overrun or if Complex properties of the calling matrix and Vec do not match.
Declaration
Function CopyVec(Vec: TVec; NrRows: Integer): TMtx;

Description
Copy all Vec elements to the calling matrix. Set the calling matrix Rows property to NrRows. Set the calling matrix Cols property to Vec.Length div NrRow (Length = Rows*Cols). The calling matrix Complex property is adjusted automatically. An exception is raised if Vec.Length mod NrRows <> 0.
 See Also 
Copy 
CopyMtx 

Example 1

var A: TMtx; v: TVec; begin CreateIt(A); Create(v); try v.SetIt(true,[1, 0, 2, -1, 5, 1.2]) ; A.CopyVec(v); finally FreeIt(A); end; end;

Copyright 2008 Dew Research
http://www.dewresearch.com