画(t+1)*(u(​t+1)-u(t))​的图像,出现数组索引​必须为正整数或逻辑值​。这是什么原因。

代码如下
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

rtmtmfa
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 %定义单位阶跃函数

More Answers (0)

Categories

Find more on 二维图和三维图 in Help Center and File Exchange

Asked:

on 22 May 2023

Answered:

on 22 May 2023

Community Treasure Hunt

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

Start Hunting!