where is the mistake?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Amer Al-Maashani
am 18 Jan. 2021
Bearbeitet: Amer Al-Maashani
am 18 Jan. 2021
ezplot('int((x*x*normpdf(x,1,2)))',[-20 20 0 2])
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 18 Jan. 2021
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])
1 Kommentar
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Calculus finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!