Unit step function explanation

8 ビュー (過去 30 日間)
Smit Patel
Smit Patel 2019 年 11 月 30 日
回答済み: Star Strider 2019 年 11 月 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.

その他の回答 (1 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by