i have a homework that i have been stuck on, can anyone help ?
1 回表示 (過去 30 日間)
古いコメントを表示
how to gentate a plot of this function from z = -5 to 5 , and to label the ordinate as ferquency and the ab-
scissa as z ?
3 件のコメント
回答 (2 件)
Mathias Smeets
2022 年 7 月 28 日
編集済み: Mathias Smeets
2022 年 7 月 28 日
I would recommend some matlab tutorial, since this is very basic. However:
% make z from -5 to 5 with steps of 0.01
z = -5:0.01:5
% create the function
f = (1 / (sqrt(2*pi))) * exp(- z.^2 / 2)
% plot the function
plot(z,f)
% label your axes
xlabel('z')
ylabel('frequency')
0 件のコメント
2NOR_Kh
2022 年 8 月 2 日
you can change parameters to see how this will change. Also, in gaussian distribution, there is another important parameter named sigma. you can add it to the code and see how the curve will change.
good luck with that.
srate=0.01;
z=-5:srate:5;
Exp_comp = -z.^2/2;
GL = exp(-z.^2)/2;
figure,plot(z,GL),xlabel(' frequency');ylabel(' z');
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Geographic Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!