Results 1 to 4 of 4

Vba code for newton raphson

Threaded View

  1. #1
    Registered User
    Join Date
    10-20-2014
    Location
    San Antonio, Tx
    MS-Off Ver
    Mac 2011
    Posts
    4

    Vba code for newton raphson

    Can somebody tell me how to write a VBA code for Newton Raphson
    The code should begin like this
    Function Newt_Raph_1 (x_initial,cc,n)




    I have the code for matlab but i cant seem to write it in VBA
    %STEP 1: Name the function and its arguments.
    function NewtRaph(x_init, cc, n)
    %STEP 2: GIVE INITIAL VALUES, and other starting information.
    x=x_init;
    %STEP 3: RUN THE LOOP.
    for i=1:n;
    x_prev=x;
    x=x-func2(x)/der_func2(x);
    if 100*abs((x-x_prev)/x_prev)<cc,break,end;
    end
    %STEP 4: REPORT RESULTS.
    disp(x)
    %STEP 5: END THE FUNCTION.
    end


    If someone could please help id appreciate it HW#6_Instructions_Fall_2014.pdf
    Attached is the problem. Number 1 part g is the problem i need help doing thanks
    Last edited by albeezy; 10-20-2014 at 12:21 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Newton method - system of nonlinear equations
    By zyrafowaty_swiat in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-10-2014, 07:56 AM
  2. Newton's iteration for multiple rows.
    By maistral in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-02-2014, 03:00 PM
  3. Goal Seek & Newton-Raphson
    By posto5 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-07-2013, 01:49 AM
  4. request newton raphson code
    By hamidciv in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-02-2012, 03:34 PM
  5. Created VBA using Newton's Method
    By BFlick11 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-31-2010, 01:39 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1