Unable to convert expression into double array.

Respuestas (1)

Star Strider
Star Strider el 7 de Jul. de 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 comentarios

FANG LIU
FANG LIU el 7 de Jul. de 2019
Yes, It is strange, when I try w^2*fun1pdf(w), and w^4*fun1pdf(w), it works.
only for w^3, it is bad.
Star Strider
Star Strider el 7 de Jul. de 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
FANG LIU el 8 de Jul. de 2019
anyhow, Thanks.

Iniciar sesión para comentar.

Categorías

Más información sobre Export Simulink Model as Standalone FMU en Centro de ayuda y File Exchange.

Productos

Versión

R11.1

Preguntada:

el 7 de Jul. de 2019

Comentada:

el 8 de Jul. de 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by