how to rectify stem function error?

n={-5,-4,-3,-2,-1,0,1,2,3,4,5};
u_n={0,0,0,0,0,1,1,1,1,1,1};
stem(n,u_n);
xlabel('time sample');
ylabel('amplitude');
Error: using stem (line 40)
Input arguments must be numeric, datetime, duration or categorical.
how to rectify this error?

 Respuesta aceptada

Walter Roberson
Walter Roberson el 15 de Ag. de 2020

1 voto

Your {} should be []
You are not going to be able to stem() a cell array.

Más respuestas (0)

Categorías

Más información sobre Specialized Power Systems en Centro de ayuda y File Exchange.

Productos

Etiquetas

Preguntada:

el 15 de Ag. de 2020

Respondida:

el 15 de Ag. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by