Message Boards Message Boards

0
|
2162 Views
|
5 Replies
|
5 Total Likes
View groups...
Share
Share this post:

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

Posted 1 year ago

Hello,

u(t) is the unit step:
enter image description here

enter image description here enter image description here

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

enter image description here

enter image description here enter image description here

Another Example:
enter image description here enter image description here

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

enter image description here

Thank you.

POSTED BY: Cornel B.
5 Replies

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!

POSTED BY: Henrik Schachner

You can also play around with ExclusionsStyle:

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

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

POSTED BY: Gianluca Gorni
Posted 1 year ago
T = 10;
f3[x_] := Sign[Sin[(2*\[Pi]*x)/T]]

enter image description here

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

enter image description here

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

enter image description here`

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?

enter image description here

Thank you.

Attachments:
POSTED BY: Cornel B.
Posted 1 year ago

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.

POSTED BY: Cornel B.
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract