Borrar filtros
Borrar filtros

Help with stem plotting

1 visualización (últimos 30 días)
Christopher Carey
Christopher Carey el 3 de Dic. de 2017
Comentada: Greg el 5 de Dic. de 2017
Hey I want to dis play my signal which has values from n=[0,101] only from n=[0,50] but when i try it tells me x must be the same length as y here is my code.
clc; close all;
z = conv(x,h);
figure(2)
stem(0:1:51, y, 'r -');
hold on
stem(0:1:101, z, 'bo ')
xlabel('n');
ylabel('z[n]');
title('z[n] vs y[n]');
legend('y[n]','z[n]')
  1 comentario
Greg
Greg el 5 de Dic. de 2017
Your y variable clearly doesn't have 52 elements in it. Or z doesn't have 102.
Without showing us your variables, how are we supposed to help?
Try running whos or size(y) or size(z).

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Stem Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by