Click here to Skip to main content
15,912,021 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionWeird Problem - with New Instance Pin
Paramu197328-Oct-09 22:51
Paramu197328-Oct-09 22:51 
AnswerRe: Weird Problem - with New Instance Pin
Christian Graus28-Oct-09 23:44
protectorChristian Graus28-Oct-09 23:44 
GeneralRe: Weird Problem - with New Instance Pin
EliottA29-Oct-09 3:23
EliottA29-Oct-09 3:23 
GeneralRe: Weird Problem - with New Instance Pin
Luc Pattyn29-Oct-09 4:03
sitebuilderLuc Pattyn29-Oct-09 4:03 
GeneralRe: Weird Problem - with New Instance Pin
DaveAuld29-Oct-09 5:21
professionalDaveAuld29-Oct-09 5:21 
GeneralRe: Weird Problem - with New Instance Pin
EliottA29-Oct-09 5:35
EliottA29-Oct-09 5:35 
GeneralRe: Weird Problem - with New Instance Pin
0x3c029-Oct-09 8:29
0x3c029-Oct-09 8:29 
QuestionARRAY Standard Deviation vb.net Pin
PAguilar0928-Oct-09 8:39
PAguilar0928-Oct-09 8:39 
I am trying to get the standard deviation of values that a user enters into a textbox and then will hit a display button, the following is what i have coded so far but For some reason i am getting the wrong answers for stdeviation and the sum of deviations PLEASE HELP

Dim iSum as integer = 0
Dim dFAvg as double = 0
Dim dDev as double = 0
dim dSqDev as double = 0


For count = 0 To strArr.Length - 1
'add user entered values to list box
lstGrades.Items.Add(strArr(count))
lblGrades.Text = lstGrades.Items.Count
iSum += Convert.ToDouble(strArr(count)) 'get sum of values entered and pass to storing variable
lblSum.Text = iSum 'display sum in label box
'***********************
dFAvg = iSum / Convert.ToDouble(lblGrades.Text) 'calculate average
'***********************

'THIS IS WHAT IS NOT CALCULATING CORRECTLY!!!!!!
dDev = ((strArr(count) - dFAvg) ^ 2)
'for each value the user enters it is supposed to be subtracted by the MEAN(dFAvg) and then raised by 2
'then i store each answer into dDev VARIABLE and then find the sum of all the values in dDev and assign it to dSqDev
'but i dont understand what i am doing wrong PLEASE HELP
dSqDev += dDev

Next 'end for

lblSumDev.Text = FormatNumber(dSqDev, 2)
AnswerRe: ARRAY Standard Deviation vb.net Pin
Henry Minute28-Oct-09 10:00
Henry Minute28-Oct-09 10:00 
GeneralRe: ARRAY Standard Deviation vb.net Pin
PAguilar0929-Oct-09 8:54
PAguilar0929-Oct-09 8:54 
GeneralRe: ARRAY Standard Deviation vb.net Pin
Henry Minute29-Oct-09 8:58
Henry Minute29-Oct-09 8:58 
AnswerRe: ARRAY Standard Deviation vb.net Pin
Luc Pattyn28-Oct-09 10:41
sitebuilderLuc Pattyn28-Oct-09 10:41 
GeneralRe: ARRAY Standard Deviation vb.net Pin
Henry Minute28-Oct-09 10:44
Henry Minute28-Oct-09 10:44 
GeneralRe: ARRAY Standard Deviation vb.net Pin
Luc Pattyn28-Oct-09 10:49
sitebuilderLuc Pattyn28-Oct-09 10:49 
AnswerRe: ARRAY Standard Deviation vb.net Pin
Christian Graus28-Oct-09 11:11
protectorChristian Graus28-Oct-09 11:11 
GeneralRe: ARRAY Standard Deviation vb.net Pin
Paul Conrad28-Oct-09 11:54
professionalPaul Conrad28-Oct-09 11:54 
GeneralRe: ARRAY Standard Deviation vb.net Pin
PAguilar0929-Oct-09 8:51
PAguilar0929-Oct-09 8:51 
AnswerRe: ARRAY Standard Deviation vb.net Pin
Paul Conrad28-Oct-09 11:56
professionalPaul Conrad28-Oct-09 11:56 
GeneralRe: ARRAY Standard Deviation vb.net Pin
PAguilar0929-Oct-09 8:47
PAguilar0929-Oct-09 8:47 
AnswerRe: ARRAY Standard Deviation vb.net Pin
John M Bundy29-Oct-09 8:40
John M Bundy29-Oct-09 8:40 
QuestionWindows Mobile Pin
PRT928-Oct-09 7:28
PRT928-Oct-09 7:28 
AnswerRe: Windows Mobile Pin
EliottA28-Oct-09 8:44
EliottA28-Oct-09 8:44 
QuestionFilling an Upload Form within a WebBrowser Pin
Nowid5028-Oct-09 6:58
Nowid5028-Oct-09 6:58 
Questionvb6 to vb.net help needed Pin
offroaderdan28-Oct-09 2:51
offroaderdan28-Oct-09 2:51 
AnswerRe: vb6 to vb.net help needed Pin
DaveAuld28-Oct-09 3:00
professionalDaveAuld28-Oct-09 3:00 

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.