Borrar filtros
Borrar filtros

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

2 visualizaciones (últimos 30 días)
Chin Kui Ku
Chin Kui Ku el 4 de Jul. de 2018
Comentada: Chin Kui Ku el 8 de Ag. de 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.
it should shows me as follows:
thank you very much.

Respuesta aceptada

KSSV
KSSV el 4 de Jul. de 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 comentarios
Chin Kui Ku
Chin Kui Ku el 4 de Jul. de 2018
Thank you very much.
Chin Kui Ku
Chin Kui Ku el 8 de Ag. de 2018
Corrected answer is y = 1/sqrt(2*pi)*S*(exp(-(x-ML).^2/(2*S^2))+exp(-(x-MR).^2/(2*S^2))) ;

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by