SlideShare a Scribd company logo
2
Most read
Experiment No: - 02
Aim: Make two different function one for Linear Convolution and
second for Circular Convolution, which are able to performer same
operation as inbuilt functions/command "conv" and "cconv"
respectively.
PROCEDURE:-
Linear Convolution
Open MATLAB
Open new M-file
Type the program
Save in current directory
Compile and Run the program
For the output see command window Figure window
Step 1.Take input signals x[n] and h[n] as vectors.
Step 2. Compute length of the input signals (x and h) and
convoluted signal(y), and store it in m, n and L respectively.
Step 3.Use for loop to compute samples of y from 1 to L.( Used the
required expression)
Step 4.Plot/stem vector y as it is convolution of x and h.
Step 5.Manage and label the x-axes in proper range.
Step 6.Generalized this function for any value of x and h.
PROGRAM:-
function[y]=shyamconv(x,h)
m=length(x)
l=length(h)
n=m+l-1
for t=1:n
y(t)=0
for k=max(1,t-(m-1)):min(t,m)
y(t)=y(t)+x(k).*h(t-k+1)
end
end
stem(y)
conv(x,h)
End
RESULTS:- Thus the MATLAB program for linear convolution
using function declaration in MATLAB was performed and the
output was verified.
OUTPUT:

More Related Content

What's hot (20)

PPTX
Mf formulation and parameterization
ArunaDevi63
 
PPTX
Fir filter design (windowing technique)
Bin Biny Bino
 
PPT
transmission-line-and-waveguide-ppt
ATTO RATHORE
 
PPTX
Design of Filters PPT
Imtiyaz Rashed
 
PDF
Task communication
1jayanti
 
PDF
Cmos testing
Rajani Kumar Reddy
 
PPT
Matched filter
srkrishna341
 
PDF
Discrete Fourier Series | Discrete Fourier Transform | Discrete Time Fourier ...
Mehran University Of Engineering and Technology, Pakistan
 
PDF
quantization
aniruddh Tyagi
 
PDF
Smith chart basics
Mahamed Gamal
 
PPTX
Wavelet Transform and DSP Applications
University of Technology - Iraq
 
PPT
OPERATIONS ON SIGNALS
vishalgohel12195
 
PDF
Frequency Domain FIltering.pdf
Muhammad_Ilham_21
 
PPTX
Convolution Codes
Pratishtha Ram
 
PDF
Diversity Techniques in Wireless Communication
Sahar Foroughi
 
PPTX
Line coding
Rina Ahire
 
PDF
Multiple Access Techniques
International Islamic University Chittagong
 
PPTX
Double SideBand Suppressed Carrier (DSB-SC)
Muhammad Ridwanul Hoque
 
PDF
DFT and IDFT Matlab Code
Bharti Airtel Ltd.
 
PDF
Circular convolution Using DFT Matlab Code
Bharti Airtel Ltd.
 
Mf formulation and parameterization
ArunaDevi63
 
Fir filter design (windowing technique)
Bin Biny Bino
 
transmission-line-and-waveguide-ppt
ATTO RATHORE
 
Design of Filters PPT
Imtiyaz Rashed
 
Task communication
1jayanti
 
Cmos testing
Rajani Kumar Reddy
 
Matched filter
srkrishna341
 
Discrete Fourier Series | Discrete Fourier Transform | Discrete Time Fourier ...
Mehran University Of Engineering and Technology, Pakistan
 
quantization
aniruddh Tyagi
 
Smith chart basics
Mahamed Gamal
 
Wavelet Transform and DSP Applications
University of Technology - Iraq
 
OPERATIONS ON SIGNALS
vishalgohel12195
 
Frequency Domain FIltering.pdf
Muhammad_Ilham_21
 
Convolution Codes
Pratishtha Ram
 
Diversity Techniques in Wireless Communication
Sahar Foroughi
 
Line coding
Rina Ahire
 
Double SideBand Suppressed Carrier (DSB-SC)
Muhammad Ridwanul Hoque
 
DFT and IDFT Matlab Code
Bharti Airtel Ltd.
 
