Shift a vector
1. vshift ix:=col(1) delta:=3 fill:=0 ox:=col(1); 2. vshift ix:=col(1) delta:=3 fill:=0 ox:=<new>;
Please refer to the page for additional option switches when accessing the x-function from script
Input
vector
Specifies the input data to be shifted.
int
Specifies the new position for the first row.
double
Specifies a padding value. Cells in the output vector whose indices are less than the delta variable will be filled with this value.
Output
Specifies the output for the shifted vector.
The vshift function shifts the input vector and pads the first few cells in the new vector with a specified value.
// The vshift function can be used in situations where two datasets // share an X column, but you wish to move one dataset relative to; // another in the X direction. This amounts to moving the data in the; // worksheet down (vertically, thus 'v'shift) // New book and import data newbook; path$ = system.path.program$ + "Samples\Curve Fitting\Enzyme.dat"; impasc fname:=path$; // Plotting columns 2 vs 1 and 3 vs 1 range r1 = (1,2); range r2 = (1,3); win -t plot line; plotxy r1 plot:=200 color:=color(orange) ogl:=1; plotxy r2 plot:=200 color:=color(olive) ogl:=1; win -z; //Maximize window // Pause so we can see the shift between our two curves type -b We will use the vshift function to shift the first curve to match the second in the region above 10uM.; // Now shift by 3 rows by padding with missing value and replacing the original data range -w rWks = 1; // -w switch gets a worksheet range of plot object vshift ix:=rWks delta:=3 fill:=0/0 ox:=<input>;