Unit step function explanation

18 次查看(过去 30 天)
function u = u(t)
u=double(t>=0);
end
Question: Why is this the function for unit step? and what does double mean? I know that it gives the unit step function of constant 1 after 0 but I don't know why. Can anyone please help?
Thanks

采纳的回答

Jim Riggs
Jim Riggs 2019-11-30
编辑:Jim Riggs 2019-11-30
Double is simply the data type , i.e. double precision.
(T>=0) is a logical 0 or 1.
double converts the answer to double precision.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by