ā07-28-2009 01:13 AM
So I want to extract a subset from an array of data.
I have two columns of data that I need to do with, these are potential energy (expressed in terms of kT) and relative separation. The data typically results in a parabola-type shape with the potential energy on the y-axis and the separation on the x-axis. The potential energy starts at high kT's at small separation and then decreases to zero as the separation increases and then it starts to increase again once it is past zero kT. The issue I have is that I need to disregard any data that is greater than 6 kT. Thus I need to extract the data (both the potential energy data and the corresponding separation data) from the array that is 6kT or below. So the problem I am having is trying to work out how to approach the extraction of this data. I would love to get some suggestion as to how I should approach it.
I initially thought of using a mathscript node to do this, but I am not sure of how I should code this, if this is indeed possible.
Another option I considered was to use one of the array vi's to perform this extraction as I thought I could use them to find the element where the kT is higher than 6 and the corresponding index element which I could then use to extract the relevant portions of the array. But I don't see an easy way to achieve this.
So the vi I will write for this will function will actually be a subvi of another vi I have written (this vi is named ānon-linear fit to PE data mod.vi' and it also has a couple of other subvis). I have attached this vi and a relevant data file (as an example of the data I will be getting and needing to analyse) in a zip file. I haven't included an example of the subvi I need to write because I looking to find some pointers as to how I could do this first. In the ānon-linear fit to PE data mod.vi' I have included a text box in the location I will be putting this subvi.
Any help in helping me out here would be appreciated.
Thanks
Solved! Go to Solution.
ā07-28-2009 01:34 AM
ā07-28-2009 01:37 AM
Yes that is my intention. I will give this ago. I didn't even think to use a shift register here.
Thanks
ā07-28-2009 01:40 AM
Is your problem solved? If so please mark the post (Whichever you think is the best solution for your query). This will help others facing same problem and looking for a solution.
ā07-28-2009 01:47 AM
ā07-28-2009 03:51 AM - edited ā07-28-2009 03:53 AM
ā07-28-2009 03:54 AM
ā07-28-2009 04:09 AM
ā07-28-2009 04:15 AM
ā07-28-2009 11:01 AM
Below is a picture of two different ways to do this. Both of them give you the data less than the max, rather than giving you the indices of the data that is greater than the max. I'm not sure if this is what you were looking for or not though.