# Question about rect () function

Status
Not open for further replies.

#### markwilest

##### Newbie level 5
Hi,

For what range of t is x(t) = rect [(t/T)-(1/2)] equal to one ? Like for exapmple rect (t) = 1 for |t|<1/2. Please help me to understand this. Thanks

Mark

#### eecs4ever

##### Full Member level 3
markwilest said:
Hi,

For what range of t is x(t) = rect [(t/T)-(1/2)] equal to one ? Like for exapmple rect (t) = 1 for |t|<1/2. Please help me to understand this. Thanks

Mark
rect(t) = 1 if |t| < 1/2
so rect ( any number) = 1 if |any number| < 1/2

So if | (t/T)-(1/2) | < 1/2
then x(t) = 1 .

so | (t/T)-(1/2) | < 1/2 implies

-1/2 < t/T - 1/2 < 1/2 which implies

0 < t / T < 1 which implies

0 < t < T

so this function is simply a shifted rectangle thats only 1 if t is between 0 and T.
x(t) = 1 when 0<t <T . and x(t) = 0 everywhere else.

### markwilest

points: 2

#### purnapragna

Hi note that $rect(\frac{t}{T})$ is $1$ for $[-\frac{T}{2},\frac{T}{2}]$. $rect(\frac{t}{T}-1)$ is just shifted version of original signal $rect(\frac{t}{T})$ by $\frac{1}{2}$ to the left. So the signal will be $1$ for $[-frac{T}{2}+\frac{1}{2},rac{T}{2}+\frac{1}{2}]$. Hope you got it.

thnx

purna!

Hi note that $rect(\frac{t}{T})$ is $1$ for $[-\frac{T}{2},\frac{T}{2}]$. $rect(\frac{t}{T}-1)$ is just shifted version of original signal $rect(\frac{t}{T})$ by $\frac{1}{2}$ to the left. So the signal will be $1$ for $[-\frac{T}{2}+\frac{1}{2},\frac{T}{2}+ \frac{1}{2}]$. Hope you got it.

thnx

purna!

Hi note that $rect(\frac{t}{T})$ is $1$ for $[-\frac{T}{2},\frac{T}{2}]$. $rect(\frac{t}{T}-1)$ is just shifted version of original signal $rect(\frac{t}{T})$ by $1$ to the left. So the signal will be $1$ for $[-\frac{T}{2}+1,\frac{T}{2}+ 1]$. Hope you got it.

thnx

purna!

Last edited by a moderator:

#### v_c

One thing that I always keep in mind about the $rect()$ function is that it can be constructed using two step functions. In other words,
$rect(t) = u(t+1/2) - u(t-1/2)$
So if you know how a step function works -- you know how the $rect()$ function works. It is always good to decompose complex functions down to simpler functions to do analyze, find their transforms, etc.

Best regards,
v_c

Last edited by a moderator:

#### andreas1982

##### Junior Member level 3
It is one for:
½-(T/2) e ½+(T/2)

#### sssr

##### Junior Member level 1
Hi Ive got a rec function as well - how do I express this in unit step functions

x(t)= Π[(t-3)/6] + Π[(t-4)/2]

thanks

#### v_c

sssr said:
Hi Ive got a rec function as well - how do I express this in unit step functions

x(t)= ?[(t-3)/6] + ?[(t-4)/2]

thanks
For the first rect function you would get u[(t-3)/6 + 1/2] - u[(t-3)/6 - 1/2].
For the second rect function you get u[(t-4)/2 + 1/2] - u[(t-4)/2 - 1/2].
Just add these four step function and you should be set. Notice that all I did was
to use the decomposition of the rect function into the step functions as I showed
in my previous post. So rect(anything) = u(anything + 1/2) - u(anything - 1/2)
in your case "anything" was the function inside the parantheses of your rect function.
Sometimes the rect function is called "gate" function and denoted (as you have) by the Greek uppercase letter pi since it looks like a gate.

Best regards,
v_c

Status
Not open for further replies.