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!