Wrox Programmer Forums
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 23rd, 2004, 05:48 AM
Registered User
 
Join Date: Dec 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Calculatated

Hi All,
Can help to modify the following coding. Basically I want to calculate the standard deviation, but base on this coding the error message is come out as "Invalid procedure call or argument."

Dim Jumlah as long
Jumlah = SumSD(Mean, tempArr, Countq)

Public Function SumSD(Mean, tempArr, Countq)
    Dim sumSample(10) As Long

    For dataSample = 1 To Countq
        sumSample(dataSample) = Sqr((tempArr(dataSample) - Mean))
    Next dataSample

    For dataSample = 1 To Countq
        SumSD = SumSD + sumSample(dataSample)
    Next dataSample
End Function


 
Old December 27th, 2004, 10:19 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there...
can you apoint what line has the error???

is this one???
SumSD = SumSD + sumSample(dataSample)

if SUMSD is a function you havo to give all the parameters to call it back.. looks like you have a logic problem in this function...



HTH

Gonzalo









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.