annuler
Affichage des résultats de 
Rechercher plutôt 
Vouliez-vous dire : 

HOW TAKE ARNGE

Résolu !
Accéder à la solution

Dear Sir / Madam,

 

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.

Tout télécharger
0 Compliments
Message 1 sur 13
4 435 Visites

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
0 Compliments
Message 2 sur 13
4 422 Visites

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
0 Compliments
Message 3 sur 13
4 419 Visites

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 sur 13
4 411 Visites

@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
0 Compliments
Message 5 sur 13
4 407 Visites

Here ,,

 

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

Tout télécharger
0 Compliments
Message 6 sur 13
4 402 Visites

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
0 Compliments
Message 7 sur 13
4 361 Visites

Dear Sir,

 

Thanks for positive response, please help me a little more,

 

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.

 

 

0 Compliments
Message 8 sur 13
4 331 Visites
Sort array. threshold array in an autoindexed loop. mobile again so no example . anyone?

"Should be" isn't "Is" -Jay
0 Compliments
Message 9 sur 13
4 321 Visites
Solution
Accepté par Julian_prince

Hi Jeff,

 

here you go:

check.png

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 sur 13
4 313 Visites