Author |
Topic |
|
davidandersoniii
5 Posts |
Posted - 06/28/2012 : 3:06:28 PM
|
Origin Ver. and Service Release (Select Help-->About Origin): Origin 8.6 Operating System: Windows 7
How can I differentiate multiple Y columns? I am not good at executing labtalk scripts, so an example script to put into the command line would be very helpful.
Thanks in advance. |
|
Hideo Fujii
USA
1582 Posts |
Posted - 06/28/2012 : 3:18:04 PM
|
Hi davidandersoniii,
As you are using Origin 8.6, you can use the "Repeat This Analysis" method discussed at: http://www.originlab.com/forum/topic.asp?TOPIC_ID=10768
Although above page is regarding the Smoothing, differentiation is the same thing.
Does it work as you like?
--Hideo Fujii OriginLab |
Edited by - Hideo Fujii on 06/28/2012 3:18:19 PM |
|
|
davidandersoniii
5 Posts |
Posted - 06/28/2012 : 4:52:12 PM
|
Sorry, It's actually 8.0724. I tried what you recommended, but when I left click that column, nothing happens. The repeat analysis option is not available.
quote: Originally posted by Hideo Fujii
Hi davidandersoniii,
As you are using Origin 8.6, you can use the "Repeat This Analysis" method discussed at: http://www.originlab.com/forum/topic.asp?TOPIC_ID=10768
Although above page is regarding the Smoothing, differentiation is the same thing.
Does it work as you like?
--Hideo Fujii OriginLab
|
|
|
Hideo Fujii
USA
1582 Posts |
Posted - 06/29/2012 : 1:12:56 PM
|
Hi davidandersoniii,
Here is a sample script, which can take care both designation patterns of XYYYY.. and XYXYXY...
nc=wks.ncols;
inc=1; //Default pattern XYYY..
if(nc>=3) {if(wks.col3.type==4) inc=2;} //Detect XYXY...
for(ii=2; ii<=nc; ii=ii+inc) {
//smooth iy:=wcol(ii) method:=aav npts:=4; //Smoothing
differentiate iy:=wcol(ii) order:=1; //Differentiate
}
Tip: Here "differentiate" is the name of x-function for differentiation. ("smooth" is for smoothing.) I don't remember the names of all x-functions, but it is easy to get - when you press the small triangle button at the upper right corner of analysis tool, choose "Generate Script" flyout, then you get the corresponding script (x-function) command based on the options you chose in the dialog box in the Script window. (Please see the screenshot. Here "-r 2" is a general option to set the recalculation mode, 1=Auto, 2=Manual, 0=None). Once you get the command name, you can learn the detail options from "Help: X-Functions" menu.
Hope this is helpful.
--Hideo Fujii Originlab |
Edited by - Hideo Fujii on 06/29/2012 1:13:54 PM |
|
|
davidandersoniii
5 Posts |
Posted - 06/29/2012 : 2:51:02 PM
|
Thank you very much.
quote: Originally posted by Hideo Fujii
Hi davidandersoniii,
Here is a sample script, which can take care both designation patterns of XYYYY.. and XYXYXY...
nc=wks.ncols;
inc=1; //Default pattern XYYY..
if(nc>=3) {if(wks.col3.type==4) inc=2;} //Detect XYXY...
for(ii=2; ii<=nc; ii=ii+inc) {
//smooth iy:=wcol(ii) method:=aav npts:=4; //Smoothing
differentiate iy:=wcol(ii) order:=1; //Differentiate
}
Tip: Here "differentiate" is the name of x-function for differentiation. ("smooth" is for smoothing.) I don't remember the names of all x-functions, but it is easy to get - when you press the small triangle button at the upper right corner of analysis tool, choose "Generate Script" flyout, then you get the corresponding script (x-function) command based on the options you chose in the dialog box in the Script window. (Please see the screenshot. Here "-r 2" is a general option to set the recalculation mode, 1=Auto, 2=Manual, 0=None). Once you get the command name, you can learn the detail options from "Help: X-Functions" menu.
Hope this is helpful.
--Hideo Fujii Originlab
|
|
|
|
Topic |
|
|
|