SetDataRange (macro)

Sets the X value for the first data point and the X increment for the dataset dataset.

 

Definition:

Def  SetDataRange {
      set %1 -f fitX1;
      set %1 -i [(fitX2-fitX1)/(fitnpts-1)]
};

Example:

The following script creates a dataset named MyData1_B, fills it with data values starting at 10 and incrementing by 10 up to 1000, sets the X value for the first data point and the X increment for the dataset MyData1_B, and then displays the dataset in its worksheet.

Mydata1_B = data(10,1000,10);
fitX1 = 10;
fitX2 = 1000;
fitnpts = 100;
SetDataRange MyData1_B;
edit MyData1_B;