Class Notes (839,483)
United States (325,987)
Mathematics (611)
MATH 417 (18)
All (18)
Lecture 13

MATH 417 Lecture 13: adaptiveQuad2: Code for Doing Homework

2 Pages
26 Views

Department
Mathematics
Course Code
MATH 417
Professor
All

This preview shows 80% of the first page. Sign up to view the full 2 pages of the document.
Description
function xx = adaptiveQuad(a, b, eps, n) %a=left endpoint, b=right endpoint, eps=tolerance, n=maximum # of levels %Returns xx=quadrature points. format long; delta = b-a; segma = 0; h = delta/2; c = (a+b)/2; k = 1; A = f(a); B = f(b); C = f(c); S = (A + 4*C + B)*h/3; V(1, :)=[a h A C B S]; bb=[]; while( k>=1 && k <=n) h=V(k, 2)/2; Y = f(V(k,1) + h); S1 = (V(k,3) + 4*Y + V(k,4))*h/3; Z = f(V(k,1) + 3*h); S2 = (V(k,4)+ 4*Z + V(k,5))*h/3; if(abs(S1+S2-V(k,6))
More Less
Unlock Document

Only 80% of the first page are available for preview. Some parts have been intentionally blurred.

Unlock Document
You're Reading a Preview

Unlock to view full version

Unlock Document

Log In


OR

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.


Submit