How do I plot this convolution correctly???
Ältere Kommentare anzeigen
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 Kommentare
Azzi Abdelmalek
am 2 Nov. 2012
what is rect?
Poonam
am 2 Nov. 2012
Poonam
am 2 Nov. 2012
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Contour Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!