Question: a)(10) Correct the given simple script code for Simonumerical integration of fx) given below. Segments must be changes from 1 to 10. Store absolute errors
a)(10) Correct the given simple script code for Simonumerical integration of fx) given below. Segments must be changes from 1 to 10. Store absolute errors for each loop in Error vector. OX15) Re-generate the same code which determines the segment number iteration) while absolute error lower than 100 sin(3x dx Corrected Code Answer 4a Original Code for 1-10 point - 2*pi; api b -5pi/2; h = (b-a)/(point) x a2htb; f = sin(3+x); I sims (h/3) + ((1) +4 sum (E (2:2 point- 1))+2sum (f (3:2:point-2)) + f (point)); fe = sin(3x); Q-integral(fe, a,b); Error-abs (Q-I sims) end Answer 4b
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
