LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

histogram with just some columns of a table

Solved!
Go to solution

sorry,i forget.i did it now

0 Kudos
Message 11 of 19
(1,361 Views)
bump
0 Kudos
Message 12 of 19
(1,344 Views)

@altenbach wrote:

 

  • You still have not explained what kind of histogram you want from ll the columns. Explain exactly want kind of result you would expect from the default data.
  • ....

^^

0 Kudos
Message 13 of 19
(1,336 Views)

like that one,but the green also has to appear there in E1.....,why i can't see it

i made some change on the vi

5.png

0 Kudos
Message 14 of 19
(1,332 Views)

14.png

0 Kudos
Message 15 of 19
(1,328 Views)
Solution
Accepted by topic author achfire

OK, so you just want a bargraph with two bars per x value. that has nothing to do with a histogram. See my confusion? (A histogram is a statistical tool for data reduction. You are graphing all the raw data)

 

Your code was way too convoluted and inefficient, so here's a quick rewrite. See if it can point you in the right direction. As I said, I don't have your office toolkit, so I added a listbox to select a candidate and graph the result. You can leave that code out). All your file operations belong into the FOR loop in the upper right.

 

 

Notes on your code:

  • You are calculating the averages N times. It is sufficient to do that once in a seperate loop.
  • Why do you need two identical array diagram constants. One is sufficient. Branch the wire.
  • Building an array with one row, transpose it into an array with one column, then indexing out selected columns seems convoluted. Simply leave it as a 1D array and index out elements. same difference!
  • One of your inner loop does absolutely nothing.
  • ...
  • ...
Message 16 of 19
(1,320 Views)

so this code will work with excel,a histogram is a bar graph i think

i'll try it now

0 Kudos
Message 17 of 19
(1,310 Views)

A histogram is a very special kind of bar graph where the Y value is a count and x is an observation range.

You data has nothing to do with a histogram.

0 Kudos
Message 18 of 19
(1,303 Views)

thanks a lot it really works,ur amazing Mr altenbach Smiley Wink

0 Kudos
Message 19 of 19
(1,289 Views)