Why is the graph for UnitStep not visible at certain points?

Hello,

u(t) is the unit step:

68561.JPG

g[t_] := 10*(UnitStep[t - 2] - UnitStep[t - 3])
Plot[g[t], {t, 0, 5}]

Another Example:

8.JPG

Plot[2*t*(UnitStep[t] - UnitStep[t - 1]), {t, 0, 4}]

Thank you.

Try the option Exclusions:

g[t_] := 10*(UnitStep[t - 2] - UnitStep[t - 3])
Plot[g[t], {t, 0, 5}, Exclusions -> None]

Mathematica has an excellent documentation - you should use it!

You can also play around with ExclusionsStyle:

g[t_] := 10*(UnitStep[t - 2] - UnitStep[t - 3])
Plot[g[t], {t, 0, 5}, ExclusionsStyle -> Red]

T = 10;
f3[x_] := Sign[Sin[(2*[Pi]*x)/T]]

a) Plot[f3[x], {x, -10, 10}]

b) `Plot[f3[x], {x, -10, 10}, Exclusions → None]


`

But to include also the points x=-10 and x=10, i.e. the ends of the function definition interval, how can it be done?

Thank you.

Untitled-2.nb (8.74 KB)

Try extending the interval a little bit, for example -10.01 to 10.01

Ok. Thank you. I thought also about this kind of doing, but I said that maybe there is some option by which this can be done automatically.