cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

8-Gravel

Calculating the average successively from an array of numbers

I have an array, and I need to create another array, and calculate the successive average of the numbers as I move along the first array.

For instance, the average of 1st & 2nd, then the average of 1st,2nd, and 3rd, etc. till end of the array

Below some more explanation, including my attempt, but I could not reach what I am looking for. I appreciate your help... Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
24-Ruby IV
(To:Eng_ReyD_497)

Here are my 2 Cents.
I can't read Prime 7 files and was working from the picture you posted.

I tried to provide a solution as close as possible to the attempt you made.

Nonetheless, personally I would prefer a userwritten uitility function with no need for any range variables defines on worksheet level and which is also independent from the setting of ORIGIN:

Prime 6 worksheet attached

9 REPLIES 9
24-Ruby II
(To:Eng_ReyD_497)

Thanks @ValeryOchkov .. attached is the file

24-Ruby II
(To:Eng_ReyD_497)

Thanks @ValeryOchkov, but this still give me an error, when I try it with the file that I sent...

12-Amethyst
(To:Eng_ReyD_497)

Here is my approach using MCP 5.0.  I set ORIGIN to 1 to simplify the division of [running sum]/[running count] = running average.  I tried it inside the program, but the global setting in the Calculation menu seemed to defeat it, so it goes (for now at least) outside the program.  And, as best I can tell, the last step is required to get the complete vector of solutions.  Without it, I get just the last average.  A better programmer might be able to make this better.  At any rate, it's short and it works.

8-Gravel
(To:FredLusk)

Perfect... This works fine with me!!! Thanks @FredLusk ... I appreciate it...

12-Amethyst
(To:Eng_ReyD_497)

Thanks for the compliment.  However, Valery's is a little simpler and fits better on the page.  🙂

24-Ruby IV
(To:Eng_ReyD_497)

Here are my 2 Cents.
I can't read Prime 7 files and was working from the picture you posted.

I tried to provide a solution as close as possible to the attempt you made.

Nonetheless, personally I would prefer a userwritten uitility function with no need for any range variables defines on worksheet level and which is also independent from the setting of ORIGIN:

Prime 6 worksheet attached

8-Gravel
(To:Werner_E)

Thanks @Werner_E for the effort

That is really great!

Announcements
Check out the latest