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

Answers (1)

exp(-500*abs(t))

1 Comment

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));

Sign in to comment.

Categories

Find more on Programming in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!