Visual Basic Get Average Change of Variable

40 pts.
Tags:
Visual Basic
Visual Basic commands
So I have a variable that is being added to every minute and id like to know how I can get the average its being added to per minute. I know how to do the math but I cant figure out the code for it. Please anyone? Id like the actual code for it I know that's asking a lot but I just haven't been able to figure it out.

Software/Hardware used:
Visual Basic (VB.NET)

Answer Wiki

Thanks. We'll let you know when a new response is added.

Ohh sorry.  I didint know what the Check mark did.   By the way instead of aa = 0 it should be aa = -1.

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    Just subtract the initial value from the final value and divide by the number of minutes -- (final - initial)/minutes -- but it's hard to be specific without seeing your definitions. -- Tom
    125,585 pointsBadges:
    report
  • sherlockturtle
    This is ever x ammount of seconds to gather data.  OA is the variable thats going up.  AA starts of = 0. AB is the final number.  But it doesnt seem to work. aa += 1 If (aa = 0) Then ab = oa End If If (aa = 5) Then Label7.Text = (oa - ab) / aa aa = 0 End If
    40 pointsBadges:
    report
  • TomLiotta
    The code is not sufficient. Clearly, aa has (1) added to it, but it's not clear how it ever gets a value greater than (1). Is there a loop or an event that invokes this code? How is the time duration determined? Is this code called once every minute? I see that (ab = oa) when (aa = 0), but I don't see any way for aa ever to have the value (0). Enough code must be shown so that the structure is visible. -- Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following