hello! so i am kinda confused with how to change this to matlab code, because i've tried exp*(-1000*|t|) still not working
pls help me! thank you!
x(t)=exp(-1000|t|)

 Réponse acceptée

madhan ravi
madhan ravi le 22 Nov 2018

3 votes

syms t
x=exp(-1000*abs(t))
fplot(x)

5 commentaires

Nabila Dwita Naura
Nabila Dwita Naura le 22 Nov 2018
still not working:(
here is my full code
clc
clear all
close all
syms t
x=exp*(-1000*abs(t));
fplot(x);
y=fft(x);
figure, plot(t, abs(y)), title('Amplitude');
figure, plot(t, angle(y)), title('Phase');
madhan ravi
madhan ravi le 22 Nov 2018
Modifié(e) : madhan ravi le 22 Nov 2018
Just try the below code by copying and pasting:
t=linspace(0,1,1000);
x=exp(-1000.*abs(t));
y=fft(x);
figure, plot(t, abs(y)), title('Amplitude');
figure, plot(t, angle(y)), title('Phase');
Note: when the argument grows towards negative the result tends to zero much faster because the growth is exponential.
Nabila Dwita Naura
Nabila Dwita Naura le 22 Nov 2018
its working!!! thank you!!
madhan ravi
madhan ravi le 22 Nov 2018
Anytime :), make sure to accept the answer if it helped you
JOHN GIL BILOLO
JOHN GIL BILOLO le 5 Mai 2021
t=linspace(0,30,5000);
x=exp(-2000.*abs(t));
y=fft(x);
xlabel('chito');
ylabel('loko');
plot(t, abs(y),'g--'), title('Amplitude tsamba lang');
plot(t, angle(y),'g--'), title('Exponential kunwari');
grid;

Connectez-vous pour commenter.

Plus de réponses (1)

Md. Imran Hossain
Md. Imran Hossain le 16 Oct 2024

0 votes

Implementing exponential function using MATLAB. clear; clc; m=1; c=2; i=linspace(0,.01,5); y=exp(-i); plot(i,y)

Community Treasure Hunt

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

Start Hunting!

Translated by