Results 1 to 2 of 2
  1. #1
    plz c this fortran code

    Member Since
    Oct 01, 2010
    Posts
    1
    plz c this fortran code
    hello..this is a general newton forward difference ccode..where and what will change for newtons forward DIVIDED difference?.
    .program Divided_Differences_Iterpolation dimension x(20),y(20),d(20,20)
    n=7
    xx=.7
    data (x(i), i=1,7) /0,.5,1,1.4,2,3.2,5.5/
    data (y(i), i=1,7)/-1.25,-3.5,6,2.32,1.5,1.27,5.6/
    s=y(1)
    do i=1,n-1
    do j=1,n-i
    y(j)=(y(j+1)-y(j))/(x(j+i)-x(j))
    d(i,j)=y(j) print*,d(i,j)
    enddo
    enddo
    do i=1,n-1
    p=1
    do j=1,i p=p*(xx-x(j))
    enddo
    s=s+d(i,1)*p enddo print*,'Inte
    rpolation of(',xx,')=',s
    end

    please ..a quick reply is needed..thank u

  2. #2
    plz c this fortran code
    xstep's Avatar
    Member Since
    Jun 25, 2005
    Location
    On the road
    Posts
    3,231
    Specs:
    2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
    First, what is the question? We don't do peoples homework for them here.

    Second, if you are going to post code, use the CODE tag to wrap it. Also make it cleanly formatted. Yours is messy and difficult to follow in a few places.
    CameraTime - Time lapse photography for novice and advanced users.

    When asking questions, post the version of your software. You'll receive better answers.

    Please post your results to the thread as it is good feedback.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Fortran Segmentation fault only on Snow Leopard
    By goldfish37 in forum OS X - Development and Darwin
    Replies: 0
    Last Post: 04-05-2011, 05:03 AM
  2. Fortran with Xcode
    By Daniell in forum OS X - Development and Darwin
    Replies: 0
    Last Post: 02-23-2011, 03:25 PM
  3. Fortran Compiling help
    By Jennynot in forum OS X - Development and Darwin
    Replies: 0
    Last Post: 10-07-2009, 07:06 AM
  4. Help with XCode and Fortran
    By rosula2008 in forum OS X - Development and Darwin
    Replies: 3
    Last Post: 01-28-2009, 12:20 PM

Posting Permissions

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