Plot the function y(x, ) from Exercise 11 for 5 = 0.3, 0.5, and 0.8. Create one figure with four subplots and plot y for three different values of 5 in three subplots and fourth subplot should have multiple plots of y for all the values of 5.
![EXERCISE 12
Plot the function y(x, ) from Exercise 11 for 5 = 0.3, 0.5, and 0.8. Create one figure with four
subplots and plot y for three different values of 5 in three subplots and fourth subplot should
have multiple plots of y for all the values of .](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F28b28103-3c06-4b4c-8eb3-7ae9b38bb153%2F6202db8b-0b58-4a15-b9ef-f9a5ae9776a1%2Fevhh95_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
clc;clear all;format compact
x=input('Enter range of x values for which plot is to be created: '); %Asks user to enter x
zeta=[0.3 0.5 0.8]; %Values of zeta
%Computes y(x) for each zeta
y1=1-((1/sqrt(1-zeta(1)^2)))*exp(-zeta(1).*x).*sin(sqrt(1-zeta(1)^2).*x+acos(zeta(1)));
y2=1-((1/sqrt(1-zeta(2)^2)))*exp(-zeta(2).*x).*sin(sqrt(1-zeta(2)^2).*x+acos(zeta(2)));
y3=1-((1/sqrt(1-zeta(3)^2)))*exp(-zeta(3).*x).*sin(sqrt(1-zeta(3)^2).*x+acos(zeta(3)));
%Creates 4 subplots as asked.
subplot(2,2,1)
plot(x,y1,'-k','LineWidth',2);xlabel('x in radians');ylabel('y(x)');title('\zeta=0.3');
subplot(2,2,2)
plot(x,y2,'-r','LineWidth',2);xlabel('x in radians');ylabel('y(x)');title('\zeta=0.5');
subplot(2,2,3)
plot(x,y3,'-b','LineWidth',2);xlabel('x in radians');ylabel('y(x)');title('\zeta=0.8');
subplot(2,2,4)
plot(x,y1,x,y2,x,y3,'LineWidth',2);xlabel('x in radians');ylabel('y(x)');legend('\zeta=0.3','\zeta=0.5','\zeta=0.8');
Step by step
Solved in 2 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Introductory Circuit Analysis (13th Edition)](https://www.bartleby.com/isbn_cover_images/9780133923605/9780133923605_smallCoverImage.gif)
![Delmar's Standard Textbook Of Electricity](https://www.bartleby.com/isbn_cover_images/9781337900348/9781337900348_smallCoverImage.jpg)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
![Introductory Circuit Analysis (13th Edition)](https://www.bartleby.com/isbn_cover_images/9780133923605/9780133923605_smallCoverImage.gif)
![Delmar's Standard Textbook Of Electricity](https://www.bartleby.com/isbn_cover_images/9781337900348/9781337900348_smallCoverImage.jpg)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
![Fundamentals of Electric Circuits](https://www.bartleby.com/isbn_cover_images/9780078028229/9780078028229_smallCoverImage.gif)
![Electric Circuits. (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780134746968/9780134746968_smallCoverImage.gif)
![Engineering Electromagnetics](https://www.bartleby.com/isbn_cover_images/9780078028151/9780078028151_smallCoverImage.gif)