where is the mistake?
1 回表示 (過去 30 日間)
古いコメントを表示
Amer Al-Maashani
2021 年 1 月 18 日
編集済み: Amer Al-Maashani
2021 年 1 月 18 日
ezplot('int((x*x*normpdf(x,1,2)))',[-20 20 0 2])
0 件のコメント
採用された回答
Walter Roberson
2021 年 1 月 18 日
What is being integrated? What is the lower bound? What is the upper bound?
Your use of [-20 20 0 2] suggests that you are expecting to plot over two dimensions. As you have an integral, that would require three variables, with one of them being the variable of integration. Your expression only has one variable, and it would be used as the variable of integration if the integral worked, leaving you with two extra variables.
Remember that int() is strictly for symbolic integration.
syms x
f = int((x*x*normpdf(x,1,2)))
ezplot(f,[-20 20 0 2])
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Calculus についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!