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

PDF
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
PPTX
Wavelength division multiplexing
PPT
PPT
Discrete Fourier Transform
PPT
Decimation in time and frequency
PPTX
Amplitude Modulation ppt
PPTX
Hybrid model for Transistor, small signal Analysis
PPT
Time Domain and Frequency Domain
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
Wavelength division multiplexing
Discrete Fourier Transform
Decimation in time and frequency
Amplitude Modulation ppt
Hybrid model for Transistor, small signal Analysis
Time Domain and Frequency Domain

What's hot (20)

PPTX
Overlap save method and overlap add method in dsp
PPTX
Line coding
PPTX
PPTX
M ary psk modulation
PDF
Diversity Techniques in Wireless Communication
PPTX
M ary psk and m ary qam ppt
PPTX
Cyclic code non systematic
PPT
Introduction to DSP.ppt
PPTX
Dpcm ( Differential Pulse Code Modulation )
PDF
Digital Signal Processing
PPTX
Phase Shift Keying & π/4 -Quadrature Phase Shift Keying
PPTX
J - K & MASTERSLAVE FLIPFLOPS
PPT
PULSE CODE MODULATION (PCM)
PPTX
Digital modulation techniques...
PPTX
PULSE WIDTH MODULATION &DEMODULATION
PPTX
Demodulation of AM wave
PPTX
Pulse Modulation ppt
PPTX
Magnetic hall effect based sensors final
PDF
Lecture Notes on Adaptive Signal Processing-1.pdf
PPTX
Frequency translation
Overlap save method and overlap add method in dsp
Line coding
M ary psk modulation
Diversity Techniques in Wireless Communication
M ary psk and m ary qam ppt
Cyclic code non systematic
Introduction to DSP.ppt
Dpcm ( Differential Pulse Code Modulation )
Digital Signal Processing
Phase Shift Keying & π/4 -Quadrature Phase Shift Keying
J - K & MASTERSLAVE FLIPFLOPS
PULSE CODE MODULATION (PCM)
Digital modulation techniques...
PULSE WIDTH MODULATION &DEMODULATION
Demodulation of AM wave
Pulse Modulation ppt
Magnetic hall effect based sensors final
Lecture Notes on Adaptive Signal Processing-1.pdf
Frequency translation
Ad

Viewers also liked (20)

PDF
DFT and IDFT Matlab Code
DOC
Digital Signal Processing Lab Manual ECE students
PDF
Circular convolution Using DFT Matlab Code
PDF
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
PPT
Website designing company in delhi ncr
PDF
Dsp lab _eec-652__vi_sem_18012013
PDF
Analog communication notes
PPSX
Chapter 2 signals and spectra,
PDF
Lti system(akept)
PDF
Analog communication notes
PDF
Digital signal processing computer based approach - sanjit k. mitra (2nd ed)
PDF
Lti system
PDF
Signal Prosessing Lab Mannual
PDF
Digital signal processing by j.s. katre (tech max)
PDF
Dsp manual completed2
PPT
Digital Filters Part 1
PPT
Fir and iir filter_design
DOCX
Convolution
PPTX
Butterworth filter design
PPTX
Digital Signal Processors - DSP's
DFT and IDFT Matlab Code
Digital Signal Processing Lab Manual ECE students
Circular convolution Using DFT Matlab Code
DSP Lab Manual (10ECL57) - VTU Syllabus (KSSEM)
Website designing company in delhi ncr
Dsp lab _eec-652__vi_sem_18012013
Analog communication notes
Chapter 2 signals and spectra,
Lti system(akept)
Analog communication notes
Digital signal processing computer based approach - sanjit k. mitra (2nd ed)
Lti system
Signal Prosessing Lab Mannual
Digital signal processing by j.s. katre (tech max)
Dsp manual completed2
Digital Filters Part 1
Fir and iir filter_design
Convolution
Butterworth filter design
Digital Signal Processors - DSP's
Ad

Similar to Linear Convolution using Matlab Code (20)

PDF
Mlab i
PDF
Dsp file
PPTX
Lecture09 SVM Intro, Kernel Trick (updated).pptx
PDF
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
DOCX
Mmc manual
DOCX
Signals And Systems Lab Manual, R18 Batch
DOC
Digital Signal Processing Lab Manual
DOCX
DSP_Lab_MAnual_-_Final_Edition[1].docx
PDF
DSP_Lab_MAnual_-_Final_Edition.pdf
PDF
Ee343 signals and systems - lab 1 - loren schwappach
PDF
BS LAB Manual (1).pdf
KEY
U Xml Defense presentation
DOCX
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
PPTX
Analysing simple pendulum using matlab
DOCX
DOC
Dsp 1recordprophess-140720055832-phpapp01
PPT
Secrets of supercomputing
PPT
Secrets of supercomputing
PPTX
Lecture one
Mlab i
Dsp file
Lecture09 SVM Intro, Kernel Trick (updated).pptx
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
Mmc manual
Signals And Systems Lab Manual, R18 Batch
Digital Signal Processing Lab Manual
DSP_Lab_MAnual_-_Final_Edition[1].docx
DSP_Lab_MAnual_-_Final_Edition.pdf
Ee343 signals and systems - lab 1 - loren schwappach
BS LAB Manual (1).pdf
U Xml Defense presentation
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
Analysing simple pendulum using matlab
Dsp 1recordprophess-140720055832-phpapp01
Secrets of supercomputing
Secrets of supercomputing
Lecture one

More from Bharti Airtel Ltd. (20)

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

Recently uploaded (20)

DOCX
573137875-Attendance-Management-System-original
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
Welding lecture in detail for understanding
PDF
Digital Logic Computer Design lecture notes
PDF
Well-logging-methods_new................
PPTX
additive manufacturing of ss316l using mig welding
PPTX
Lecture Notes Electrical Wiring System Components
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
573137875-Attendance-Management-System-original
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Internet of Things (IOT) - A guide to understanding
CH1 Production IntroductoryConcepts.pptx
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
UNIT-1 - COAL BASED THERMAL POWER PLANTS
bas. eng. economics group 4 presentation 1.pptx
CYBER-CRIMES AND SECURITY A guide to understanding
Foundation to blockchain - A guide to Blockchain Tech
OOP with Java - Java Introduction (Basics)
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Welding lecture in detail for understanding
Digital Logic Computer Design lecture notes
Well-logging-methods_new................
additive manufacturing of ss316l using mig welding
Lecture Notes Electrical Wiring System Components
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Operating System & Kernel Study Guide-1 - converted.pdf
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...

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: