Skip to main content

MATLAB TUTORIALS-3

TO PLOT DIFFERENT TYPES OF THE FINITE SEQUENCE SIGNAL IN MATLAB:

TYPES OF SEQUENCES
We use several elementary sequences in digital signal processing for analysis
purposes. Their definitions and MATLAB representations follow.


1. Unit sample sequence:

In MATLAB the function zeros(1,N) generates a row vector of N
zeros, which can be used to implement δ(n) over a finite interval. However,
the logical relation n==0 is an elegant way of implementing δ(n).
For example, to implement

over the n1 ≤n0 ≤n2 interval, we will use the following MATLAB
function

used the following code to generate the delta function in the MATLAB.

function [x,n] = impseq(n0,n1,n2)

% Generates x(n) = delta(n-n0); n1 <= n <= n2
% ----------------------------------------------
% [x,n] = impseq(n0,n1,n2)
%
n = [n1:n2]; x = [(n-n0) == 0];
stem(n,x);

2. Unit step sequence:

In MATLAB the function ones(1,N) generates a row vector of N ones.
It can be used to generate u(n) over a finite interval. Once again an
elegant approach is to use the logical relation n>=0. To implement

over the n1 ≤n0 ≤n2 interval, we will use the following MATLAB
function.

function [x,n] = stepseq(n0,n1,n2)
% Generates x(n) = u(n-n0); n1 <= n <= n2
% ------------------------------------------
% [x,n] = stepseq(n0,n1,n2)
%
n = [n1:n2]; x = [(n-n0) >= 0];

stem(n,x);

Comments

Popular posts from this blog

Application Engineer- Prototyping at Siemens India

  Hello, Dear Readers, Siemens India has a vacancy for the Application Engineer role. Siemens EDA is a global technology leader in Electronic Design Automation software. Our software tools enable companies around the world to develop highly innovative electronic products faster and more cost-effectively. Our customers use our tools to push the boundaries of technology and physics to deliver better products in the increasingly complex world of chip, board, and system design. This role is based in Bengaluru. But you’ll also get to visit other locations in India and globe, so you’ll need to go where this job takes you. In return, you’ll get the chance to work with teams impacting entire cities, countries, and the shape of things to come We make real what matters! This is your role: Deploy Siemens EDA ProFPGA prototyping software and hardware solutions at customers and guide the customers to successful design bring-up Work closely with R&D to solve problems, review product spe...

Tutorial on EasyEDA desktop software for PCB and schematic design

In this article, I am going to write a tutorial on how to use EasyEDA desktop application for creating a schematic and for PCB design. One of best advantage of this software is that you can create design offline and can automatically synchronize your design with your online EasyEDA account.  It can be used for circuits simulation, PCB deign and electronics circuits design. You can download EasyEDA desktop application by clicking on following link and it will work on windows 7 or its greater version. They are also releasing soon offline application OSX and Linux users. So keep visiting their website for more information.                                                    https://easyeda.com/page/download So let’s start and see how to design a schematic and PCB using EasyEDA offline desktop application. So first of all lets see how to create a schema...

CMOS OPAMP Design Using LTspice

  Hello Dear Reader, Here in this post, I will give an idea about how CMOS OPAMP designing using 180nm technology node and using LTspice. from that opamp I have design switched capacitor integrator. Design Specifications: Here Design specification may be changed according to the application here my target is to design an active lowpass filter so I have chosen an opamp integrator so in the below I have explained how to design an opamp as well as an integrator in a 180nm technology node in LTspice. So let's start design First, we need a technology parameter file so that the file we can insert in the LTspice, in my example it is 180nm so mostly it is available from the  http://ptm.asu.edu/latest.html  and you make one text file using notepad or whatever is fit on your own. Then go to the LTspice and new schematic and then you see .op on the right most upper side click on it and give your text file path after .include  as shown in the below images.  Now first of all...