How to plot this function ?

Hello all, I'm quite new to matlab , so I want to figure out how to plot that heaviside function ?
I want to get that graphic below the function.

回答 (2 件)

Star Strider
Star Strider 2017 年 9 月 23 日

0 投票

Try this:
epsilon = @(t) 0.5*(t == 0) + 1*(t > 0);
t = linspace(-1, 1);
figure(1)
plot(t, epsilon(t))
axis([-1 1 -0.1 1.1])
Walter Roberson
Walter Roberson 2017 年 9 月 23 日

0 投票

fplot(@heaviside)

カテゴリ

ヘルプ センター および File ExchangeCreating, Deleting, and Querying Graphics Objects についてさらに検索

タグ

質問済み:

2017 年 9 月 23 日

回答済み:

2017 年 9 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by