Hello, guys(adsbygoogle = window.adsbygoogle || []).push({});

Hey guys,

Got stuck with function integration using Simpson's rule and need your help.

Please first refer to picture attached for full idea of my question:

The Matlab command related to it is:

for i=1:nr

u1d(i)=4.0*pi*r(i)^2*u(it,i)

end

I1=simp(0.0,r0,nr,u1d)/(4.0/3.0*pi*r0^3)

I1 is

nr=21

r0=1.0;

Does it mean that I1 is integrated 21 times between boundaries 0 and r0?

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Interpreting Matlab function simp

**Physics Forums | Science Articles, Homework Help, Discussion**