Hello I am having trouble plotting this convolution. my error is "Vectors must be the same length."

1 view (last 30 days)
if true
% code
end
n= -60:60;
xn= cos(n/10);
h = zeros(size(n));
h(abs(n)<=10) = 1/21;
xn1= conv(xn,h);
plot(n,xn1);
  3 Comments

Sign in to comment.

Answers (1)

Thorsten
Thorsten on 8 Sep 2016
Use conv for convolution. cov computes the covariance matrix.

Categories

Find more on MATLAB in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!