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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 List Function to find Row Index minus 1
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

goohst8

USA
1 Posts

Posted - 05/13/2015 :  09:23:39 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

lkb0221

China
497 Posts

Posted - 05/13/2015 :  10:51:37 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

Edited by - lkb0221 on 05/13/2015 10:52:53 AM
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000