Circular convolution Using DFT Matlab Code
Bharti Airtel Ltd.
 

Viewers also liked (20)

DOC
Digital Signal Processing Lab Manual ECE students
UR11EC098
 
PDF
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
Ravikiran A
 
PPT
Website designing company in delhi ncr
Css Founder
 
PDF
Dsp lab _eec-652__vi_sem_18012013
Kurmendra Singh
 
PDF
Analog communication notes
shobhan pujari
 
PPSX
Chapter 2 signals and spectra,
nahrain university
 
PDF
Lti system(akept)
Fariza Zahari
 
PDF
Analog communication notes
Shobhan Pujari
 
PDF
Digital signal processing computer based approach - sanjit k. mitra (2nd ed)
Surbhi Maheshwari
 
PDF
Lti system
Fariza Zahari
 
PDF
Signal Prosessing Lab Mannual
Jitendra Jangid
 
PDF
Digital signal processing by j.s. katre (tech max)
Ritesh Raushan
 
PDF
Dsp manual completed2
bilawalali74
 
PPT
Digital Filters Part 1
Premier Farnell
 
PPT
Fir and iir filter_design
shrinivasgnaik
 
DOCX
Convolution
sridharbommu
 
PPTX
Butterworth filter design
Sushant Shankar
 
PPTX
Digital Signal Processors - DSP's
Hicham Berkouk
 
PDF
Implementation of Digital Filters
op205
 
PDF
Introduction to Digital Signal Processing
op205
 
Digital Signal Processing Lab Manual ECE students
UR11EC098
 
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
Ravikiran A
 
Website designing company in delhi ncr
Css Founder
 
Dsp lab _eec-652__vi_sem_18012013
Kurmendra Singh
 
Analog communication notes
shobhan pujari
 
Chapter 2 signals and spectra,
nahrain university
 
Lti system(akept)
Fariza Zahari
 
Analog communication notes
Shobhan Pujari
 
Digital signal processing computer based approach - sanjit k. mitra (2nd ed)
Surbhi Maheshwari
 
Lti system
Fariza Zahari
 
Signal Prosessing Lab Mannual
Jitendra Jangid
 
Digital signal processing by j.s. katre (tech max)
Ritesh Raushan
 
Dsp manual completed2
bilawalali74
 
Digital Filters Part 1
Premier Farnell
 
Fir and iir filter_design
shrinivasgnaik
 
Convolution
sridharbommu
 
Butterworth filter design
Sushant Shankar
 
Digital Signal Processors - DSP's
Hicham Berkouk
 
Implementation of Digital Filters
op205
 
Introduction to Digital Signal Processing
op205
 
Ad

Similar to Linear Convolution using Matlab Code (20)

PDF
Mlab i
Harsh Kumar
 
PDF
Dsp file
Rakesh Thakur
 
PPTX
Lecture09 SVM Intro, Kernel Trick (updated).pptx
DrMTayyabChaudhry1
 
PDF
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
RajJain516913
 
DOCX
Mmc manual
Urvi Surat
 
DOCX
Signals And Systems Lab Manual, R18 Batch
Amairullah Khan Lodhi
 
DOC
Digital Signal Processing Lab Manual
Amairullah Khan Lodhi
 
DOCX
DSP_Lab_MAnual_-_Final_Edition[1].docx
ParthDoshi66
 
PDF
DSP_Lab_MAnual_-_Final_Edition.pdf
ParthDoshi66
 
PDF
Ee343 signals and systems - lab 1 - loren schwappach
Loren Schwappach
 
PDF
BS LAB Manual (1).pdf
ssuser476810
 
KEY
U Xml Defense presentation
ksp4186
 
DOCX
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
anhlodge
 
PPTX
Analysing simple pendulum using matlab
Akshay Mistri
 
DOCX
Dsp file
Sourabh Bhattacharya
 
DOC
Dsp 1recordprophess-140720055832-phpapp01
Sagar Gore
 
PPT
Secrets of supercomputing
fikrul islamy
 
PPT
Secrets of supercomputing
fikrul islamy
 
PPTX
Lecture one
Mahmoud Hussein
 
Mlab i
Harsh Kumar
 
