luisbgomez Posted January 28, 2006 Report Share Posted January 28, 2006 Hi everyone! This one should be easy, but I can Quote Link to comment
WMassey Posted January 28, 2006 Report Share Posted January 28, 2006 Just a quick observation based on the example you posted: You are not averaging the values. You are summing the values. I assume, based on your example, that summing is what you want? Here is a VI (lv 7.0) that will produce the output array you show for the input array you gave. Download File:post-2800-1138456176.vi Quote Link to comment
luisbgomez Posted January 28, 2006 Author Report Share Posted January 28, 2006 Hi everyone!This one should be easy, but I can Quote Link to comment
WMassey Posted January 29, 2006 Report Share Posted January 29, 2006 Hi, and thanks for the solution :worship: . You are right, I placed the sum, this was a mistake. Thanks again. Figuring the average is a bit more tricky but the VI attached seems to do it. Download File:post-2800-1138497982.vi Quote Link to comment
luisbgomez Posted January 29, 2006 Author Report Share Posted January 29, 2006 Figuring the average is a bit more tricky but the VI attached seems to do it. :thumbup: Thanks WMassey for coming to my resque again. After seeing your first solution I struggel with the average part for a while and went to bed with out getting it. It is nice to come back to work to find your gift. Quote Link to comment
WMassey Posted January 29, 2006 Report Share Posted January 29, 2006 :thumbup: Thanks WMassey for coming to my resque again. After seeing your first solution I struggel with the average part for a while and went to bed with out getting it. It is nice to come back to work to find your gift. You are welcome. A bit of struggling is good. It's how we learn. I should point out to anyone who might try to take these example VIs out of context, one of the starting conditions of the incoming array specified in the original post was "The data in the X column is sorted in ascending order". While the example VIs don't care if the X data is ascending or descending, the input X data must be sorted so that all identical values of X are grouped together. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.