% Compute step response for a second-order syste num=1; t=0:0.1:12; zeta2=0.2; den2= [1 zeta1=0.1; den1= [1 2*zeta1 1]; sys1=tf(num, den1); 2*zeta2 1]; sys2=tf(num, den2); zeta3=0.4; den3= [1 2*zeta3 1]; sys3=tf(num, den3); zeta4=0.7; den4= [1 2*zeta4 1]; sys4=tf(num, den4); zeta5=1.0; den5= [1 2*zeta5 1]; sys5=tf(num, den5); zeta6=2.0; den6= [1 2*zeta6 1]; sys6=tf(num, den6);
% Compute step response for a second-order syste num=1; t=0:0.1:12; zeta2=0.2; den2= [1 zeta1=0.1; den1= [1 2*zeta1 1]; sys1=tf(num, den1); 2*zeta2 1]; sys2=tf(num, den2); zeta3=0.4; den3= [1 2*zeta3 1]; sys3=tf(num, den3); zeta4=0.7; den4= [1 2*zeta4 1]; sys4=tf(num, den4); zeta5=1.0; den5= [1 2*zeta5 1]; sys5=tf(num, den5); zeta6=2.0; den6= [1 2*zeta6 1]; sys6=tf(num, den6);
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Can you please explain what every line of code does in this script written in Matlab.
![123456
78
9
1010341516
12
% Compute step response for a second-order system
t=0:0.1:12; num=1;
zeta1=0.1;
den1= [1 2*zeta1
den2= [1 2*zeta2
zeta2=0.2;
1]; sys1=tf(num, den1);
1]; sys2=tf(num, den2);
zeta3=0.4; den3=[1 2*zeta3 1]; sys3=tf(num, den3);
zeta4=0.7; den4=[1 2*zeta4 1]; sys4=tf(num, den4);
zeta5=1.0; den5= [1 2*zeta5 1]; sys5=tf(num, den5);
zeta6=2.0; den6= [1 2*zeta6 1]; sys6=tf(num, den6);
%
[y1, T1]=step (sys1,t); [y2, T2]=step(sys2,t);
[y3, T3]=step (sys3, t); [y4, T4]=step(sys4,t);
[y5, T5]=step(sys5,t); [y6, T6]=step(sys6,t);
%
plot (T1, y1, T2, y2, T3, y3, T4, y4, T5, y5, T6, y6)
xlabel('\omega_n t'), ylabel('y(t)')
title('\zeta =
0.1, 0.2, 0.4, 0.7, 1.0, 2.0'), grid](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F67cb9962-653a-4ebe-9566-d5454f5d6c0d%2F44587407-0c44-4d0f-82f8-195f9848843b%2Filrdte_processed.jpeg&w=3840&q=75)
Transcribed Image Text:123456
78
9
1010341516
12
% Compute step response for a second-order system
t=0:0.1:12; num=1;
zeta1=0.1;
den1= [1 2*zeta1
den2= [1 2*zeta2
zeta2=0.2;
1]; sys1=tf(num, den1);
1]; sys2=tf(num, den2);
zeta3=0.4; den3=[1 2*zeta3 1]; sys3=tf(num, den3);
zeta4=0.7; den4=[1 2*zeta4 1]; sys4=tf(num, den4);
zeta5=1.0; den5= [1 2*zeta5 1]; sys5=tf(num, den5);
zeta6=2.0; den6= [1 2*zeta6 1]; sys6=tf(num, den6);
%
[y1, T1]=step (sys1,t); [y2, T2]=step(sys2,t);
[y3, T3]=step (sys3, t); [y4, T4]=step(sys4,t);
[y5, T5]=step(sys5,t); [y6, T6]=step(sys6,t);
%
plot (T1, y1, T2, y2, T3, y3, T4, y4, T5, y5, T6, y6)
xlabel('\omega_n t'), ylabel('y(t)')
title('\zeta =
0.1, 0.2, 0.4, 0.7, 1.0, 2.0'), grid
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
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)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
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)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education