필터 지우기
필터 지우기

i have a homework that i have been stuck on, can anyone help ?

조회 수: 1 (최근 30일)
ali
ali 2022년 7월 28일
답변: 2NOR_Kh 2022년 8월 2일
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
David Hill
David Hill 2022년 7월 28일
Show us your code and ask a specific question.
ali
ali 2022년 7월 28일
i dont know how to write it to be honest the doctor has not explaind everything and decided to give us a homework on it , i have tried to understand how to but its a dead end

댓글을 달려면 로그인하십시오.

답변 (2개)

Mathias Smeets
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')

2NOR_Kh
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');

카테고리

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

태그

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by