![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1515489/image.png)
𝑥 [𝑛] = 𝑢[𝑛]𝑒^−𝑛 how to plot it
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
𝑥[𝑛] = 𝑢[𝑛]𝑒^−𝑛
0 Kommentare
Antworten (1)
akshatsood
am 19 Okt. 2023
Bearbeitet: akshatsood
am 19 Okt. 2023
Hi Mohammed,
I understand that you want to plot the following discrete equation.This can be achieved by leveraging the "stem" function which is used for plotting discrete sequence data.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1515489/image.png)
n = (-20:20); % defining range of n
u_n = (n>=0); % unit step function
tiledlayout(3,1);
nexttile; % u[n]
stem(n,u_n);
nexttile; % e^-n
stem(n,exp(-n));
nexttile; % u[n]*e^-n
stem(n,u_n.*exp(-n));
For more information about the "stem" function, have a look at the following reference
I hope this helps
Siehe auch
Kategorien
Mehr zu Stem 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!