Dew MtxVec NET
TVec.Ramp Methods
Summary
Fills the calling vector with a series following linear rule.

Class
TVec

Declaration
Function Ramp(Offset, Step: TCplx; Index, Len: integer): TVec;

Description
Fills the calling vector elements [Index]..[Index+Len-1] with a series following the rule:

Values[k] := Offset + k*Step.

If the calling vector is complex, only the real part is set. An exception is raised if array borders of the calling vector are overrun.


Declaration
Function Ramp(Offset, Step: TSample; Index, Len: integer): TVec;

Description
Fills the calling vector elements [Index]..[Index+Len-1] with a series following the rule:

Values[k] := Offset + k*Step.

If the calling vector is complex, only the real part is set. An exception is raised if calling vector array borders are overrun.


Declaration
Function Ramp(Offset: TCplx; Step: TSample; Index, Len: integer): TVec;

Description
Fills the calling vector elements [Index]..[Index+Len-1] with a series following the rule:

Values[k] := Offset + k*Step.

The Offset is complex, but the step is real.


Declaration
Function Ramp(Offset: TCplx; Step: TSample): TVec;

Description
The Offset is complex, but the step is real.
Declaration
Function Ramp: TVec;

Description
Fills the calling vector with a series following the rule:

Values[k] := k

(Offset is zero and Step is one). If the calling vector is complex, only the real part is set.

 See Also 
SetVal 

Example 1

var a: TVec; begin CreateIt(a); try a.Size(5,True); a.Ramp(0,Pi); a.Sin; finally FreeIt(a); end; end;

which is identical to:

CreateIt(a); try a.Size(5,True); for i:= 0 to a.Length-1 do a[i] := sin(i*Pi); finally FreeIt(a); end;



Declaration
Function Ramp(Offset, Step: TCplx): TVec;

Description
Fills the calling vector with a series following the rule:

CValues[k] := Offset + k*Step.


Declaration
Function Ramp(Offset, Step: TSample): TVec;

Description
Fills the calling vector with a series following the rule:

Values[k] := Offset + k*Step.

If the calling vector is complex, only the real part is set.

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