%%% plotting the solution y for each gamma figure; = gamma 0.2; [t,y] ode45(@(t, y) mass_spring_ext(t,y,gamma), [0 100], [1; 0]); plot(t,y(:,1), '+'); hold on; 6 7 8 9 10 11 12 13 14 [t,y] => 15 16 gamma 0.42; ode45(@(t,y) mass_spring_ext(t,y,gamma), [0 100], [1; 0]); plot(t,y(:,1),'-'); hold on; gamma = 0.6; ode45 (@(t,y) mass_spring_ext(t,y, t,y,gamma), [0 100],[1; 0]); plot(t,y(:,1),'-o'); hold on; ode45 (@(t, y) mass_spring_ext(t,y,gamma), [0 100], [1; 0]); 17 18 [t,y] = 19 20 21 gamma 0.8; 22 [t,y] 23 24 25 26 27 28 29 plot(t,y(:,1), ); hold off; xlabel( Time t'); ylabel('Solution y'); legend (gamma-0.2', 'gamma-0.42', 'gamma-0.6', 'gamma-0.8'); 30 Ε 31 32 33 34 35 36 37 38 %%%% %%% plotting the amplitude of the steady-state solution (A(gamma)-FO*M(gamma)) vs gamma figure; = = m= 1; k 1/5; b 1/5; F0 = 1; gama = 0.2:0.01:0.8; M_gama FO./sqrt((k-m*gama. ^2).^2+b^2*gama. ^2); plot (gama, M_gama); xlabel('gamma'); ylabel('A(gamma)'); 1. A mass-spring motion is governed by the ordinary differential equation d²x dx m. +b dt² dt +k(t)x = F(t), where m is the mass, b is the damping constant, k is the spring constant, and F(t) is the external force. We consider the initial conditions x(0): = 1 and x'(0) = 0. Assume the following numerical values for this part of the project: m = 1, k = 1/4, b=1/5, and F(t) = sin yt. (a) Read section 4.10. Explain what is the resonance frequency, and then compute the resonance frequency for this mass-spring system. (b) The ODE45-solver can be used to obtain the solution curves in MATLAB. Use the script Project2_Q1.m to plot the solutions and estimate the amplitude A of the steady response for Y === 0.25, 0.45, 0.65, and 0.85. (c) The script also provide you with the graph of A versus y. For what frequency y is the amplitude the greatest? Is it equal to that you obtained in (a)?

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
icon
Related questions
Question
Please solve using the script attached in the picture.
%%% plotting the solution y for each gamma
figure;
=
gamma 0.2;
[t,y] ode45(@(t, y) mass_spring_ext(t,y,gamma), [0 100], [1; 0]);
plot(t,y(:,1), '+'); hold on;
6
7
8
9
10
11
12
13
14
[t,y]
=>
15
16
gamma
0.42;
ode45(@(t,y) mass_spring_ext(t,y,gamma), [0 100], [1; 0]);
plot(t,y(:,1),'-'); hold on;
gamma = 0.6;
ode45 (@(t,y) mass_spring_ext(t,y,
t,y,gamma), [0 100],[1; 0]);
plot(t,y(:,1),'-o'); hold on;
ode45 (@(t, y) mass_spring_ext(t,y,gamma), [0 100], [1; 0]);
17
18
[t,y]
=
19
20
21
gamma
0.8;
22
[t,y]
23
24
25
26
27
28
29
plot(t,y(:,1), ); hold off;
xlabel( Time t');
ylabel('Solution y');
legend (gamma-0.2', 'gamma-0.42', 'gamma-0.6', 'gamma-0.8');
30 Ε
31
32
33
34
35
36
37
38
%%%%
%%% plotting the amplitude of the steady-state solution (A(gamma)-FO*M(gamma)) vs gamma
figure;
=
=
m= 1; k 1/5; b 1/5; F0 = 1;
gama = 0.2:0.01:0.8;
M_gama FO./sqrt((k-m*gama. ^2).^2+b^2*gama. ^2);
plot (gama, M_gama);
xlabel('gamma');
ylabel('A(gamma)');
Transcribed Image Text:%%% plotting the solution y for each gamma figure; = gamma 0.2; [t,y] ode45(@(t, y) mass_spring_ext(t,y,gamma), [0 100], [1; 0]); plot(t,y(:,1), '+'); hold on; 6 7 8 9 10 11 12 13 14 [t,y] => 15 16 gamma 0.42; ode45(@(t,y) mass_spring_ext(t,y,gamma), [0 100], [1; 0]); plot(t,y(:,1),'-'); hold on; gamma = 0.6; ode45 (@(t,y) mass_spring_ext(t,y, t,y,gamma), [0 100],[1; 0]); plot(t,y(:,1),'-o'); hold on; ode45 (@(t, y) mass_spring_ext(t,y,gamma), [0 100], [1; 0]); 17 18 [t,y] = 19 20 21 gamma 0.8; 22 [t,y] 23 24 25 26 27 28 29 plot(t,y(:,1), ); hold off; xlabel( Time t'); ylabel('Solution y'); legend (gamma-0.2', 'gamma-0.42', 'gamma-0.6', 'gamma-0.8'); 30 Ε 31 32 33 34 35 36 37 38 %%%% %%% plotting the amplitude of the steady-state solution (A(gamma)-FO*M(gamma)) vs gamma figure; = = m= 1; k 1/5; b 1/5; F0 = 1; gama = 0.2:0.01:0.8; M_gama FO./sqrt((k-m*gama. ^2).^2+b^2*gama. ^2); plot (gama, M_gama); xlabel('gamma'); ylabel('A(gamma)');
1. A mass-spring motion is governed by the ordinary differential equation
d²x dx
m. +b
dt² dt
+k(t)x = F(t),
where m is the mass, b is the damping constant, k is the spring constant, and F(t)
is the external force. We consider the initial conditions x(0): = 1 and x'(0) = 0.
Assume the following numerical values for this part of the project: m = 1, k = 1/4,
b=1/5, and F(t) = sin yt.
(a) Read section 4.10. Explain what is the resonance frequency, and then compute
the resonance frequency for this mass-spring system.
(b) The ODE45-solver can be used to obtain the solution curves in MATLAB. Use
the script Project2_Q1.m to plot the solutions and estimate the amplitude
A of the steady response for Y === 0.25, 0.45, 0.65, and 0.85.
(c) The script also provide you with the graph of A versus y. For what frequency
y is the amplitude the greatest? Is it equal to that you obtained in (a)?
Transcribed Image Text:1. A mass-spring motion is governed by the ordinary differential equation d²x dx m. +b dt² dt +k(t)x = F(t), where m is the mass, b is the damping constant, k is the spring constant, and F(t) is the external force. We consider the initial conditions x(0): = 1 and x'(0) = 0. Assume the following numerical values for this part of the project: m = 1, k = 1/4, b=1/5, and F(t) = sin yt. (a) Read section 4.10. Explain what is the resonance frequency, and then compute the resonance frequency for this mass-spring system. (b) The ODE45-solver can be used to obtain the solution curves in MATLAB. Use the script Project2_Q1.m to plot the solutions and estimate the amplitude A of the steady response for Y === 0.25, 0.45, 0.65, and 0.85. (c) The script also provide you with the graph of A versus y. For what frequency y is the amplitude the greatest? Is it equal to that you obtained in (a)?
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 1 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
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)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education