LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Searching 1D array for Data in between < and >=

As the tilte of this question suggest, I have a 1 D array that hase mixed values and I want to be able to search the array for values and create tables/arrays from the values in a given range.

e.g. the array has data between -11.003 and -23.003
and I want to be able to search this array for data in different ranges e.g. value>=-7.004 and value>-7.008 etc, does nayone know how to do this. I have got stuck on the part after I sort out the array...
Edge!
0 Kudos
Message 1 of 9
(3,354 Views)
Hi Edge,
you should use In The Range and Coerce function inside an un-initialized for loop and build array with only values in the range. Here's an example.
Alberto
0 Kudos
Message 2 of 9
(3,354 Views)
I considered the above idea before but the thing is that I have like 36different ranges and each range has its own table of results and I have got 50results altogether. the ranges start from e.g. 1.003 upto 9.003 and they increment each time by .4 and this is done 36times, I have an array of 50 results from the databse and these results are from 1.000 to 11.000.
Now what I am doing or suppose to do is plot a graph in excel using active X for each range e.g. there are maybe 5units that have TX results in the range 2.004 to 2.008, 13units with results in the range 2.008 to 2.012 etc.

The active X part is ok, its just separating the results from the database with the different ranges.
Edge!
0 Kudos
Message 3 of 9
(3,354 Views)
Hi again,
see this, the ranges are set by arrays.
The values in the range are in a 2D array, each line correponds to each range set.
Does it help?
Alberto
0 Kudos
Message 4 of 9
(3,354 Views)
Great help, thanks, thats s great place for me to start, I see the logic, thanks alot but am sure I will be back again...lol
Edge!
0 Kudos
Message 5 of 9
(3,354 Views)
Edge;

I thought about what you are asking for and I think the following VI will do it. It allows you to search a 1D array by applying some rules. LabVIEW 6.

I am thinking in posting this VI at my website too at www.jyestudio.com. The best will be to have a polymorphic version of it (this one only accept DBL numeric values.) I don't know, I think your problem provided a neat idea... 🙂

Regards;
Enrique
www.vartortech.com
0 Kudos
Message 6 of 9
(3,354 Views)
"Edge" wrote in message
news:50650000000500000057D50000-1042324653000@exchange.ni.com...
> I considered the above idea before but the thing is that I have like
> 36different ranges and each range has its own table of results and I
> have got 50results altogether. the ranges start from e.g. 1.003 upto
> 9.003 and they increment each time by .4 and this is done 36times, I
> have an array of 50 results from the databse and these results are
> from 1.000 to 11.000.
> Now what I am doing or suppose to do is plot a graph in excel using
> active X for each range e.g. there are maybe 5units that have TX
> results in the range 2.004 to 2.008, 13units with results in the range
> 2.008 to 2.012 etc.
>
> The active X part is ok, its just separating
the results from the
> database with the different ranges.
> Edge!

What above idea? I can't see the message you responded to.
0 Kudos
Message 7 of 9
(3,354 Views)
I was refering to the example vi alberto provided.
0 Kudos
Message 8 of 9
(3,354 Views)
Enrique,
I havent had the chance to look at your above example yet but here is what I have been doing and what I aim to do. You can see how far I have gone!!!(not very far)
Download All
0 Kudos
Message 9 of 9
(3,354 Views)