Consulting

Results 1 to 4 of 4

Thread: Advanced Calculus VBA Programming

  1. #1

    Advanced Calculus VBA Programming

    Hello,

    I need some help on a problem I'm doing for an Intro to VBA programming class. The question is far above my leval as far as programming where the only thing we've learned is basic loops. functions, arrays and dialogue boxes.

    Here is the equation as a bitmap..

    apparently I cant post a link sine im a new member but the link is:

    http:foward slash foward slash i83 dot photobucket dot com/albums/j313/Saab6/EXTRACREDIT-1 dot jpg

    If anyone could be of any help it would be greatly appreciated. BTW, this is an extra credit project and my professor is allowing all outside sources to be used.

    Thank you in advance...

  2. #2
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    Number one - we don't do homework.

    A pointer that may help you, though. Not all the functions you need are native to VBA, but they should all be available as worksheet functions, for example ...

    Msgbox WorksheetFunction.Pi()

    or, maybe ...

    Msgbox WorksheetFunction.tanh(WorksheetFunction.Pi())

    or, if not available, easily derivable from those that are available
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

  3. #3
    Thank you for your reply. I'm not expecting anyone to do this problem for me but my professor is of no help & and have talked to a friend who has a Masters in Mechanical Engineering and PhD in Mathematics and he could see no way to solve for the n values using paper.

    I'm looking for a start please help me..

  4. #4
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    I can't read the formula properly on your linked image, but, as a start, I think this will calculate the first term of the numerator in the last set of brackets ...
    [VBA]
    Dim r1 As Double
    Dim r2 As Double
    Dim n As Double
    Dim theta2 As Double
    Dim term1 As Double

    With WorksheetFunction
    r1 = 0.00075
    r2 = 0.0009
    theta2 = .Radians(15)
    n = 1
    term1 = .Tanh((n * .Pi * theta2) / .Log10((r2 / r1) ^ 2#))
    MsgBox term1
    End With
    [/VBA]
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •