Info
この質問は閉じられています。 編集または回答するには再度開いてください。
Can someone please tell me where I'm wrong so that I can correct it
1 回表示 (過去 30 日間)
古いコメントを表示
M = 2.5
fun1 = @(y) 1./y.*((sqrt(M^2 - 1)- cot(x)));
Km = integral(fun1,0,2.5);
above is my code an I need to know how to use the integral function on it. I keep getting this set of errors
Error in Intergral_test>@(y)1./y.*((sqrt(M^2-1)-cot(x)))
Error in integralCalc/iterateScalarValued (line 314)
fx = FUN(t);
Error in integralCalc/vadapt (line 132)
[q,errbnd] = iterateScalarValued(u,tinterval,pathlen);
Error in integralCalc (line 75)
[q,errbnd] = vadapt(@AtoBInvTransform,interval);
Error in integral (line 88)
Q = integralCalc(fun,a,b,opstruct);
Error in Intergral_test (line 3)
Km = integral(fun1,0,2.5); %returns C-.
0 件のコメント
回答 (1 件)
John D'Errico
2017 年 6 月 10 日
編集済み: John D'Errico
2017 年 6 月 10 日
You don't think having
- cot(x)));
in an integral with a kernel that is a function of y will cause a problem? :)
If x is symbolic, know that integral CANNOT solve a symbolic problem. If x is something else, I would point out that you have not defined it, in what you have shown us.
4 件のコメント
John D'Errico
2017 年 6 月 10 日
But 0.0000001, or whatever will create a arbitrarily large result and very different, based on whether you decided to use 0.0001, 0.0000000001, whatever. So just using a small number is not the right way to solve this, since exactly what number you choose as "small" will give you absurdly different results.
The .png suggests this is something that lives along some path. What path, we don't know, since we have been given only one single expression from a book or paper.
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!