thank you so much. Okay so I changed some of my code to suit the question.

Question:

Code:

Generate a time vector (tt) to cover a range of t that will exhibit approximately two cycles of the
4000 Hz sinusoids Finally, make sure that you have at least 25 samples per period of the sinusoidal wave. In other words, when you use the
colon operator to define the time vector, make the increment small enough to generate 25 samples per
period

my code
Code:

f = 4e3; % sinusoid freq
T = 1/f; % period (250 usec)
fs = T/25; % time step
tt = -T:fs:T; % time vector
x1 = 20*cos(2*pi*f*tt-8.5);
x2 = 24*cos(2*pi*f*tt+2);
x3 = x1+x2;
subplot(311);
plot(tt, x1), grid on;
title('x1');
axis tight
subplot(312);
plot(tt, x2), grid on;
title('x2');
axis tight
subplot(313);
plot(tt, x3), grid on;
title('x3');
xlabel('Time (sec)');
axis tight
orient tall

So the only thing that I don't get now is am I generating 25 samples per period?

because I am doing this: but fs = 4000/25 = 160.

So I am doing 160 samples right?

I just want to make sure I have interpreted that part correctly so I can ask the teacher why he is doing that.

Thanks