MAT 581 HW 4 P 4 1 3

MAT 581 HW 4 P 4 1 3 - x=linspace(a,b,m w1 = NCweights(m...

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

View Full Document Right Arrow Icon
a) a=input('Enter lower bound: '); b=input('Enter upper bound: '); k=input('Enter odd no for power: '); m=input('Enter odd no for m: '); c=(a+b)/2; w = NCweights(m); x=linspace(a,b,m); numI = (b-a)*(((x-c).^k)*w) b) a=input('Enter lower bound: '); b=input('Enter upper bound: '); m=input('Enter odd no for m: '); e=input('Enter a 1*(m+1) matrix for e: '); z=input('Enter a 1*m matrix for z: ');
Background image of page 1

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

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

Unformatted text preview: x=linspace(a,b,m); w1 = NCweights(m); pVal=HornerN(d,x,z); NUM1=0; for i=1:(length(w1)-1) numI1(i) = pVal(i)*w1(i); NUM1=NUM1+numI1(i); end NUM2=NUM1*(b-a) M=e(length(w1)+1)*(factorial(m-1)) Error=0; Error= NCerror(a,b,m,M) Note: I can’t seem to get the error function to work correctly. I think my Derivative Bound is wrong....
View Full Document

This document was uploaded on 02/18/2011.

Page1 / 2

MAT 581 HW 4 P 4 1 3 - x=linspace(a,b,m w1 = NCweights(m...

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