Unable to convert expression into double array.
显示 更早的评论
回答(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 个评论
FANG LIU
2019-7-7
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.
FANG LIU
2019-7-8
类别
在 帮助中心 和 File Exchange 中查找有关 Export Simulink Model as Standalone FMU 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!![]40Z6]2GIOCWD0[(`49~2(J.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/227876/]40Z6]2GIOCWD0[(`49~2(J.png)
