lab8(1705Koffke)

lab8(1705Koffke) - To: Prof. William C Koffke P.E. From:,...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
) ( ' ) ( 1 i i i i X f X f X X - = + To: Prof. William C Koffke P.E. From:, Section #005 Date: 03-12-2008 Subject: Report for Lab 08 1.0 Objective The purpose of this lab is to create an M-Script and a “while” loop structure to use the Newton-Raphson iteration method find the roots of an equation. 2.1 Problem Definition Given: Equation: X e X X f - + - = 2 ) ( Newton-Raphson iteration method: Find: the single root of the equation 2.2 Outline of Matlab code In the Newton-Raphson Method, the program is doing the following procedure: ESTIMATE EQUATION ROOTS BY NEWTON-RAPHSON METHOD INTEGER COUNT REAL XGUESS, XNEW, XOLD C*** DOCUMENTATION OF VARIABLES APPEARS HERE OPEN(11,FILE='LAB06.OUT',STATUS='UNKNOWN') WRITE(11,*)'YOUR NAME' WRITE(11,*)'LAB 06 – YOUR SECTION' WRITE(11,*)'DATE' WRITE(11,*)'APPROXIMATION OF ROOTS' PRINT *, 'INITIAL GUESS (NONZERO)?' READ *, XGUESS WRITE(11,*)'INITIAL GUESS: ', XGUESS COUNT = 0 XNEW = XGUESS XOLD = 0.0 DO WHILE (ABS(XNEW-XOLD) .GE. 5.0E-6) COUNT = COUNT + 1 XOLD = XNEW XNEW = XOLD–(XOLD-EXP(-XOLD))/(1+EXP(-XOLD)) WRITE(11,*) 'NEXT ITERATION: ',XNEW END DO
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/08/2008 for the course ECE 1620 taught by Professor Perry during the Spring '08 term at Villanova.

Page1 / 5

lab8(1705Koffke) - To: Prof. William C Koffke P.E. From:,...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online