画(t+1)*(u(t+1)-u(t))的图像,出现数组索引必须为正整数或逻辑值。这是什么原因。
2 views (last 30 days)
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)');
0 Comments
Accepted Answer
rtmtmfa
on 22 May 2023
仅供参考
t0=-3;t1=3;dt=1;
t=t0:dt:t1;
f1=original_signal(t+1);
f2=original_signal(t);
f=(t+1).*(f1-f2);
plot (t, f,'-k','linewidth',2);
axis ([-3,3,-0.1,1.1]);
title(' f(t)');
function f=original_signal(t)
f=(t>0);
end %定义单位阶跃函数
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!