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
 X-function: vfind

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
bo_liubo Posted - 05/21/2015 : 07:28:25 AM
Origin Ver. and Service Release (Select Help-->About Origin): 8.6
Operating System: win7
Hi,
I am in trouble with the use of vfind x-function,which seems does not work in my dataset. I want to find the maximum value of the second column below. My command is: vfind ix:=col(2) value:=max(col(2)) ox:=col(3);. But I failed to find out the maximum. The new column named "Indices of Found Values" is blank. what's wrong?

-10.0087 -3.29612E-5
-9.9165 -3.11433E-5
-9.8299 -2.95041E-5
-9.6969 -3.21267E-5
-9.599 -3.33561E-5
-9.4986 -3.21863E-5
-9.364 -3.11358E-5
-9.2625 -2.92806E-5
-9.1255 -3.03535E-5
-9.0254 -3.09644E-5
-8.9296 -3.01151E-5
-8.8286 -3.46227E-5
-8.7003 -3.15456E-5
-8.5969 -3.18883E-5
-8.5032 -3.16052E-5
-8.374 -3.30879E-5
-8.2667 -3.14264E-5
6   L A T E S T    R E P L I E S    (Newest First)
lkb0221 Posted - 05/22/2015 : 10:22:33 AM
Hi, Bo

I tried in 8.6SR3, but cannot reproduce this issue.
If you are just looking for the peak position, you can try list function as workaround.

Zheng
OriginLab
Castiel Posted - 05/22/2015 : 10:06:08 AM
quote:
Originally posted by bo_liubo

I made the column property the same settings as yours. But It did not work. Did you try my data to check if the command can act on the dataset I provided?



Tried in Origin 2015, again. It does work. You may try to debug.
1. Run this LabTalk script in Script Window: vfind -e. This will open the X-Function Builder.
2. Click the 4th button in the toolbar, which open the Coder Builder
3. Set a breakpoint inside void vfind()
4. Run the LabTalk script in Script Window:
vfind ix:=col(2) value:=max(col(2)) ox:=col(3)
5. Step over, line by line till the end, in the Code Builder, and see what's ix, value, ox, and tol in the Variables window.

You may also check the properties of col(3). Now show your screenshot.





©c¡Ï   ¤È¥¹  ©f¨u©c  ©c¥ì    ¥Î¤³  ©c/     ©¦£¯
 ©c¨Ê¥Î ¤´¥¨  ¥ó ¨×   ¥ó¤á' ¥Ì©¦¥­   /¤í  ¥Õ©¦©f
   ¨Ö             ¦á          ©¦£þ  ©` ¥Õ   ©¦
                              ©¦
bo_liubo Posted - 05/22/2015 : 07:25:59 AM
I made the column property the same settings as yours. But It did not work. Did you try my data to check if the command can act on the dataset I provided?
Shirley_GZ Posted - 05/22/2015 : 04:28:27 AM
Hi,

Would you please check if the second column has been set to Text(align left)? If so, please set it to Numeric in the Column Properties dialog which can be opened by right-clicking to select Properties from the context menu.



Shirley


Originlab Technical Service Team
bo_liubo Posted - 05/22/2015 : 01:12:39 AM
I tried your method but I still can not find out the specific data. I used the command "vfind ix:=col(2) value:=max(col(2)) ox:=col(3);" in originlab 2015 and it woks for some simple dataset, such as: 1,2,3,4,...10. I can get the specific value. However, it got a blank column named "Indices of Found Values" for the following dataset:
-7.2898 -3.04278E-5
-7.1427 -3.23054E-5
-6.9564 -3.22458E-5
-6.7626 -3.07557E-5
-6.5724 -3.02192E-5
-6.4067 -3.00702E-5
-6.2308 -3.11133E-5
-6.0646 -3.03384E-5
-5.8755 -3.18285E-5
-5.6823 -3.14709E-5
-5.4924 -2.99212E-5
-5.3372 -3.07259E-5
-5.1374 -3.16497E-5
-4.9736 -3.23948E-5
-4.7755 -3.09345E-5
-4.584 -2.90867E-5
Castiel Posted - 05/21/2015 : 08:35:31 AM
Your script is ok in Origin 2015. Maybe in Origin 8.6 it should be value:=$(max(col(2)))?

©c¡Ï   ¤È¥¹  ©f¨u©c  ©c¥ì    ¥Î¤³  ©c/     ©¦£¯
 ©c¨Ê¥Î ¤´¥¨  ¥ó ¨×   ¥ó¤á' ¥Ì©¦¥­   /¤í  ¥Õ©¦©f
   ¨Ö             ¦á          ©¦£þ  ©` ¥Õ   ©¦
                              ©¦

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