# function plotting

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

$\displaystyle \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
• Sep 3rd 2007, 09:03 PM
topsquark
Quote:

Originally Posted by braddy
Hi,
I have hard time trying to plot some function like :

$\displaystyle \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

$\displaystyle \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
• Sep 4th 2007, 04: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.