Borrar filtros
Borrar filtros

When i try to calculate the convolution of two functions i get: Warning: Using only the real component of complex data.

1 visualización (últimos 30 días)
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 comentarios

Iniciar sesión para comentar.

Respuestas (0)

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by