Unable to convert expression into double array.
3 ビュー (過去 30 日間)
古いコメントを表示
回答 (1 件)
Star Strider
2019 年 7 月 7 日
One way is to integrate it numerically rather than symbolically:
syms w
fun1pdf(w) = exp(w)/((1+exp(w))^2);
fun1mu(w) = w^3*fun1pdf(w);
F1mu = vpa(int(fun1mu,-Inf,Inf))
fun1mufcn = matlabFunction(fun1mu);
F1mu = integral(fun1mufcn, -Inf, Inf)
However, the result is:
F1mu =
NaN
3 件のコメント
Star Strider
2019 年 7 月 7 日
I discovered the same problem. That is the reason I went to the integral function. It does produce a result, even though it may not be the one you may want.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!