why i receive Nan for integral -inf to -inf ?
Show older comments
for example:
if true
integral(@(x)exp(-(x.^2)/2),-inf,-inf)
end
Accepted Answer
More Answers (1)
Steven Lord
on 21 Jul 2017
0 votes
For computing that integral, you probably want to use the erf and/or erfc functions.
Categories
Find more on NaNs in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!