Solving Integral for an Unknown Interval
古いコメントを表示
Is it possible to solve an integral for an interval/ limit of integration without the symbolic toolbox? My problem is of the same form as:(∫f(x)dx)/Z on the interval[-a,a]is equal to (∫g(x)dx)/Y on the interval [-c,c], where Z, a, and Y are known values and c is the unknown variable.
採用された回答
その他の回答 (2 件)
Friedrich
2011 年 7 月 18 日
0 投票
Hi,
no. You can't get a symbolic solution without the symbolic math toolbox. When you know c you can use the quad function:
4 件のコメント
John
2011 年 7 月 18 日
Friedrich
2011 年 7 月 18 日
Why not calculate it manually and than hardcode it. Or do your functions change during runtime?
John
2011 年 7 月 18 日
Friedrich
2011 年 7 月 18 日
Ah okay. Not sure if this will work fine but you could use the fzero function and search the root of (∫sqrt(5^2-x^2)dx)/10 [-25,.25] - (∫sqrt(2.5^2-x^2)dx)/6 [-c,c] , where you solve the integradl with quad
Bjorn Gustavsson
2011 年 7 月 18 日
One super-tool you should take a long look at is the Chebfun tools: http://www2.maths.ox.ac.uk/chebfun/
and my Q-D stab would be something like this:
I_of_f = quadgk(f(x)/Z,-a,a);
c = @(a,Z,Y,f,g) fminsearch(@(c) (I_of_f-quadgk(@(x) g(x)/Y,-c,c))^2,1)
I think that should work...
カテゴリ
ヘルプ センター および File Exchange で Common Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!