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
 Origin Forum
 List Function to find Row Index minus 1

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
goohst8 Posted - 05/13/2015 : 09:23:39 AM
Hi all, I'm a novice with Origin and have what I think is a simple question. I'd like to use the list function to find the row index immediately proceeding the row index that satisfies the equation. So for example:

r2(row2)/60; //this is the value I want

--
range r1 = "Processed Data"!A;
range r2 = "Processed Data"!D;
row = List((r1<0),r1);
row2 = row-1;

I want it to search Column A for the first value below 0 and then use that index to return the value one row above it. This doesn't work as I've written it.

Anyone have a simple solution?

Thanks in advance!

Origin Ver. and Service Release (Select Help-->About Origin):
Operating System: Origin 2015
1   L A T E S T    R E P L I E S    (Newest First)
lkb0221 Posted - 05/13/2015 : 10:51:37 AM
Hi,

List function looks for the exact value.
If your data is monotonic, you can try Index function (or even Countif), otherwise, I think the best way is to loop through the vector, break the loop when first negative detected.


Zheng
OriginLab

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