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

Electronic Engineer at Thinture Technologies Pvt. Ltd

Hello Dear Readers, Currently, at Thinture Technologies Pvt. Ltd vacancy for Electronic Engineer role. Thinture Technologies Pvt. Ltd. is a vehicle control systems manufacturer, with a primary focus on road speed limitation and GPS-based tracking systems. All of our products are designed in-house from basic circuit designing to firmware, algorithm to PCB designing, online software platforms to mechanical assembly drawings, and standard operating procedures for aftermarket usage. Role Description: This is a full-time on-site role for an Electronic Engineer located in Bengaluru. The Electronic Engineer will be responsible for the day-to-day tasks associated with electronic engineering, including electronics, electrical engineering, circuit design, testing, and more. Qualifications: Strong electronic engineering skills Sound knowledge of circuit design and electrical engineering Experience with electronics testing and quality assurance Proficient in using software tools for schem...

Design Engineer at Infineon Bangalore

  Hello Dear Readers, Currently at Infineon Bangalore vacancy for the Design Engineer role. Design analog and mixed-signal modules in CMOS and Smart PowerTechnologies, with a particular focus on achieving high-efficiency power conversion for applications using GaN devices; In your new role you will: Design analog and mixed-signal modules  in CMOS and Smart PowerTechnologies, with a particular focus on achieving high-efficiency power conversion for applications using GaN devices; Design and verify pre-silicon analog/mixed-signal integrated circuit blocks, including incorporating features for testing and quality assurance, and providing support for top-level integration; Assist in defining the requirements  for analog and mixed-signal blocks,aligning them with IP Module architecture, and ensuring compliance with requirements through documentation; Estimate effort and planning design work packages to meet project milestones; Provide essential support to physical design ...

R&D Intern (Electronics Engineering) at Greaves Electric Mobility

Hello Dear Readers, Currently, at Greaves Electric Mobility vacancy for an R&D Intern (Electronics Engineering) role. At Greaves Electric Mobility, we build products and solutions that are designed to democratize smart and sustainable mobility and do our bit to heal the Planet. Backed by the 164 year engineering legacy of Greaves, our portfolio of electric two and three wheelers are made in India at manufacturing sites across Tamil Nadu, Telangana and Uttar Pradesh. Key Responsibilities: Collaborate with experienced engineers in the research and development of electric mobility technologies. Participate in the design, prototyping, and testing of electronic and electrical systems for electric vehicles. Contribute to the analysis and improvement of automotive electrical systems, ensuring compliance with industry standards. Assist in troubleshooting and problem-solving activities related to electric vehicle components. Stay updated on the latest advancements in the electric mobili...