Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
thumb_up100%
Write the code using Matlab
Expert Solution
arrow_forward
Step 1
Matlab code:
(a)
n = 0:1:20;
x_n = ((0.8).^n).*(n>=0);
y_n = [1 0];
k = 3;
for i=0:20
if i == 0
y_n(k) = 2*x_n(i+1) + 4 - 0.5*y_n(k-1) - y_n(k-2);
else
y_n(k) = 2*x_n(i+1) - 4*x_n(i) - 0.5*y_n(k-1) - y_n(k-2);
end
k = k+1;
end
stem(y_n)
title("Y[n] with initial conditions # 0")
disp(y_n)
Values :
y[n] = [1.0000 0 5.0000 -4.9000 -4.4700 5.5990 0.4417 -6.8029 2.1733 5.0871 -5.2202 -2.8797 6.3379 -0.5470 -6.2705 3.5173 4.3799 -5.8129 -1.5580 6.5243 -1.7582 -5.6884 4.5678]
Output:
Step by stepSolved in 2 steps with 2 images
Knowledge Booster
Similar questions
- Matlab Question Use a random number generator to produce the number (2340) uniformly distributed with a mean of 10, a minimumof 3, and a maximum of 21. Obtain the mean and the histogram of these numbers, and discuss (use the comments) whether they appear uniformly distibuted the desired mean.arrow_forwardUse matlabarrow_forwardIn this problem, you are asked to write a single MATLAB code that displays the value for 100*π in a few different formatsarrow_forward
- MATLAB Practice: Using version R2021b MATLAB code which tweaks the following code. close allx = 0: pi/100: 2 * pi;wave1 = sin (x * 3);wave2 = sin (x * 7) + cos (x * 8); plot (x, wave1, 'b-', x, wave2, 'r:');legend ('wave 1', 'wave 2');title ('Some Example Data Waveforms');xlabel ('Angle');ylabel ('Amplitude'); a. Use subplot(3,1,x)b. Draw “wave1” with stem function in subplot(3,1,1) with xlabel, ylabel and legendc. Draw “wave2” with stem function in subplot(3,1,2) with xlabel, ylabel and legendd. Draw “wave1” and “wave2” with stem function in subplot(3,1,3) with xlabel, ylabel, legend and title.arrow_forwardQ2: Write a Matlab Program to print out the multiplication table (1-12) (using loops)arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education