Unable to convert expression into double array.

3 ビュー (過去 30 日間)
FANG LIU
FANG LIU 2019 年 7 月 7 日
コメント済み: FANG LIU 2019 年 7 月 8 日
]40Z6]2GIOCWD0[(`49~2(J.png
  1 件のコメント
FANG LIU
FANG LIU 2019 年 7 月 7 日
how to handle this question.

サインインしてコメントする。

回答 (1 件)

Star Strider
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
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
FANG LIU 2019 年 7 月 8 日
anyhow, Thanks.

サインインしてコメントする。

製品


リリース

R11.1

Community Treasure Hunt

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

Start Hunting!

Translated by