T O P I C R E V I E W |
ClemensObergfell |
Posted - 11/10/2014 : 09:47:38 AM Origin Ver. and Service Release (Select Help-->About Origin): 9.0.0 G (32-Bit) SR1 Operating System: Windows 7 Corporate
Dear Origin Support Team,
What would be an easy solution to this task: - I import several ASCII files into the workbook (like columns A to F in the picture) - then I want to open a new column (column G, see in the picture) - in this column there should be the maximum value of each "Kraft" column.
I want to write the labtalk script at the end of the import assistant where I already have the code to plot the data.
I would start with
worksheet -a 1
to open a new column, but then I have no idea to go on...
Thanks in advance for your help.
Greetings, Clemens |
2 L A T E S T R E P L I E S (Newest First) |
ClemensObergfell |
Posted - 11/11/2014 : 06:57:02 AM Thank you so much! It works fine, but only after I deleted the comments out of the script. You helped me a lot. Thanks!
Edit: I have now added integrations of the imported columns and wanted to get the max values of the "Integrated Y1" to "Integrated Y5" columns in the same style as before.
I have this script now but I don't get any values in the new column "Bruchenergie". What could I change to make it work?
wks.addcol(); wcol(wks.ncols)[L]$ = Max Werte; row = 1; loop(ii,1,wks.ncols-1) { str$ = wks.col$(ii).lname$; if(str.Left(5)$==Kraft) { col(Max Werte)[row] = max(wcol(ii)); row++; } } ; integ1 iy:=(Col(2), Col(1)); integ1 iy:=(Col(4), Col(3)); integ1 iy:=(Col(6), Col(5)); integ1 iy:=(Col(8), Col(7)); integ1 iy:=(Col(10), Col(9)); wks.addcol(); wcol(wks.ncols)[L]$ = Bruchenergie; row = 1; loop(ii,1,wks.ncols-1) { str$ = wks.col$(ii).lname$; if(str.Left(5)$==Integrated Y) { col(Bruchenergie)[row] = max(wcol(ii)); row++; } } plotxy iy:=((2,1),(4,3),(6,5),(8,7),(10,9)) plot:=202;
|
greg |
Posted - 11/10/2014 : 11:40:53 AM // Add a column and set its Long Name wks.addcol(); wcol(wks.ncols)[L]$ = Max Werte; // Initial row for output row = 1; // Loop over all columns loop(ii,1,wks.ncols-1) { // Get column Long Name str$ = wks.col$(ii).lname$; // Test if it's a 'Kraft' column if(str.Left(5)$==Kraft) { col(Max Werte)[row] = max(wcol(ii)); row++; } }
|
|
|