필터 지우기
필터 지우기

How do i code & plot this mathematical equation in matlab?

조회 수: 1 (최근 30일)
Chin Kui Ku
Chin Kui Ku 2018년 7월 4일
댓글: Chin Kui Ku 2018년 8월 8일
This PDF equation (image as attached) is the result of the dual-Dirac delta convolution with Gaussian function. where the mu (uL & uR) and Sigma(std dev) is the variables, x is the time axis. y is the pdf.
i would like to code this in matlab and plot the gragh.
it should shows me as follows:
thank you very much.

채택된 답변

KSSV
KSSV 2018년 7월 4일
% consider the data, you may give your values for the below variables
x = 0:0.001:30 ;
S = 5 ;
ML = 10 ;
MR = 20 ;
y = 1/sqrt(2*pi*S)*(exp(-(x-ML).^2/2*S^2)+exp(-(x-MR).^2/2*S^2)) ;
plot(x,y)
  댓글 수: 2
Chin Kui Ku
Chin Kui Ku 2018년 7월 4일
Thank you very much.
Chin Kui Ku
Chin Kui Ku 2018년 8월 8일
Corrected answer is y = 1/sqrt(2*pi)*S*(exp(-(x-ML).^2/(2*S^2))+exp(-(x-MR).^2/(2*S^2))) ;

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by