How do i put this in Matlab?

Hi, i'm just learning this and was wondering how do i put the following in matlab?
𝑥𝑎(𝑡) =𝑒^−500|𝑡|
i understant that i can put x=exp(-500) but how about the |t|?
Thank you very much in advance

Respuestas (1)

Scott MacKenzie
Scott MacKenzie el 25 de Abr. de 2021

0 votos

exp(-500*abs(t))

1 comentario

Abdul Basir Fathillah
Abdul Basir Fathillah el 25 de Abr. de 2021
Thank you. then how do i plot it's fourier transform?
Is this way correct?
Fs = 1000;
dt = 1/Fs;% sampling interval in time
t = 0:dt:10;% time from 0s to 10s
x = exp(-500*abs(t));% signal in time domain
%x=exp(-t).*cos(100*t)
F = 0.01*fft(x); %signal in frequency domain
figure(1)
plot (abs(F));

Iniciar sesión para comentar.

Categorías

Más información sobre Programming en Centro de ayuda y File Exchange.

Preguntada:

el 25 de Abr. de 2021

Comentada:

el 25 de Abr. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by