画(t+1)*(u(t+1)-u(t))的图像,出现数组索引必须为正整数或逻辑值。这是什么原因。
Show older comments
代码如下
function f=original_signal(t)
f=(t>0);
end //定义单位阶跃函数
t0=-3;t1=3;dt=1;
t=t0:dt:t1;
f1=original_signal(t+1);
f2=original_signal(t);
f(t)=(t+1).*(f1-f2);
plot (t, f(t),'-k','linewidth',2);
axis ([-3,3,-0.1,1.1]);
title(' f(t)');
Accepted Answer
More Answers (0)
Categories
Find more on 二维图和三维图 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!