Basic Integration [ Integration limits ]
1 回表示 (過去 30 日間)
古いコメントを表示
Hello Guys
Just i am wondering how to solve an integration problem in MATLAB for this equation?? here is the problem below
a= 3.43 int Q*n dr
where n dependent variable on r
Regards
0 件のコメント
回答 (1 件)
Wayne King
2013 年 7 月 19 日
編集済み: Wayne King
2013 年 7 月 19 日
Is Q a constant? I'm assuming you mean that n is function of r, like n(r)
Suppose n(r) = r^2 and you want to integrate from [-2,2]
integral(@(r) r.^2,-2,2)
If you don't have a version of MATLAB with integral(), you have options like trapz()
r = -2:0.02:2;
n = r.^2;
trapz(r,n)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!