Unable to convert expression into double array.
Show older comments
Answers (1)
Star Strider
on 7 Jul 2019
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 Comments
FANG LIU
on 7 Jul 2019
Star Strider
on 7 Jul 2019
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
on 8 Jul 2019
Categories
Find more on Export Simulink Model as Standalone FMU in Help Center and File Exchange
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)