func5p1.asv
资源名称:数值分析课程设计.zip [点击查看]
上传用户:zhdd911129
上传日期:2007-05-11
资源大小:722k
文件大小:0k
源码类别:
matlab例程
开发平台:
Matlab
- %Integration,using N-L methom
- I1=4*(atan(1)-atan(0))
- %Trapz Rule
- I2=1/2*(sub5p1(1)+sub5p1(0))
- %Simpson Rule
- I3=1/6*(sub5p1(1)+4*sub5p1(1/2)+sub5p1(0))
- %Composite Trapezoidal Rule
- x=linspace(0,1,100)
- I4=0
- for i=1:99
- I4=I4+sub5p1(x(i))+sub5p1(x(i+1))
- end
- I4=I4/2/100
- %3.1416,3, 3.1333,3.1102