필터 지우기
필터 지우기

false plot problem on curve bell plot

조회 수: 1 (최근 30일)
Ugur Sahin
Ugur Sahin 2020년 3월 18일
답변: Ugur Sahin 2020년 3월 18일
Hi guys,
I am trying to print a bell curve function but equation that wrote doesn't show a graph truly in range ı defined could someone help me ? true bell curve plot is diffrent than matlab plot true and false plot compare here;
equation = (1/(sqrt(2*pi)))*(eps.^((-(x.^2))/2)); %% this is bell curve equation;
and also;
n=1:100;
sequence = 0.1*n;
x=[sequence];
y=(1/(sqrt(6.28)))*(eps.^((-(x.^2))/2));
plot(x,y);

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 3월 18일
편집: Ameer Hamza 2020년 3월 18일
In MATLAB, exp is the function for exponential of e, not eps. Try this,
x = linspace(-5,5,100);
y=(1/(sqrt(6.28)))*(exp(-(x.^2))/2);
plot(x,y);

추가 답변 (1개)

Ugur Sahin
Ugur Sahin 2020년 3월 18일
thank you so much :D

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by