# Thread: function plotting

1. ## 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

2. Originally Posted by braddy
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

3. I never knew that program had Heaviside functions.

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