how to rectify stem function error?

7 ビュー (過去 30 日間)
Shyam Sunder
Shyam Sunder 2020 年 8 月 15 日
回答済み: Walter Roberson 2020 年 8 月 15 日
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 Center および File ExchangeSpecialized Power Systems についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by