false plot problem on curve bell plot
1 回表示 (過去 30 日間)
古いコメントを表示
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;
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/277926/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/277925/image.png)
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);
0 件のコメント
採用された回答
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);
0 件のコメント
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!