- #1

- 28

- 0

1.Use MATLAB to demonstrate how the series converges to the triangular wave.

2.Generate a plot(properly labelled) with 6, 10 and 30 terms for a value of T = 2.

2. *A triangular wave with period T may be written as: 1/(2n+1)^2 * cos((2n+1)*w0*t) (this is a series, n starts at 0 and goes on until infinity). where w0 = 2pi/T. This wave form is sampled, with a sampling time of TS = T/200, to yield the sampled signal x(n).

3.

t=2;

Ts=t/200;

w=(2*pi)/t;

n=0:9999;

x=((2*n+1).^-2).*(cos((2*n+1)*w*Ts)); plot(x)

When i plot this it doesn't give a triangular wave. I must have done something wrong or missed a detail. Any help would be appreciated.

2.Generate a plot(properly labelled) with 6, 10 and 30 terms for a value of T = 2.

2. *A triangular wave with period T may be written as: 1/(2n+1)^2 * cos((2n+1)*w0*t) (this is a series, n starts at 0 and goes on until infinity). where w0 = 2pi/T. This wave form is sampled, with a sampling time of TS = T/200, to yield the sampled signal x(n).

3.

t=2;

Ts=t/200;

w=(2*pi)/t;

n=0:9999;

x=((2*n+1).^-2).*(cos((2*n+1)*w*Ts)); plot(x)

When i plot this it doesn't give a triangular wave. I must have done something wrong or missed a detail. Any help would be appreciated.

Last edited by a moderator: