2
$\begingroup$

I want to know how to represent the following graph with Heaviside step functions and ramp functions.

enter image description here

My guess is that this is represented as $r(t) -r(t-2) +2u(t-2)$, where $r(t)$ is the unit ramp function and $u(t)$ is the Heaviside unit step function. If this is true then since the delayed ramp function is $r(t-a) = (t-a)u(t-a)$ (according to here) then the same graph can also be represented as $tu(t) -(t-2)u(t-2) +2u(t-2)$. However i draw this function in Matlab and it shows something else instead. I've very confused with this type of problem for a long time now. I don't know what i'm doing wrong. What is the connection between $r(t)$ and $u(t)$? Please help. Thanks in advance!

$\endgroup$

1 Answer 1

2
$\begingroup$

If we define the ramp function $r$ as

$$ r(t)= \begin{cases} t, & t\ge 0\\\\ 0, & t<0 \end{cases}$$

then the function $f$ plotted in the post can be represented as

$$f(t)=r(t)-r(t-2)$$

Note that if one introduces (i.e., adds) a step function, the resulting plot would exhibit a jump discontinuity. Inasmuch as the plot exhibits no jump, then the function it represents can have no such step function.

$\endgroup$
3
  • $\begingroup$ I've tested it. Now everything works. That was bothering me for a long time and as it turns out one of my teachers gave me a wrong answer to this! That and then Matlab confused me. Thank you very much! You saved me! I feel so relieved. $\endgroup$
    – KeyC0de
    Aug 22, 2015 at 21:50
  • $\begingroup$ One more thing if you could answer please. The derivative $\frac{d\ r(t-a)}{dt} = u(t-a)$? Is this true? $\endgroup$
    – KeyC0de
    Aug 22, 2015 at 22:02
  • 1
    $\begingroup$ You are quite welcome. My pleasure. And yes, the derivative of the unit ramp is the unit step, except of course at $t=0$. At zero, the ramp's derivative is undefined. $\endgroup$
    – Mark Viola
    Aug 22, 2015 at 22:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .