plotting standard normal rvs
    조회 수: 6 (최근 30일)
  
       이전 댓글 표시
    
I'm trying to determine the plot of the standard normal (for n=10) and plot it. Can I do this by using y=1/2*erfc(-x/sqrt(2)) or can I use y =1/sqrt(2*pi*sigma2) * exp(-(x-mu).^2 /(2 * sigma2));
Thank you
댓글 수: 0
채택된 답변
  the cyclist
      
      
 2014년 7월 4일
        
      편집: the cyclist
      
      
 2014년 7월 4일
  
      If you have the Statistics Toolbox, then this is extremely easy, just using the normpdf function which encodes the formula for you.
MU    = 10;
SIGMA = 1;
x = 5 : 0.01 : 15;
y = normpdf(x,MU,SIGMA)
figure
plot(x,y)
If you don't have the toolbox, then just use
y =1./sqrt(2*pi*SIGMA) * exp(-(x-MU).^2 /(2 * SIGMA));
instead.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Semiconductors and Converters에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

