Click here to Skip to main content
15,886,518 members
Home / Discussions / C#
   

C#

 
QuestionHow to read a Temperature for August and get the total Aveg just for 29 day instead 31 day ? Pin
Abdalla Ben Omran7-May-19 22:47
Abdalla Ben Omran7-May-19 22:47 
AnswerRe: How to read a Temperature for August and get the total Aveg just for 29 day instead 31 day ? Pin
Gerry Schmitz7-May-19 23:09
mveGerry Schmitz7-May-19 23:09 
GeneralRe: How to read a Temperature for August and get the total Aveg just for 29 day instead 31 day ? Pin
Abdalla Ben Omran7-May-19 23:17
Abdalla Ben Omran7-May-19 23:17 
AnswerRe: How to read a Temperature for August and get the total Aveg just for 29 day instead 31 day ? Pin
OriginalGriff7-May-19 23:21
mveOriginalGriff7-May-19 23:21 
GeneralRe: How to read a Temperature for August and get the total Aveg just for 29 day instead 31 day ? Pin
Abdalla Ben Omran8-May-19 0:00
Abdalla Ben Omran8-May-19 0:00 
GeneralRe: How to read a Temperature for August and get the total Aveg just for 29 day instead 31 day ? Pin
OriginalGriff8-May-19 0:05
mveOriginalGriff8-May-19 0:05 
GeneralRe: How to read a Temperature for August and get the total Aveg just for 29 day instead 31 day ? Pin
Abdalla Ben Omran8-May-19 0:15
Abdalla Ben Omran8-May-19 0:15 
GeneralRe: How to read a Temperature for August and get the total Aveg just for 29 day instead 31 day ? Pin
OriginalGriff8-May-19 0:23
mveOriginalGriff8-May-19 0:23 
No, read what I said:
average = sum of samples / number of samples

That's not the same thing. If you have 29 samples, then dividing by 31 will give you the wrong average.
So each time you add a sample to the sum, you count the sample, and divde teh total by teh count, not by a "fixed value".
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!

GeneralMessage Closed Pin
8-May-19 1:38
Abdalla Ben Omran8-May-19 1:38 
GeneralRe: How to read a Temperature for August and get the total Aveg just for 29 day instead 31 day ? Pin
Abdalla Ben Omran8-May-19 1:48
Abdalla Ben Omran8-May-19 1:48 
AnswerRe: How to read a Temperature for August and get the total Aveg just for 29 day instead 31 day ? Pin
Ralf Meier8-May-19 0:26
mveRalf Meier8-May-19 0:26 
GeneralRe: How to read a Temperature for August and get the total Aveg just for 29 day instead 31 day ? Pin
Abdalla Ben Omran8-May-19 1:49
Abdalla Ben Omran8-May-19 1:49 
GeneralRe: How to read a Temperature for August and get the total Aveg just for 29 day instead 31 day ? Pin
Gerry Schmitz8-May-19 6:01
mveGerry Schmitz8-May-19 6:01 
AnswerRe: How to read a Temperature for August and get the total Aveg just for 29 day instead 31 day ? Pin
CPallini7-May-19 23:13
mveCPallini7-May-19 23:13 
QuestionRe: How to read a Temperature for August and get the total Aveg just for 29 day instead 31 day ? Pin
Eddy Vluggen7-May-19 23:35
professionalEddy Vluggen7-May-19 23:35 
AnswerRe: How to read a Temperature for August and get the total Aveg just for 29 day instead 31 day ? Pin
Abdalla Ben Omran7-May-19 23:53
Abdalla Ben Omran7-May-19 23:53 
GeneralRe: How to read a Temperature for August and get the total Aveg just for 29 day instead 31 day ? Pin
Eddy Vluggen8-May-19 0:03
professionalEddy Vluggen8-May-19 0:03 
AnswerRe: How to read a Temperature for August and get the total Aveg just for 29 day instead 31 day ? Pin
#realJSOP8-May-19 22:28
mve#realJSOP8-May-19 22:28 
GeneralRe: How to read a Temperature for August and get the total Aveg just for 29 day instead 31 day ? Pin
Richard MacCutchan8-May-19 22:55
mveRichard MacCutchan8-May-19 22:55 
GeneralRe: How to read a Temperature for August and get the total Aveg just for 29 day instead 31 day ? Pin
OriginalGriff9-May-19 0:18
mveOriginalGriff9-May-19 0:18 
GeneralRe: How to read a Temperature for August and get the total Aveg just for 29 day instead 31 day ? Pin
#realJSOP9-May-19 0:29
mve#realJSOP9-May-19 0:29 
GeneralRe: How to read a Temperature for August and get the total Aveg just for 29 day instead 31 day ? Pin
#realJSOP9-May-19 0:28
mve#realJSOP9-May-19 0:28 
QuestionRe: How to read a Temperature for August and get the total Aveg just for 29 day instead 31 day ? Pin
Eddy Vluggen9-May-19 0:48
professionalEddy Vluggen9-May-19 0:48 
SuggestionRe: How to read a Temperature for August and get the total Aveg just for 29 day instead 31 day ? Pin
Richard Deeming9-May-19 0:51
mveRichard Deeming9-May-19 0:51 
GeneralRe: How to read a Temperature for August and get the total Aveg just for 29 day instead 31 day ? Pin
#realJSOP9-May-19 1:30
mve#realJSOP9-May-19 1:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.