How do I plot this convolution correctly???
古いコメントを表示
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 件のコメント
Azzi Abdelmalek
2012 年 11 月 2 日
what is rect?
Poonam
2012 年 11 月 2 日
Poonam
2012 年 11 月 2 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Contour Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!