solving integral equations by integral
19 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
JI Yong Song
am 1 Jun. 2018
Bearbeitet: Rik
am 14 Feb. 2021
what is the problem here..?
syms x;
a=1.5;
b=0.5;
fun=@(x) (x-b).^2*exp.^(-x);
value=integral(fun,0,a)
IT says Error: integral (line 88) Q = integralCalc(fun,a,b,opstruct);
Error: c (line 7) value=integral(fun,0,a)
Thanks for the advice in advance
0 Kommentare
Akzeptierte Antwort
Ameer Hamza
am 1 Jun. 2018
When using integral(), you don't need to use sym. Also exp is defined as a function in MATLAB, not a constant. Compare your code with the following code to find the mistakes
a=1.5;
b=0.5;
fun = @(x) (x-b).^2.*exp(-x);
value=integral(fun,0,a)
1 Kommentar
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Calculus finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!