Hi,
If I do not misunderstand your question, you want to calculate the Min and Max value for 400 columns and save the result to new columns, right?
You can try to use the loop script to calculate each column value.
This sample assumes the datasets are in the Book1. You can copy all the script to “Script Window” (Window: Script Window). Then highlight all the script and press “Enter” button.
//////////////////////////////////////////
newbook Book2; //Create a new book to save the calculation result
col(1)[L]$ = "Min"; //Set column Longname
col(2)[L]$ = "Max"; //Set column Longname
win -a Book1; //Active to Book1 with original datasets
// Following script is a loop script for 400 columns
for(ii=1; ii<=400; ii++)
{
double aa; //Declare a new variable of type double
aa=min(col($(ii))); //get the minimum value from column(ii), and set value to “aa”
[book2]sheet1!Cell(ii,1)=aa; //put “aa” value to Book2, sheet1, Column 1, row (ii)
double bb; //Declare a new variable of type double
bb= max(col($(ii))); //get the maximum value from column(ii), and set value to “bb”
[book2]sheet1!Cell(ii,2)=bb; //put “bb” value to Book2, sheet1, Column 2, row (ii)
}
win -a Book2; //Active to Book2
///////////////////////////////////////////////////////////
Please refer to the Labtalk help pages to know more details about the script.
http://www.originlab.com/doc/LabTalk/guide/Worksheet-Basic-Operation
http://www.originlab.com/doc/LabTalk/guide/Data-Types-and-vars
http://www.originlab.com/doc/LabTalk/ref/Min-func
http://www.originlab.com/doc/LabTalk/ref/Max-func
http://www.originlab.com/doc/LabTalk/ref/Cell-func
Thanks
OriginLab
Jacqueline