How to plot the probability density function using vectorisation.
이전 댓글 표시
This is the function we have been given.
f(x) = 1/sqrt(2*pi*σ^2) * exp(-(x-μ)^2)/(2*σ^2)
We have been told to solve for this where:
μ = 0
σ = [1 2 3 4 5]
x = linspace(-10,10,200)
It needs to be plotted evaluating the function for all the elements of σ and plotted on the same graph. I have tried numerous times and cant seem to get a plot. I no how to plot i just cant seem to plot this function.
NOTE: We cant use the built in probability density function or a for loop just using vectorization.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Uniform Distribution (Continuous)에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!