Convolution of rect (t/2) and δ(t+2) - δ(t+1)

6 vues (au cours des 30 derniers jours)
daltonicox
daltonicox le 13 Sep 2013
how can i plot this: g(t) = rect(t/2) * [δ(t+2) - δ(t+1)]. As matter of fact, i want to plot the convolution of this functions. But i'm having trouble creating the rect function. If anyone can help me, i would appreciate it very much.

Réponse acceptée

Image Analyst
Image Analyst le 14 Sep 2013
You can make a rect function by making an array of zeros and placing stretch of 1's in it:
rectPulse = zeros(1, 20);
rectPulse(10:15) = 1;
plot(rectPulse, 'bs-');
  1 commentaire
daltonicox
daltonicox le 14 Sep 2013
thanks, it wormked

Connectez-vous pour commenter.

Plus de réponses (1)

Azzi Abdelmalek
Azzi Abdelmalek le 13 Sep 2013
Modifié(e) : Azzi Abdelmalek le 13 Sep 2013
rect=@(t) heaviside(t+1)- heaviside(t-1)
  4 commentaires
daltonicox
daltonicox le 13 Sep 2013
it didn't work, i'm missing something.
Azzi Abdelmalek
Azzi Abdelmalek le 13 Sep 2013
Ok, what are you missing?

Connectez-vous pour commenter.

Catégories

En savoir plus sur Computer Vision with Simulink dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by