Dsp file
Rakesh Thakur
 
Lecture09 SVM Intro, Kernel Trick (updated).pptx
DrMTayyabChaudhry1
 
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
RajJain516913
 
Mmc manual
Urvi Surat
 
Signals And Systems Lab Manual, R18 Batch
Amairullah Khan Lodhi
 
Digital Signal Processing Lab Manual
Amairullah Khan Lodhi
 
DSP_Lab_MAnual_-_Final_Edition[1].docx
ParthDoshi66
 
DSP_Lab_MAnual_-_Final_Edition.pdf
ParthDoshi66
 
Ee343 signals and systems - lab 1 - loren schwappach
Loren Schwappach
 
BS LAB Manual (1).pdf
ssuser476810
 
U Xml Defense presentation
ksp4186
 
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
anhlodge
 
Analysing simple pendulum using matlab
Akshay Mistri
 
Dsp 1recordprophess-140720055832-phpapp01
Sagar Gore
 
Secrets of supercomputing
fikrul islamy
 
Secrets of supercomputing
fikrul islamy
 
Lecture one
Mahmoud Hussein
 
Ad

More from Bharti Airtel Ltd. (20)

PDF
Resume Shyamveer
Bharti Airtel Ltd.
 
DOC
BHEL Final Report
Bharti Airtel Ltd.
 
PPT
BHEL PPT
Bharti Airtel Ltd.
 
PDF
Amplitude modulated-systmes
Bharti Airtel Ltd.
 
PDF
Amplitude modulated-systems
Bharti Airtel Ltd.
 
PDF
Mcq5 ac-fet-amplifiers
Bharti Airtel Ltd.
 
PDF
Mcq6 ac-mosfet-amplifier
Bharti Airtel Ltd.
 
PDF
C bjt-biasing-and-stabilization
Bharti Airtel Ltd.
 
PDF
Mcq6 ac-mosfet-amplifier
Bharti Airtel Ltd.
 
PDF
Mcq4 ac-operational-amplifiers
Bharti Airtel Ltd.
 
PDF
Logic gates-notesdc-iii
Bharti Airtel Ltd.
 
PDF
C bjt-biasing-and-stabilization
Bharti Airtel Ltd.
 
PDF
B bjt-characteristics
Bharti Airtel Ltd.
 
PDF
A bjt-operating-modes-configurations
Bharti Airtel Ltd.
 
PDF
Resume shyam final
Bharti Airtel Ltd.
 
PDF
Noise detection from the signal matlab code, Signal Diagnosis
Bharti Airtel Ltd.
 
PDF
Sequence detector Verilog Code
Bharti Airtel Ltd.
 
PDF
Divine inspiration
Bharti Airtel Ltd.
 
PDF
To designing counters using verilog code
Bharti Airtel Ltd.
 
PDF
Verilog VHDL code Multiplexer and De Multiplexer
Bharti Airtel Ltd.
 
Resume Shyamveer
Bharti Airtel Ltd.
 
BHEL Final Report
Bharti Airtel Ltd.
 
Amplitude modulated-systmes
Bharti Airtel Ltd.
 
Amplitude modulated-systems
Bharti Airtel Ltd.
 
Mcq5 ac-fet-amplifiers
Bharti Airtel Ltd.
 
Mcq6 ac-mosfet-amplifier
Bharti Airtel Ltd.
 
C bjt-biasing-and-stabilization
Bharti Airtel Ltd.
 
Mcq6 ac-mosfet-amplifier
Bharti Airtel Ltd.
 
Mcq4 ac-operational-amplifiers
Bharti Airtel Ltd.
 
Logic gates-notesdc-iii
Bharti Airtel Ltd.
 
C bjt-biasing-and-stabilization
Bharti Airtel Ltd.
 
B bjt-characteristics
Bharti Airtel Ltd.
 
A bjt-operating-modes-configurations
Bharti Airtel Ltd.
 
Resume shyam final
Bharti Airtel Ltd.
 
Noise detection from the signal matlab code, Signal Diagnosis
Bharti Airtel Ltd.
 
Sequence detector Verilog Code
Bharti Airtel Ltd.
 
