MATLAb Integration
5 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I am attempting to integrate a summation of functions over the intervals: (0 to x) and (x to Inf) using MATLAB. The integral is inside a “for” loop, and each function inside the integral is a function of x.
I began by using a separate integral for each interval, but I am wanting to know which MATLAB integration method should I use to integrate.
Please remember the integration is inside a “for” loop, and therefor will run many times; up to 500 times.
0 件のコメント
回答 (2 件)
Walter Roberson
2011 年 4 月 19 日
Sounds like if possible you should use the symbolic toolbox outside the loop to calculate the general integral in the parameter, and then in the loop, subs() the current value of the parameter in to get the current integral; double() the symbolic number that results to get the double precision value.
1 件のコメント
Mike Hosea
2011 年 7 月 8 日
Walter's suggestion of symbolic integration might work in some cases. Barring that, the only integration function that works on non-finite intervals is QUADGK, so that's the one you should use. Of course you could also do your own transform to a finite interval, but QUADGK is always the one you should try first, anyway.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!