ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

histogram from spreadsheet

Hi, I'm using LabView Express not very frequently - but it sometimes comes handy to use it as a tool for data analysis. I went through the code samples but could not find anything close to what I need: I want to plot a histogram of integer values stored in a spreadsheet file. Data is organized in 3 blank-separated columns and the values of interest are located in the 3rd column:
12221 223 49
17737 342 46
32332 443 38
...

I would appreciate if anyone could point me in the right direction.

Thanks, Martin

0 Kudos
Message 1 of 13
(5,350 Views)
There should be a few examples listed in the NI Example Finder select the search tab then search for histogram.
 
Have a look at them and post back if you still can't work out what to to. Include your data file and any vi attempts to far.
 
cheers
 
David
Message 2 of 13
(5,348 Views)
Do you have the spc toolkit?? It has some histogram charts in it.
0 Kudos
Message 3 of 13
(5,335 Views)

Use the Create Histogram Express VI in Mathematics -> Probability and Statistics.  Not a big fan of the express VI but this one works very nice!

Matt

 

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 4 of 13
(5,324 Views)
Hi David,
Thanks for your help! Got the big picture from the examples I found but got stuck at the beginning: I used the Read from Spreadsheet vi but can not extract the column I want. My last attempt is attached as well as a file with sample data. Just need an extra push to extract the last column into an array, I guess from there I can manage creating the histogram.

Thanks for any hints!
Martin
Download All
0 Kudos
Message 5 of 13
(5,311 Views)
No, unfortunately I don't.
0 Kudos
Message 6 of 13
(5,308 Views)
The delimiter must be s simple space character [ ], not the sequence of three characters [" "]. These three characters never occur in your data file! 🙂
Message 7 of 13
(5,303 Views)
If your data for the histogram is integer and has a limited range, I prefer a simple binning operation where you basically count the occurences of each value.
 
The histogram VIs are more useful to analyze floating point numbers or values that cover a huge range where it makes sense to pool ranges of numbers into bins.
 
Attached is a simple modification of your VI that finds the frequency of each occurence of the values in the third column. Seems to work just fine. (LabVIEW 7.0). 😄
 

Message Edited by altenbach on 04-08-2006 09:48 AM

Download All
Message 8 of 13
(5,298 Views)
That's exactly what I was looking for! Now I can add some stat functions and I'm all set. Thank you very much for your help - you made my day!
0 Kudos
Message 9 of 13
(5,286 Views)

Since I am trying to work out how to extract one column from a spreadsheet I thought I would use this thread rather than starting a new one - although I think I will have a .

 

One part of my programming in labview at the moment is to write a data acquisition set up (which I have talked about in another thread).  In my data acquisition the plan is to collect 100000 data points with a time spicing of 5 milliseconds.  So with my DAQ vi the plan is toto getdata that has header info and then two columns of data, one column will have the time information (at the moment I want to keep the time information there for future reference in the raw data) and the second column will have the count dat.  The count data is what I want to use in my histogram (I think I will probably need to ask some histogram vi related questions at another time), but I can't seem to work out exactly how to do this.  I use an array subset to remove the header data and then I have used delete from array (although I also tried to use the arrary subset again) to try and remove the time data, but it doesn't work.

 

So basically want I want to get is just the count data point by themselves which I can then put into the histogram vi.

 

Any help in working this out would be appreaciated.

 

I have attached the vi I have put together (you can ignore the histgram parts for the moment as entirely worked out what is happening with that) - this vi is called histogram binning.avi

I have also attached the data file I am testing this on (the count data is currently sourced from  one of the random number generators) - this file is called uniform random with xmin - 1 and xmax - 4000 with header info.txt

 

I am using LV 8.6.1

0 Kudos
Message 10 of 13
(4,525 Views)