why I am getting 'array indices must be positive intergers or logical value' error?
이전 댓글 표시
a=1.4492;
b=-3.4497;
n=100;
h=(b-a)/n;
f(a)=integ_trape(a);
f(b)=integ_trape(b);
r=0.5*(f(a)+f(b));
for i=1:1:n-1
r=r+f(a+i*h);
break;
I=h*r;
end
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!