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. |
|
|