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.

Respuestas (2)

Star Strider
Star Strider el 23 de Sept. de 2017

0 votos

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])

Categorías

Más información sobre Creating, Deleting, and Querying Graphics Objects en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 23 de Sept. de 2017

Respondida:

el 23 de Sept. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by