The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Batch processing
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

steve196

Antarctica
2 Posts

Posted - 01/26/2004 :  11:52:51 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I have Origin files with several dozen worksheets each.
For each of the worksheets I want to do following:
* divide the values of the A(X) column by 17.3
* remove the B(Y) column
* make a graph
* rename the graph to something, that has the name of the worksheet in it
* average the curves of the graph
* rename the average table to something, that has the name of the worksheet in it
* make an extra graph of the average table
Is there a way, to do this for all worksheets simultaneously, or in a batch mode, so I dont have to do it for each sheet seperately?
Thanks!

Mike Buess

USA
3037 Posts

Posted - 01/26/2004 :  6:16:09 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You don't say which version of Origin you're using so I won't bother with an Origin C solution. The following LabTalk script will loop through all worksheets in the project and do what you want to each. With one modification... instead of creating a new worksheet for the average I just add a column to the old worksheet.
doc -e W {
col(A)/=17.3; // normalize col A
del col(B); // delete col B
%W=%H; // remember wks name
wo -s 2 0 wks.ncols 0; // select cols 2 through last
wo -p 200; // create line plot (see worksheet command for other plot types);
win -r %H %WG; // rename plot by appending G to wks name
win -a %W; // activate worksheet
wo -c Average; // append a col named Average
col(Average)=wcol(2); // set col to col(2)
loop (i,3,wks.ncols-1) {
col(Average)+=wcol(i); // add all other Y columns to Average
};
col(Average)/=(wks.ncols-2); // divide by # of Y columns
wo -s wks.ncols 0 wks.ncols 0; // select last col (Average)
wo -p 200; // create line plot
win -r %H %WaveG; // rename plot
};


Mike Buess
Origin WebRing Member
Go to Top of Page

steve196

Antarctica
2 Posts

Posted - 01/28/2004 :  09:34:47 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Tried your script, and it works perfectly.
Thank you very much! You saved quite some hours of my time.
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000