Trapezoidal Rule - Equal Sements
Trapezoidal Rule - Equal Sements
Romberg
4 + 1.5 MARKS
1A
>> r=0:0.1:0.9
r=
Columns 1 through 7
0 0.1000 0.2000 0.3000 0.4000 0.5000 0.6000
Columns 8 through 10
0.7000 0.8000 0.9000
>> vmax=12;
>> ro=0.9
ro =
0.9000
>> v=vmax*(1-(r/ro).^2);
>> plot (r,v)
1B
>> v=vmax*(1-(r/ro).^2);
>> v=@(r) (vmax*(1-(r/ro)^2))*2*pi*r;
>> romberg(v,0,0.9,0.001)
ans =
15.2681
1C
v= vmax * (1-(r/r0)).^(1/n);
12
plot (r,v)
10
0.1
0.2
1D
f=@(r) 12* (1-(r/0.9))^(1/7) *2 *pi*r;
>> romberg (f,0,0.9,0.1)
ans =
23.7522
0.3
0.4
0.5
0.6
0.7
0.8
0.9