DSP Lab 2
This commit is contained in:
23
6th-Semester-Spring-2024/DSP/Labs/Lab-02/Lab2Question4.m
Normal file
23
6th-Semester-Spring-2024/DSP/Labs/Lab-02/Lab2Question4.m
Normal file
@@ -0,0 +1,23 @@
|
||||
% 4a
|
||||
% % Define the signal
|
||||
% n = 0:50;
|
||||
% a = pi/4;
|
||||
% a^2
|
||||
% x = 5*cos(a^2 * n).*heaviside(n);
|
||||
%
|
||||
% % Plot
|
||||
% stem(n, x);
|
||||
% xlabel('n');
|
||||
% ylabel('x(n)');
|
||||
% title('Signal x(n) = 5cos(\pi^2n/16)u(n)');
|
||||
% 4b
|
||||
% Define the signal
|
||||
A = 5;
|
||||
b = (1 + 1j) / 2;
|
||||
x = A * abs(b).^n .* heaviside(n);
|
||||
|
||||
% Plot
|
||||
stem(n, x);
|
||||
xlabel('n');
|
||||
ylabel('x(n)');
|
||||
title('Signal x(n) = 5|b|^n u(n)');
|
||||
Reference in New Issue
Block a user