T O P I C R E V I E W |
AOjuva |
Posted - 04/27/2022 : 01:20:04 AM Origin Ver. and Service Release (Select Help-->About Origin): 2022 SR1 Operating System: Win 11
Hi, I have multiple Y columns with varying lenghts (separated series from a long measurement). Usually I have to manually check the values and mask some of the points at the end, where the measurement value is erraneous (e.g. sensor in air between samples), and then I choose the last ~20 points, average them and get a single data point from that sample.
The masking will have to be done by hand, but is there an easy way to select the last ~20 points using cell formula? I can also delete the erraneous points instead of masking them, if it is needed. |
4 L A T E S T R E P L I E S (Newest First) |
AOjuva |
Posted - 04/27/2022 : 04:53:04 AM Thanks, that works when I delete the obsolete data at the end first. :)
|
AmandaLu |
Posted - 04/27/2022 : 04:45:14 AM Hi,
If you want to keep last 20 rows, please try:
doc -e DY{ range rcol = %c; int nn = rcol.nrows; range rr = rcol[1:$(nn-20)]; del rr; }
Thanks, Amanda OriginLab Technical Service
|
AOjuva |
Posted - 04/27/2022 : 02:39:04 AM Hi,
Sorry for being unclear. I need those last 20 cells, after I have masked the tail, for my analysis. See an example attached. :)
 |
AmandaLu |
Posted - 04/27/2022 : 02:31:49 AM Hi,
Please run following script in the Command Window:
doc -e DY{ range rcol = %c; int nn = rcol.nrows; range rr = rcol[$(nn-19):$(nn)]; del rr; }
This will delete the last 20 rows for each Y column in the current worksheet.
Thanks, Amanda OriginLab Technical Service
|
|
|