# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## HOW TAKE ARNGE

Dear sir I want to take a range from 1-D data file. Like file having value 0-90, I want to take values which have 0-10, 11-20, 21-30, 31-40, 41-50, 51,60, 61-70,  71-80, and 81-90,  Here I have attached file  image file of results.

Message 1 of 13
(3,373 Views)

## Re: HOW TAKE ARNGE

Ok, what have you tried?  Sounds to me that you will need a simple FOR loop with a shift register for each bucket.  Use a case structure to add to the proper array when in a certain range (the case structure does take numerics).

There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 13
(3,360 Views)

## Re: HOW TAKE ARNGE

Or, a simply use the histogram.vi on the signal analisys palatte.  (Sorry no example I'm ugrading to dev suite 2012 this afternoon)  Crossrulz can you carry that one for me?

"Should be" isn't "Is" -Jay
Message 3 of 13
(3,357 Views)

## Re: HOW TAKE ARNGE

I don't see how a histogram is going to give him what he wants.  The histogram VIs only give the counts of each bin, not the values that went into a bin.  Or am I missing something?

There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 13
(3,349 Views)

## Re: HOW TAKE ARNGE

@crossrulz wrote:

I don't see how a histogram is going to give him what he wants.  The histogram VIs only give the counts of each bin, not the values that went into a bin.  Or am I missing something?

Just thinking a step ahead.  Why else bin the values?

"Should be" isn't "Is" -Jay
Message 5 of 13
(3,345 Views)

## Re: HOW TAKE ARNGE

Here ,,

I have attached a program and file, is it correct?

Message 6 of 13
(3,340 Views)

## Re: HOW TAKE ARNGE

That looks like it should work.

But to save you a little on the read side, you can right-click on the Read Text File and tell it to read lines.  Then wire -1 to the count in order to read all of the lines.  You can then use a Fractional String to Number converter on the read array to get your 1D array of numbers.

There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 7 of 13
(3,299 Views)

## Re: HOW TAKE ARNGE

Dear Sir,

This program is working fine fine for less range, but for larger ones, like 0-10, 10-20,20-30,,,,,,,,,,,. 350-360, this program makes lost in confusion please suggest me another way to take range form 1-d array file.

Thanks & Regards

Prince.

Message 8 of 13
(3,269 Views)

## Re: HOW TAKE ARNGE

Sort array. threshold array in an autoindexed loop. mobile again so no example . anyone?

"Should be" isn't "Is" -Jay
Message 9 of 13
(3,259 Views)
Solution
Accepted by topic author Julian_prince

## Re: HOW TAKE ARNGE

Hi Jeff,

here you go:

I create an array of cluster of array to store 1D arrays of different length in an (kind of root) array...

Best regards,
GerdW

using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 10 of 13
(3,251 Views)