T O P I C R E V I E W |
centax |
Posted - 02/03/2011 : 2:49:50 PM Hi everybody,
i want to use the Savitzky-Golay-Filter on a worksheet with 1 X axis and 800 y axes. is it possible to smooth all 800 curves at once? and when yes: how? :) thanks a lot
Version: OriginPro 8.50G SR1 OS: Windows 7 |
2 L A T E S T R E P L I E S (Newest First) |
centax |
Posted - 02/09/2011 : 09:43:54 AM thanks a lot! it works :) |
vincenth |
Posted - 02/07/2011 : 12:27:48 PM Hi,
The easiest way is to loop over all the columns using a script:
int numcols = wks.ncols; for (ii=2; ii<=numcols; ii++) { smooth iy:=Sheet1!$(ii) method:=sg npts:=4 polyorder:=2 oy:=Sheet2!<new>; }
Highlight the entire script in the script window and hit enter to run it. The script above assumes you have your input data in Sheet1, with X data in column 1, and n Y data columns to the right. The output data is sent to Sheet2, and will create a new X for each. If you only care about generating new Y columns, the following will work:
int numcols = wks.ncols; for (ii=2; ii<=numcols; ii++) { smooth iy:=Sheet1!$(ii) method:=sg npts:=4 polyorder:=2 oy:=Sheet2!(<autoX>,<new>); }
Regards, Vince |
|
|