Array indices must be positive integers or logical values.
3 ビュー (過去 30 日間)
古いコメントを表示
syms s;
t=10:0.1:100;
impulse=t==0;
f=32/(s-8);
y=subs(f,s,t);
impulse(y);
plot(y,[impulse]);
xlabel('x');
ylabel('y');
Array indices must be positive integers or logical values.
someone know how is this? i am starting with matlab i dont know why this happening.
4 件のコメント
Walter Roberson
2022 年 10 月 1 日
impulse=t==0;
That assigns impulse to be a variable, overriding its existence as a function. Within the rest of the scope, you can no longer call impulse as a function.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Number Theory についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!