When i try to calculate the convolution of two functions i get: Warning: Using only the real component of complex data.
1 次查看(过去 30 天)
显示 更早的评论
m3=length(x3);
n3=length(h1);
X3=[x3,zeros(1,n3)];
H3=[h1,zeros(1,m3)];
for i=1:n3+m3-1
Y3(i)=0;
for j3=1:m3
if(i-j3+1>0)
Y3(i)=Y3(i)+X3(j3)*H3(i-j3+1);
else
end
end
end
figure;
subplot(3,1,1); stem(x3, '-b^'); xlabel('n');
ylabel('x[n]'); grid on;
subplot(3,1,2); stem(h1, '-ms');
xlabel('n'); ylabel('h[n]'); grid on;
subplot(3,1,3); stem(Y3, '-ro');
ylabel('Y[n]'); xlabel('n'); grid on;
title('Convolution of Two Signals without conv function')
What can i do to plot the full real and imaginary parts
6 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!