How do i code & plot this mathematical equation in matlab?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Chin Kui Ku
am 4 Jul. 2018
Kommentiert: Chin Kui Ku
am 8 Aug. 2018
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/191652/image.jpeg)
it should shows me as follows:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/191653/image.jpeg)
thank you very much.
0 Kommentare
Akzeptierte Antwort
KSSV
am 4 Jul. 2018
% 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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Line Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!