How do I write a matlab function for the following expression?
조회 수: 2 (최근 30일)
이전 댓글 표시
Evaluate f (x = 1) when μ = 0, σ = 2.
댓글 수: 0
답변 (1개)
Pranjal Kaura
2021년 10월 29일
Hey
Here is a code snippet for the required function
function f_x = PDF(x, u, sigma)
f_x = exp(-(x - u).^2/(2*sigma.^2))/(sigma*sqrt(2*pi));
end
Hope this helps!
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!