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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 get row index

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
VanAwful Posted - 08/23/2019 : 10:00:24 PM
OriginPro 2019b (64-bit)
9.6.5.169

Hello, I need to look through 500k rows. I am looking at ColF value. When I get to a row that is not equal to 0 then I need to get the time from ColA in that row. Next, I need to increment through the following rows until the value again is 0. I get the time value from the last row that a value greater than zero. I now calculate the delta between the first time stamp to the last time stamp and store that in a different worksheet. Then I continue on until again the value becomes not equal to 0.

To do this I need to acquire the row index. I am not finding a way to do this. Anyone know how to do this?

Example of my data. I need to calculate the time delta from when the value in ColF is no longer zero to when it is zero again. I need to do this in the F(x)= cell of ColF.

ColA (time)    ColB     ColC    ColD    ColE           ColF
-9.37724E-01	0	0.9	0.8	1.1		0			
-9.37722E-01	0	0.7	0.8	0.9		0			
-9.3772E-01	0	0.9	1.6	0.7		0			
-9.37718E-01	0	0.9	0.8	0.9		0			
-9.37716E-01	0	0.7	0.8	0.9		0			
-9.37714E-01	19.2	0.9	-0.8	0.9		0			
-9.37712E-01	21.6	0.7	0	0.9		1	
-9.3771E-01	22.4	0.7	0.8	0.9		1			
-9.37708E-01	21.6	0.7	0.8	1.1		1			
-9.37706E-01	21.6	0.9	0.8	1.1		1			
-9.37704E-01	21.6	0.7	0	0.9		1		
-9.37702E-01	21.6	0.7	0.8	0.7		1			
-9.377E-01	23.2	0.7	0.8	0.9		1		
-9.37698E-01	22.4	0.7	0.8	0.9		1			
-9.37696E-01	22.4	0.7	0	0.9		1			
-9.37694E-01	22.4	0.9	0.8	0.9		1			
-9.37692E-01	23.2	0.7	1.6	0.7		1			
-9.3769E-01	22.4	0.9	0.8	0.9		1			
-9.37688E-01	22.4	0.7	0.8	0.7		1			
-9.37686E-01	22.4	0.7	0.8	0.9		1			
-9.37684E-01	22.4	0.7	0.8	0.9		1			
-9.37682E-01	23.2	0.7	0.8	0.7		1			
-9.3768E-01	23.2	0.9	0	0.9		1			
-9.37678E-01	22.4	0.9	0.8	0.9		0			
-9.37676E-01	23.2	0.9	0.8	0.9		0			
1   L A T E S T    R E P L I E S    (Newest First)
yuki_wu Posted - 08/26/2019 : 01:56:18 AM
Hi,

You can perform diff function on col(F). If result = -1, it means that the value is from 1 to 0; if result = 1, it means that the value is from 0 to 1.
https://www.originlab.com/doc/LabTalk/ref/Diff-func

Then you can use table function to locate the result value that equals to 1 or -1.
https://www.originlab.com/doc/LabTalk/ref/Table-func

Regards,
Yuki
OriginLab

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000