Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Numerical Integration By Weddle's Rule
format long f = @ (x) 1./(1+x.^2); a = 0; b = 1; n = 1002; h = (b-a)/n; x = a; sum = 0.0; for i = 1:n/6 k0 = f(x); k1 = f(x+h); k2 = f(x+2*h); k3 = f(x+3*h); k4 = f(x+4*h); k5 = f(x+5*h); k6 = f(x+6*h); sum = sum + (3/10)*h*(k0+5*k1+k2+6*k3+k4+5*k5+k6); x = x+6*h; end computed_value = sum exact_value = pi/4 error = abs(sum-pi/4)
run
|
edit
|
history
|
help
0
j
tasksss
mywall
Estimating a code regularity proxy of the Mastrave modelling library
Am Ac
Test
MATRIX MANIPULATIONS
a
Laplacian
Example Plot for MTE111 Lab Reports