SlideShare a Scribd company logo
1 of 9
Digital Signal Processing
Experiment 1
GENERATION OF BASIC SIGNALS
(a). Program for the generation of UNIT impulse signal
clc;
close all;
clear all;
t=-2:1:2; % defining time axis and samples
y=[zeros(1,2),ones(1,1),zeros(1,2)] %defining magnitude at different
samples
stem(t,y); %plot discrete signal
xlabel('samples----')
Ylabel(‘magnitude’) % assigning labels to x and y axis
title('unit impulse'); %giving title
n = [-5:5];
imp = zeros(1,length(n));
imp(n==0) = 1;
stem(n,imp) %plot discrete signal
axis([-5 5 -2 2])
xlabel('samples----')
Ylabel(‘magnitude’) % assigning labels to x and y axis
title('unit impulse');
(b) Program for the generation of UNIT step signal
clc;
close all;
clear all;
n=input('enter the n value = ');
t=0:1:n-1;
y= ones(1,n);
stem(t,y);
axis([-5 5 -5 5])
xlabel('samples----')
ylabel('Magnitude')
title('unit step')
(b) Program for the generation of UNIT step signal
clc;
close all;
clear all;
n=[-5:5];
ramp = (n>=0).*n;
stem(n,ramp);
xlabel('samples----')
ylabel('Magnitude')
title('unit ramp');
Ramp signal using for loop
• for n = -4:4
• if n>= 0
• stem(n,n);
• hold on;
• else
• stem(1,0);
• hold on
• end
• end
Generate continuous time sinusoidal signal,
Discrete time cosine signal
clc;
close all;
clear all;
t=0:.01:pi;
y= sin(2*pi*t);
plot(t,y);
ylabel('amp...');
xlabel(‘samples...');
title('sin signal')
Assignment
Q1. Define and Compare C.T.S & D.T.S
Q.2 write a program to generate exponential and cosine signal.
Q.3. Write a program to scale, shift and inversion of various basic signals.
Q.4 write a matlab program to find the current values in the given circuit.
V1 = 20 V V2 = 12 V3 = 40
R1 = 18 R2 = 10 R3 = 16
R3 = 6 R5 = 15 R6 = 8
R7 = 12 R8 = 14
Q.5 Define Stem, Plot, Plot3,fplot, ezplot, linspace, grid,mesh and legend
DSP_EXP.pptx

More Related Content

Similar to DSP_EXP.pptx (20)

Dsp manual
Dsp manualDsp manual
Dsp manual
 
Fourier series example
Fourier series exampleFourier series example
Fourier series example
 
DSP LAB COMPLETE CODES.docx
DSP LAB COMPLETE CODES.docxDSP LAB COMPLETE CODES.docx
DSP LAB COMPLETE CODES.docx
 
Adaptive signal processing simon haykins
Adaptive signal processing simon haykinsAdaptive signal processing simon haykins
Adaptive signal processing simon haykins
 
Dsp iit workshop
Dsp iit workshopDsp iit workshop
Dsp iit workshop
 
BS LAB Manual (1).pdf
BS LAB Manual  (1).pdfBS LAB Manual  (1).pdf
BS LAB Manual (1).pdf
 
Ecg programa simulado
Ecg programa simuladoEcg programa simulado
Ecg programa simulado
 
Mat lab
Mat labMat lab
Mat lab
 
Dsp Lab Record
Dsp Lab RecordDsp Lab Record
Dsp Lab Record
 
Ecg
EcgEcg
Ecg
 
Matlab 2
Matlab 2Matlab 2
Matlab 2
 
Csci101 lect06 advanced_looping
Csci101 lect06 advanced_loopingCsci101 lect06 advanced_looping
Csci101 lect06 advanced_looping
 
Matlab plotting
Matlab plottingMatlab plotting
Matlab plotting
 
Informe laboratorio n°1
Informe laboratorio n°1Informe laboratorio n°1
Informe laboratorio n°1
 
Modulation techniques matlab_code
Modulation techniques matlab_codeModulation techniques matlab_code
Modulation techniques matlab_code
 
Dsp 1recordprophess-140720055832-phpapp01
Dsp 1recordprophess-140720055832-phpapp01Dsp 1recordprophess-140720055832-phpapp01
Dsp 1recordprophess-140720055832-phpapp01
 
Digital Signal Processing Lab Manual ECE students
Digital Signal Processing Lab Manual ECE studentsDigital Signal Processing Lab Manual ECE students
Digital Signal Processing Lab Manual ECE students
 
MATLAB CODE OF Shifting sequence
MATLAB  CODE  OF Shifting sequenceMATLAB  CODE  OF Shifting sequence
MATLAB CODE OF Shifting sequence
 
Exam 6 commlab 18_119_ei0292
Exam 6 commlab 18_119_ei0292Exam 6 commlab 18_119_ei0292
Exam 6 commlab 18_119_ei0292
 
bask, bfsk, bpsk
bask, bfsk, bpskbask, bfsk, bpsk
bask, bfsk, bpsk
 

Recently uploaded

Raashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashidFaiyazSheikh
 
Developing a smart system for infant incubators using the internet of things ...
Developing a smart system for infant incubators using the internet of things ...Developing a smart system for infant incubators using the internet of things ...
Developing a smart system for infant incubators using the internet of things ...IJECEIAES
 
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Tools
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and ToolsMaximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Tools
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Toolssoginsider
 
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxSLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxCHAIRMAN M
 
Basics of Relay for Engineering Students
Basics of Relay for Engineering StudentsBasics of Relay for Engineering Students
Basics of Relay for Engineering Studentskannan348865
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxMustafa Ahmed
 
Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualBalamuruganV28
 
Intro to Design (for Engineers) at Sydney Uni
Intro to Design (for Engineers) at Sydney UniIntro to Design (for Engineers) at Sydney Uni
Intro to Design (for Engineers) at Sydney UniR. Sosa
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxMustafa Ahmed
 
15-Minute City: A Completely New Horizon
15-Minute City: A Completely New Horizon15-Minute City: A Completely New Horizon
15-Minute City: A Completely New HorizonMorshed Ahmed Rahath
 
CLOUD COMPUTING SERVICES - Cloud Reference Modal
CLOUD COMPUTING SERVICES - Cloud Reference ModalCLOUD COMPUTING SERVICES - Cloud Reference Modal
CLOUD COMPUTING SERVICES - Cloud Reference ModalSwarnaSLcse
 
Independent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging StationIndependent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging Stationsiddharthteach18
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxkalpana413121
 
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisSeismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisDr.Costas Sachpazis
 
Seizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networksSeizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networksIJECEIAES
 
handbook on reinforce concrete and detailing
handbook on reinforce concrete and detailinghandbook on reinforce concrete and detailing
handbook on reinforce concrete and detailingAshishSingh1301
 
Interfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdfInterfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdfragupathi90
 
Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1T.D. Shashikala
 
Dynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxDynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxMustafa Ahmed
 
Circuit Breakers for Engineering Students
Circuit Breakers for Engineering StudentsCircuit Breakers for Engineering Students
Circuit Breakers for Engineering Studentskannan348865
 

Recently uploaded (20)

Raashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashid final report on Embedded Systems
Raashid final report on Embedded Systems
 
Developing a smart system for infant incubators using the internet of things ...
Developing a smart system for infant incubators using the internet of things ...Developing a smart system for infant incubators using the internet of things ...
Developing a smart system for infant incubators using the internet of things ...
 
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Tools
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and ToolsMaximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Tools
Maximizing Incident Investigation Efficacy in Oil & Gas: Techniques and Tools
 
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxSLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
 
Basics of Relay for Engineering Students
Basics of Relay for Engineering StudentsBasics of Relay for Engineering Students
Basics of Relay for Engineering Students
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptx
 
Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manual
 
Intro to Design (for Engineers) at Sydney Uni
Intro to Design (for Engineers) at Sydney UniIntro to Design (for Engineers) at Sydney Uni
Intro to Design (for Engineers) at Sydney Uni
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptx
 
15-Minute City: A Completely New Horizon
15-Minute City: A Completely New Horizon15-Minute City: A Completely New Horizon
15-Minute City: A Completely New Horizon
 
CLOUD COMPUTING SERVICES - Cloud Reference Modal
CLOUD COMPUTING SERVICES - Cloud Reference ModalCLOUD COMPUTING SERVICES - Cloud Reference Modal
CLOUD COMPUTING SERVICES - Cloud Reference Modal
 
Independent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging StationIndependent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging Station
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptx
 
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisSeismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
 
Seizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networksSeizure stage detection of epileptic seizure using convolutional neural networks
Seizure stage detection of epileptic seizure using convolutional neural networks
 
handbook on reinforce concrete and detailing
handbook on reinforce concrete and detailinghandbook on reinforce concrete and detailing
handbook on reinforce concrete and detailing
 
Interfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdfInterfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdf
 
Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1
 
Dynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxDynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptx
 
Circuit Breakers for Engineering Students
Circuit Breakers for Engineering StudentsCircuit Breakers for Engineering Students
Circuit Breakers for Engineering Students
 

DSP_EXP.pptx

  • 2. GENERATION OF BASIC SIGNALS (a). Program for the generation of UNIT impulse signal clc; close all; clear all; t=-2:1:2; % defining time axis and samples y=[zeros(1,2),ones(1,1),zeros(1,2)] %defining magnitude at different samples stem(t,y); %plot discrete signal xlabel('samples----') Ylabel(‘magnitude’) % assigning labels to x and y axis title('unit impulse'); %giving title
  • 3. n = [-5:5]; imp = zeros(1,length(n)); imp(n==0) = 1; stem(n,imp) %plot discrete signal axis([-5 5 -2 2]) xlabel('samples----') Ylabel(‘magnitude’) % assigning labels to x and y axis title('unit impulse');
  • 4. (b) Program for the generation of UNIT step signal clc; close all; clear all; n=input('enter the n value = '); t=0:1:n-1; y= ones(1,n); stem(t,y); axis([-5 5 -5 5]) xlabel('samples----') ylabel('Magnitude') title('unit step')
  • 5. (b) Program for the generation of UNIT step signal clc; close all; clear all; n=[-5:5]; ramp = (n>=0).*n; stem(n,ramp); xlabel('samples----') ylabel('Magnitude') title('unit ramp');
  • 6. Ramp signal using for loop • for n = -4:4 • if n>= 0 • stem(n,n); • hold on; • else • stem(1,0); • hold on • end • end
  • 7. Generate continuous time sinusoidal signal, Discrete time cosine signal clc; close all; clear all; t=0:.01:pi; y= sin(2*pi*t); plot(t,y); ylabel('amp...'); xlabel(‘samples...'); title('sin signal')
  • 8. Assignment Q1. Define and Compare C.T.S & D.T.S Q.2 write a program to generate exponential and cosine signal. Q.3. Write a program to scale, shift and inversion of various basic signals. Q.4 write a matlab program to find the current values in the given circuit. V1 = 20 V V2 = 12 V3 = 40 R1 = 18 R2 = 10 R3 = 16 R3 = 6 R5 = 15 R6 = 8 R7 = 12 R8 = 14 Q.5 Define Stem, Plot, Plot3,fplot, ezplot, linspace, grid,mesh and legend