SlideShare a Scribd company logo
% MATLAB CODE for folding of sequence
close all;
clear all;
clc;
p=input('enter the value of p');
q=input('enter the value of q');
n=-p:q;
xn=input ('enter the sequence x(n) of length p+q+1');
subplot(211)
stem(n,xn)
xlabel('---->n');
ylabel(' input sequence x(n)');
title('plot of x(n)');
grid on;
subplot(212)
stem(-n,xn);
xlabel('---->n');
After running the program put the value of p, q , sequence x(n) like below
enter the value of p3
enter the value of q 2
enter the sequence x(n) of length p+q+1 [ 1 2 3 4 5 6]
matlab code of shifting and folding of two sequences

More Related Content

PPTX
Sampling theorem
PPTX
Discrete Fourier Transform
PDF
Lti system
PPTX
SIGNAL CHARACTERISTICS
PPTX
Coherent and Non-coherent detection of ASK, FSK AND QASK
DOCX
Programmable logic array
PPT
Digital signal processing part2
PPTX
Pn sequence
Sampling theorem
Discrete Fourier Transform
Lti system
SIGNAL CHARACTERISTICS
Coherent and Non-coherent detection of ASK, FSK AND QASK
Programmable logic array
Digital signal processing part2
Pn sequence

What's hot (20)

PPT
OPERATIONS ON SIGNALS
PPTX
Flipflop
PPTX
Overview of sampling
PPTX
Vlsi stick daigram (JCE)
PPTX
Runge Kutta Method
PDF
quantization
PPTX
Digital communication system
PPT
Digital Communication: Information Theory
PPT
Digital logic design part1
PPTX
Demultiplexer
PDF
1.introduction to signals
PDF
Karnaugh map
DOC
Digital Signal Processing Lab Manual
PDF
MATLAB CODE OF Shifting sequence
PDF
Vlsi design
PPT
Z transfrm ppt
PPTX
Parity Generator and Parity Checker
PDF
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
DOCX
Lambda design rule
PDF
Asynchronous sequential circuit analysis
OPERATIONS ON SIGNALS
Flipflop
Overview of sampling
Vlsi stick daigram (JCE)
Runge Kutta Method
quantization
Digital communication system
Digital Communication: Information Theory
Digital logic design part1
Demultiplexer
1.introduction to signals
Karnaugh map
Digital Signal Processing Lab Manual
MATLAB CODE OF Shifting sequence
Vlsi design
Z transfrm ppt
Parity Generator and Parity Checker
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
Lambda design rule
Asynchronous sequential circuit analysis
Ad

More from Rakesh kumar jha (10)

PDF
Matlab implementation of fast fourier transform
PDF
Verilog coding of demux 8 x1
PDF
Verilog coding of mux 8 x1
PDF
Verilog code for decoder
PDF
VERILOG CODE FOR Adder
PDF
verilog code for logic gates
PDF
Reversible code converter
PPTX
Pin diode
PPTX
Schottky diode
Matlab implementation of fast fourier transform
Verilog coding of demux 8 x1
Verilog coding of mux 8 x1
Verilog code for decoder
VERILOG CODE FOR Adder
verilog code for logic gates
Reversible code converter
Pin diode
Schottky diode
Ad

Recently uploaded (20)

PPTX
Construction Project Organization Group 2.pptx
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
Geodesy 1.pptx...............................................
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
Welding lecture in detail for understanding
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
OOP with Java - Java Introduction (Basics)
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
web development for engineering and engineering
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPTX
Sustainable Sites - Green Building Construction
Construction Project Organization Group 2.pptx
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
UNIT-1 - COAL BASED THERMAL POWER PLANTS
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Automation-in-Manufacturing-Chapter-Introduction.pdf
Geodesy 1.pptx...............................................
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
CYBER-CRIMES AND SECURITY A guide to understanding
Welding lecture in detail for understanding
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
OOP with Java - Java Introduction (Basics)
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
web development for engineering and engineering
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Sustainable Sites - Green Building Construction

matlab code of shifting and folding of two sequences

  • 1. % MATLAB CODE for folding of sequence close all; clear all; clc; p=input('enter the value of p'); q=input('enter the value of q'); n=-p:q; xn=input ('enter the sequence x(n) of length p+q+1'); subplot(211) stem(n,xn) xlabel('---->n'); ylabel(' input sequence x(n)'); title('plot of x(n)'); grid on; subplot(212) stem(-n,xn); xlabel('---->n'); After running the program put the value of p, q , sequence x(n) like below enter the value of p3 enter the value of q 2 enter the sequence x(n) of length p+q+1 [ 1 2 3 4 5 6]