How do I plot this convolution correctly???
Mostrar comentarios más antiguos
I am trying to plot the following function sinc(x/.2) convolved with rect(x/10)
clc; close all; clear all;
x = linspace(-10,10,1001);
grid
hold;
plot(x,sinc(x/.2)),'r';
plot(x,rect(x/10)),'c';
y=conv(sinc(x/.2),rect(x/10),'full');
axis=(0:length(y)-1)*(x(2)-x(1));
plot(axis,y);
The resultant plot I am getting is shifted to 15. Shouldnt it be between -5 to 5? Thank you
3 comentarios
Azzi Abdelmalek
el 2 de Nov. de 2012
what is rect?
Poonam
el 2 de Nov. de 2012
Poonam
el 2 de Nov. de 2012
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Contour Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!