I am still new to matlab and I am facing many errors sketching these problems help please.
2- X(t)=(t+1)u(t-1)-tu(t)-u(t-2) …… for -1≤t≤3
3- X(t)=e-t u(t) – e t-4 u(t-4) …… for -1≤t≤6
4- X[n]=u[n] -2u[n-1] + u[n-4] …… for -3≤n≤8
5- X[n]=δ[n+1]-δ[n]+u[n+1]-u[n-2] ……. for -3≤n≤4

 Akzeptierte Antwort

Star Strider
Star Strider am 11 Dez. 2021

0 Stimmen

One option is to use the Symbolic Math Toolbox and go from there.
Example —
syms t
u(t) = heaviside(t);
X(t)=(t+1)*u(t-1)-t*u(t)-u(t-2)
X(t) = 
figure
fplot(X, [-1 3])
grid
ylim(1.5*ylim)
That only required copying and pasting the function and adding some necessary multiplication operators before plotting it.
.

3 Kommentare

Ahmed Mohamed
Ahmed Mohamed am 12 Dez. 2021
well that worked fine for continous signals and I appreciate it but I still need help for discrete ones (4,5) thanks in advance
T = -3:8;
Y = X(T)
stem(T, Y)
Star Strider
Star Strider am 12 Dez. 2021
@Ahmed Mohamed — As always, my pleasure!
@Walter Roberson — Thank you!
.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Signal Processing Toolbox finden Sie in Hilfe-Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by