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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Calculating the average successively from an array of numbers

Eng_ReyD_497
10-Marble

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

Eng_ReyD_497_1-1620405215427.png

 

 

ACCEPTED SOLUTION

Accepted Solutions

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.

Werner_E_0-1620438989023.png

 

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:

Werner_E_1-1620439416312.png

 

Prime 6 worksheet attached

 

View solution in original post

9 REPLIES 9

Send please the sheet.

Thanks @ValeryOchkov .. attached is the file 

kip.png

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

FredLusk
14-Alexandrite
(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.

 

Running Average Through a Vector_001.jpg

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

FredLusk
14-Alexandrite
(To:Eng_ReyD_497)

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

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.

Werner_E_0-1620438989023.png

 

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:

Werner_E_1-1620439416312.png

 

Prime 6 worksheet attached

 

Thanks @Werner_E for the effort

That is really great!

Announcements

Top Tags