how to rectify stem function error?

7 次查看(过去 30 天)
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?

采纳的回答

Walter Roberson
Walter Roberson 2020-8-15
Your {} should be []
You are not going to be able to stem() a cell array.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Specialized Power Systems 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by