LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I would like to know how i can create a bell graph with out using sub VIs, the data that i created consists in 500 readings with values of 0 to 100, i calculated the mean value and standard diviation. I hope some one can help me

I would like to know how i can create a bell graph with out using sub VIs, the data that i created consists in 500 readings with values of 0 to 100, i calculated the mean value and standard diviation. I hope some one can help me
0 Kudos
Message 1 of 8
(3,970 Views)
Hi,
 
   The classic way to do this is to create a series of data bins, each of which coreesponds to one of your possible values.  After a period of time, you simply count the contents of each bin.  Once you have that, it's a simple matter to put the bins vs size in an XY graph.  I would probably use the event structure as a bin counter.  I'll have to work on this a bit....you've given me something to ponder over the weekend!
 
Anyway...this is the approach you'll want to take.
 
eric
0 Kudos
Message 2 of 8
(3,966 Views)
To make this more "palatable" you might want to widen each bin to accommodate a RANGE of values, such as 1-10, 11-20, 21-30, etc, to keep the vi a manageable size
At least by using "wide" bins you can test the program simply.  Of course your data may not allow for this shortcut. 
 
Stay tuned....this is an interesting problem!
 
eric
0 Kudos
Message 3 of 8
(3,961 Views)
I am sort of curious though, as to why you don't want to use subvi\'s?  The statistical tools in Labview are great, and I think the Histogram vi would be all you'd need.
 
Just wondrin'
 
eric
0 Kudos
Message 4 of 8
(3,960 Views)

For limited-range data, it isn't hard to do your own histogram binning.  For example:

1. Initialize a 0-valued array of size 101 (indices 0-100) and send it into a For Loop's shift register.

2. Auto-index the For Loop with your array of 500 readings.

3. Each loop iteration, use the reading value 0-100 as an array index.

4. Increment the value at that index and stuff the new value back in using "Replace Array Subset."  Pass this into the right-side shift register.

5. When the loop completes, your counts have been binned in the shift register array.  Array(i) = (# readings equal to i).  Plot it. 

6. Adjust as needed.  Here you're spreading 500 samples over 101 bins.  That may be a bit too coarse.  Maybe you should make an array with indices from 0-25 which bins the result of (reading value / 4).  You get the idea, right?

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 5 of 8
(3,947 Views)
Thank you Kevin, I am going to try this solution, but Can you be more specific because, I don't have to much experience with labview.
0 Kudos
Message 6 of 8
(3,943 Views)
Thank you Eric, the reason that I don't use a sub VI, it is because I want to explore the basics of programing to understand how it works, in stead of just used.
0 Kudos
Message 7 of 8
(3,940 Views)

Here's a quick example I threw together that generates a sort-of-bell-curve shaped data distribution, then performs the binning and plotting.

-Kevin P.

Message Edited by Kevin Price on 12-01-2006 02:42 PM

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Download All
0 Kudos
Message 8 of 8
(3,927 Views)