MSK Signal
MSK Signal
figure;
% Graph 1
subplot(3, 3, 1);
y1 = zeros(size(t));
y1(t >= 0 & t < 1) = 1;
y1(t >= 1 & t < 2) = 1;
y1(t >= 2 & t < 3) = -1;
y1(t >= 3 & t < 4) = -1;
y1(t >= 4 & t < 5) = -1;
y1(t >= 5 & t < 6) = 1;
y1(t >= 6 & t < 7) = 1;
y1(t >= 7 & t < 8) = 1;
y1(t >= 8 & t <= 9) = 0;
plot(t, y1, 'k', 'LineWidth', 2);
title('b(t)');
xlabel('Time (t)');
ylabel('b(t)');
grid on;
ylim([-2, 2]);
xticks(0:1:9);
yticks(-2:1:2);
% Graph 2
subplot(3, 3, 2);
y2 = zeros(size(t));
y2(t >= 0 & t < 1) = 1;
y2(t >= 1 & t < 2) = 1;
y2(t >= 2 & t < 3) = -1;
y2(t >= 3 & t < 4) = -1;
y2(t >= 4 & t < 5) = -1;
y2(t >= 5 & t < 6) = -1;
y2(t >= 6 & t < 7) = 1;
y2(t >= 7 & t < 8) = 1;
plot(t, y2, 'r', 'LineWidth', 2);
title('bo(t)');
xlabel('Time (t)');
ylabel('bo(t)');
grid on;
ylim([-2, 2]);
xticks(0:1:9);
yticks(-2:1:2);
% Graph 3
subplot(3, 3, 3);
y3 = zeros(size(t));
MATLAB Command Window Page 2
% Graph 4
subplot(3, 3, 4);
y4_1 = zeros(size(t));
y4_2 = zeros(size(t));
% Set values for different time intervals using sine and cosine curves
y4_1(t >= 1 & t < 2) = sin(2 * pi * (t(t >= 1 & t < 2) - 1) / 4);
y4_2(t >= 1 & t < 2) = cos(2 * pi * (t(t >= 1 & t < 2) - 1) / 4);
y4_1(t >= 2 & t < 3) = sin(2 * pi * (3 - t(t >= 2 & t < 3)) / 4);
y4_2(t >= 2 & t < 3) = -cos(2 * pi * (3 - t(t >= 2 & t < 3)) / 4);
y4_1(t >= 3 & t < 4) = -sin(2 * pi * (t(t >= 3 & t < 4) - 3) / 4);
y4_2(t >= 3 & t < 4) = -cos(2 * pi * (t(t >= 3 & t < 4) - 3) / 4);
y4_1(t >= 4 & t < 5) = -sin(2 * pi * (5 - t(t >= 4 & t < 5)) / 4);
y4_2(t >= 4 & t < 5) = cos(2 * pi * (5 - t(t >= 4 & t < 5)) / 4);
y4_1(t >= 5 & t < 6) = sin(2 * pi * (t(t >= 5 & t < 6) - 5) / 4);
y4_2(t >= 5 & t < 6) = cos(2 * pi * (t(t >= 5 & t < 6) - 5) / 4);
y4_1(t >= 6 & t < 7) = sin(2 * pi * (7 - t(t >= 6 & t < 7)) / 4);
y4_2(t >= 6 & t < 7) = -cos(2 * pi * (7 - t(t >= 6 & t < 7)) / 4);
y4_1(t >= 7 & t < 8) = -sin(2 * pi * (t(t >= 7 & t < 8) - 7) / 4);
y4_2(t >= 7 & t < 8) = -cos(2 * pi * (t(t >= 7 & t < 8) - 7) / 4);
y4_1(t >= 8 & t <= 9) = -sin(2 * pi * (9 - t(t >= 8 & t <= 9)) / 4);
y4_2(t >= 8 & t <= 9) = cos(2 * pi * (9 - t(t >= 8 & t <= 9)) / 4);
% Graph 5
subplot(3, 3, 5);
y5 = y3 .* -cos(2 * pi * t / 4);
plot(t, y5, 'b', 'LineWidth', 2);
title('be(t) * Sin(2πt/4T)');
xlabel('Time (t)');
ylabel('be(t) * Sin(2πt/4T)');
grid on;
ylim([-2, 2]);
xticks(0:1:9);
yticks(-2:1:2);
% Graph 6
subplot(3, 3, 6);
y6 = y2 .* sin(2 * pi * t / 4);
y6(t < 1) = 0; % Ensure y=0 at t=0
plot(t, y6, 'r', 'LineWidth', 2);
title('bo(t) * Cos(2πt/4T)');
xlabel('Time (t)');
ylabel('bo(t) * Cos(2πt/4T)');
grid on;
ylim([-2, 2]);
xticks(0:1:9);
yticks(-2:1:2);
% Graph 7 & 8
subplot(3, 3, 7);
y7 = -sin(2 * 6 * pi * t / 4);
y7(t < 1) = 0;
plot(t, y7, 'b', 'LineWidth', 2);
title('fH = 1.5 fb');
xlabel('Time (t)');
ylabel('fH = 1.5 fb');
grid on;
ylim([-2, 2]);
MATLAB Command Window Page 4
xticks(0:1:9);
yticks(-2:1:2);
subplot(3, 3, 8);
y8 = sin(2 * 4 * pi * t / 4);
y8(t < 1) = 0;
plot(t, y8, 'b', 'LineWidth', 2);
title('fL = 1 fb');
xlabel('Time (t)');
ylabel('fL = 1 fb');
grid on;
ylim([-2, 2]);
xticks(0:1:9);
yticks(-2:1:2);
% Graph 9
subplot(3, 3, 9);
y9 = zeros(size(t));
y9(t >= 1 & t < 2) = y7(t >= 1 & t < 2);
y9(t >= 2 & t < 3) = -y8(t >= 2 & t < 3);
y9(t >= 3 & t < 4) = -y7(t >= 3 & t < 4);
y9(t >= 4 & t < 5) = -y7(t >= 4 & t < 5);
y9(t >= 5 & t < 6) = -y8(t >= 5 & t < 6);
y9(t >= 6 & t < 7) = y7(t >= 6 & t < 7);
y9(t >= 7 & t < 8) = y7(t >= 7 & t < 8);
plot(t, y9, 'k', 'LineWidth', 2);
title('MSK Signal');
xlabel('Time (t)');
ylabel('MSK');
grid on;
ylim([-2, 2]);
xticks(0:1:9);
yticks(-2:1:2);
>>