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
 Xindex on list of date entries

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
JokerOne Posted - 09/14/2016 : 11:58:30 AM
Origin Ver. 9.1 and Service Release 3(Select Help-->About Origin):
Operating System: Win 7

Hello everybody,

I am trying to find the index in a list of date-entries that contains the "largest", i.e. "most current" date.
When I am applying xindex for this task, it fails somehow, see screenshot.
Applying xindex on the corresponding Julian date number works as intended.

Is there a method, that avoids the second col to be created? Thanks

2   L A T E S T    R E P L I E S    (Newest First)
JokerOne Posted - 09/15/2016 : 04:35:25 AM
Just for the protocol:

What seems to be a possible solution for the original task is:

range aaa = col(a);
maxa = max(aaa);
vfind ix:=aaa value:=maxa ox:=targetindex_dataset;
targetindex = targetindex_dataset[1];

So vfind is the solution her.
Care needs to be taken, when using the output variable targetindex_dataset, as this is a dataset type.

When, e.g.
col(a)[targetindex_dataset] is called, this might yield to errors, while
col(a)[targetindex] should work.
JokerOne Posted - 09/15/2016 : 03:12:14 AM
Ok,Ok.

From the docs:

http://www.originlab.de/doc/LabTalk/ref/Xindex-func

vd must be a designated Y dataset.
The Y dataset name must correspond to an actual Y dataset.
The associated X dataset must be sorted in ascending order.

Missed that..., sorry.

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