DSP Exp 1 Report 1
DSP Exp 1 Report 1
‘‘This lab work was assigned by Mr. Kamrul Hasan Hira (Lecturer , Department of Electrical and Electronic Engineering,CUET’’
I. OBJECTIVE set(gca,’XGrid’,’on’,’YGrid’,’on’)
legend(’Amplitude’);
T This experiment focused on discrete-time signal pro-
cessing using MATLAB, involving signal plotting and
manipulation. We visualized basic signals such as step, im-
print(′ exp11 .jpeg′ ,′ −djpeg′ ,′ −r312′ );
gridon
pulse, and ramp functions, which serve as building blocks
for more complex signals. We then explored essential signal
manipulation techniques, including scaling (adjusting ampli- 2) Graph
tude), shifting (displacing in time), and addition/subtraction
(combining signals). Mastering these operations is crucial for
effective analysis and processing of various signals in diverse
engineering and scientific applications
n = 90:1:100;
n0 = 095;
x = zeros(size(n));
for i = 1:length(n)
if n(i) == n0 FIGURE 1. Plot of delta(n-095)
x(i) = 1;
else
x(i) = 0;
B. PLOT OF U(N-N0)
end
end 1) Code
figure clc;
stem(n,x) close all; clear all;
n = 90:1:100;
title(’Decrete plotted shifted Delta function x(n-n0) ’) n0 = 095;
xlabel(’n’); x = zeros(size(n));
ylabel(’x(i)’);
2) Graph
2) Graph
1) Code REFERENCES
clc [1] Alan V Oppenheim. Discrete-time signal processing. Pearson Education
close all India, 1999.
[2] John G Proakis. Digital signal processing: principles, algorithms, and
clear all applications, 4/E. Pearson Education India, 2007.
n = 70:0.1:100;
n0 = 95;
delta = zeros(size(n));
delta(n == n0) = 1;
ramp = max(2*(n - n0), 0);
units tep = zeros(size(n));
units tep(n >= n0) = 1;
sinw ave = 95 ∗ sin(0.5 ∗ pi ∗ n);
x = sinwave + 0.2 ∗ ramp + 3 ∗ delta + 0.8 ∗ units tep;
figure
stem(n,x)
title(’Random Discrete-Time Signal’)
xlabel(’n’);
ylabel(’x(i)’);
set(gca,’XGrid’,’on’,’YGrid’,’on’)
legend(’Amplitude’,’Location’,’NorthEastOutside’);
print(′ exp14 .jpeg′ ,′ −djpeg′ ,′ −r312′ );
IV. DISCUSSION
This experiment focused on discrete-time signal processing
using MATLAB, involving signal plotting and manipulation.
We visualized basic signals such as step, impulse, and ramp
4 VOLUME 11, 2023