convolution of Heaviside function
Afficher commentaires plus anciens
I tried Convolving two functions: one is a heaviside ,i.e, j= 200*{ sin(0.5*pi*(t-4)) * ( u(t-4) - u(t-6) ) } and l= exp((-20).*t).*t
This is the code I wrote -
t=0:0.001:10;
j=(200).*(sin((0.5).*pi.*(t-4)).*(heaviside(t-4)-heaviside(t-6)));
l=exp((-20).*t).*t;
c=-(conv(j,l,'same'));
plot(t,c/10);
hold on;
plot(t,j/10,'r');
plot(t,1000.*l,'g');
axis([0 10 -50 50])
The plot came out to be like this-

The convolved curve (blue curve) shouldn't be zero where j is non-zero.But in the plot, it is.
What's wrong ?
Also, how does defining the range of 't' as in the first line of the code gives differnet values of convolution on the y-axis, if the '0.001' in 't=0:0.001:10' is supposed to be the resolution?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
