Unit step function explanation

8 visualizaciones (últimos 30 días)
Smit Patel
Smit Patel el 30 de Nov. de 2019
Respondida: Star Strider el 30 de Nov. de 2019
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

Respuesta aceptada

Jim Riggs
Jim Riggs el 30 de Nov. de 2019
Editada: Jim Riggs el 30 de Nov. de 2019
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.

Más respuestas (1)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by