# function plotting

• September 3rd 2007, 04:49 PM
function plotting
Hi,
I have hard time trying to plot some function like :

$\sum u(t-2n)*u(1+2n-t)$
The sum goes from n=0 to n=infinity.

I only have matlab to plot it.I can plot the unit step function. but I cannot plot the functon above. Can someone know how to plot it?

I have not tried to plot function such as u(t-2n)+u(1+2n-1) but I will do right now.
Thank you
B
• September 3rd 2007, 10:03 PM
topsquark
Quote:

Hi,
I have hard time trying to plot some function like :

$\sum u(t-2n)*u(1+2n-t)$
The sum goes from n=0 to n=infinity.

I only have matlab to plot it.I can plot the unit step function. but I cannot plot the functon above. Can someone know how to plot it?

I have not tried to plot function such as u(t-2n)+u(1+2n-1) but I will do right now.
Thank you
B

$\sum_{n = 0}^{\infty} u(t-2n) \cdot u(1+2n-t) = u(t) \cdot u(1 - t) + u(t - 2) \cdot u(3 - t) + ~ ...$

Here it is for a few terms. Can you figure out the pattern?

-Dan
• September 4th 2007, 05:08 AM
ThePerfectHacker
I never knew that program had Heaviside functions. :eek:

I think the idea here is to express this "sawtooth wave" (or whatever it is called) as a Fourier series.