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

 Réponse acceptée

Star Strider
Star Strider le 11 Déc 2021
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 commentaires

Ahmed Mohamed
Ahmed Mohamed le 12 Déc 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 le 12 Déc 2021
@Ahmed Mohamed — As always, my pleasure!
@Walter Roberson — Thank you!
.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Signal Processing Toolbox dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by