LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

split array

Solved!
Go to solution

Hi,

 

one question about arrays.

 

In my application I'm reading measurement data from a database in order to analyze them; they are ordered by date, and the user can select the period he wants to analyze.

 

When he selects, a query runs and put the data inside an array. I need to make calculations on the data, and show them on a graph grouped by day. For example, the user has selected a 10 day period, and I need to tell him, FOR EACH DAY, the measurements average and show him the average graph. 

 

What should I do? Split my array into several (but I don't know how many)??

 

Any idea? 

0 Kudos
Message 1 of 6
(3,015 Views)
Solution
Accepted by topic author Stefano Moret
Here is a starting point for you.  I don't know how you handle the time format so in my example the first column is just an integer number.  The second for loop sifts through and averages the values for different days (any time there is a different value in the first column).  It is a bit stream-of-consciousness, so double-check for bugs.
0 Kudos
Message 2 of 6
(3,007 Views)

I gave a look at it.. It seems exacty what I need. Tomorrow I'll try and tell you (it's 3am in China now!).

 

Thanks a lot, man.

0 Kudos
Message 3 of 6
(2,995 Views)

Ok, you had a good idea for the average calculation 🙂 I was thinking about it from yesterday!

 

Where did you find the point by point mean function?

0 Kudos
Message 4 of 6
(2,962 Views)
http://forums.ni.com/ni/board/message?board.id=170&message.id=414625#M414625 try this link to find the pallet a function belongs to?
Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
0 Kudos
Message 5 of 6
(2,952 Views)

Stefano Moret wrote:

 

Where did you find the point by point mean function?


I think the previous post shows you literally how to find it.  The harder question is how did I know that it existed.  The answer to that is mostly from poking around the palletes with a sense that since I had already written a similar VI myself and used it so often that NI must have gotten around to giving us something similar, and as usual they had.

0 Kudos
Message 6 of 6
(2,924 Views)