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개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Subplots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!