Divine inspiration
Bharti Airtel Ltd.
 
To designing counters using verilog code
Bharti Airtel Ltd.
 
Verilog VHDL code Multiplexer and De Multiplexer
Bharti Airtel Ltd.
 

Recently uploaded (20)

PPTX
Arduino Based Gas Leakage Detector Project
CircuitDigest
 
PPTX
MATLAB : Introduction , Features , Display Windows, Syntax, Operators, Graph...
Amity University, Patna
 
PPTX
Evaluation and thermal analysis of shell and tube heat exchanger as per requi...
shahveer210504
 
DOCX
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
PDF
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
PPTX
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 
PDF
Electrical Engineer operation Supervisor
ssaruntatapower143
 
PDF
PORTFOLIO Golam Kibria Khan — architect with a passion for thoughtful design...
MasumKhan59
 
PPT
PPT2_Metal formingMECHANICALENGINEEIRNG .ppt
Praveen Kumar
 
PPTX
Thermal runway and thermal stability.pptx
godow93766
 
PPT
Carmon_Remote Sensing GIS by Mahesh kumar
DhananjayM6
 
PDF
Basic_Concepts_in_Clinical_Biochemistry_2018كيمياء_عملي.pdf
AdelLoin
 
PPTX
2025 CGI Congres - Surviving agile v05.pptx
Derk-Jan de Grood
 
PDF
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
PDF
Water Industry Process Automation & Control Monthly July 2025
Water Industry Process Automation & Control
 
PDF
Zilliz Cloud Demo for performance and scale
Zilliz
 
PPTX
Product Development & DevelopmentLecture02.pptx
zeeshanwazir2
 
PPTX
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
PPTX
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
PPTX
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
Arduino Based Gas Leakage Detector Project
CircuitDigest
 
MATLAB : Introduction , Features , Display Windows, Syntax, Operators, Graph...
Amity University, Patna
 
Evaluation and thermal analysis of shell and tube heat exchanger as per requi...
shahveer210504
 
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 
Electrical Engineer operation Supervisor
ssaruntatapower143
 
PORTFOLIO Golam Kibria Khan — architect with a passion for thoughtful design...
MasumKhan59
 
PPT2_Metal formingMECHANICALENGINEEIRNG .ppt
Praveen Kumar
 
Thermal runway and thermal stability.pptx
godow93766
 
Carmon_Remote Sensing GIS by Mahesh kumar
DhananjayM6
 
Basic_Concepts_in_Clinical_Biochemistry_2018كيمياء_عملي.pdf
AdelLoin
 
2025 CGI Congres - Surviving agile v05.pptx
Derk-Jan de Grood
 
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
Water Industry Process Automation & Control Monthly July 2025
Water Industry Process Automation & Control
 
Zilliz Cloud Demo for performance and scale
Zilliz
 
Product Development & DevelopmentLecture02.pptx
zeeshanwazir2
 
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 

Linear Convolution using Matlab Code

  • 1. Experiment No: - 02 Aim: Make two different function one for Linear Convolution and second for Circular Convolution, which are able to performer same operation as inbuilt functions/command "conv" and "cconv" respectively. PROCEDURE:- Linear Convolution Open MATLAB Open new M-file Type the program Save in current directory Compile and Run the program For the output see command window Figure window Step 1.Take input signals x[n] and h[n] as vectors. Step 2. Compute length of the input signals (x and h) and convoluted signal(y), and store it in m, n and L respectively. Step 3.Use for loop to compute samples of y from 1 to L.( Used the required expression) Step 4.Plot/stem vector y as it is convolution of x and h. Step 5.Manage and label the x-axes in proper range. Step 6.Generalized this function for any value of x and h. PROGRAM:- function[y]=shyamconv(x,h) m=length(x) l=length(h)
  • 2. n=m+l-1 for t=1:n y(t)=0 for k=max(1,t-(m-1)):min(t,m) y(t)=y(t)+x(k).*h(t-k+1) end end stem(y) conv(x,h) End RESULTS:- Thus the MATLAB program for linear convolution using function declaration in MATLAB was performed and the output was verified. OUTPUT: