38) What is the benefit of the command close all? 39)Can we plot vector X = [3 9 27] over time t = [1 2 3 4]? Why or why not? 40)Write the Matlab commands that plot the vector X = [11 43 127] over time t = [1 2 3]. Make sure that the vector t is on the x axis and the vector X is on the y axis. o Add a title to the figure that says "This is a plot of distance over time" o Add a title to the x axis that says "This is time(s)" o Add a title to the y axis that says "This is distance(m)"

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

 Can i get the answers

38) What is the benefit of the command close all?
39)Can we plot vector X = [3 9 27] over time t = |
not?
40) Write the Matlab commands that plot the vector X = [11 43 127] over
time t = [1 2 3]. Make sure that the vector t is on the x axis and the
vector X is on the y axis.
o Add a title to the figure that says "This is a plot of distance
over time"
[1 2 3 4]? Why or why
o Add a title to the x axis that says "This is time(s)"
o Add a title to the y axis that says "This is distance(m)"
41)When do we use a legend in Matlab?
42)Given the dependent vectors X, Y, and Z over the independent vector, if
you know that X = [3 9 27], Y = [10 8 6], Z = [4 4 4], and t=[1 2 3],
use legend to plot these multiple dependent vectors on the same plot.
o Use green for X
o Use blue for Y
o Use red for Z
o Add a title to the figure that says "This is a plot of distance
over time"
o Add a title to the x axis that says "This is time(s)"
o Add a title to the y axis that says "This is distance(m)"
o Print the legend box
o Move the legend box to the south east
43) What command can we use to display multiple plots on the same figure?
44)Given that x = 0:0.1:2*pi do the following using the subplot function
o Define a 2 by 3 subplot figure
o In the first box, plot sine x
o In the second box, plot cosine x
o In the third box, plot negative exponential function of x
o In the fourth box, plot x^3
o In the fifth box, plot 2*x
o In the sixth box, plot x*x
45)Create a vector named time of numbers over the range from 0 to 5 with
increment 0.5 every time (Hint, use the colon operator), and then do
the following:
o Create another vector named height and set it up equal to 2.13 *
time .^2 - 0.13 * time .^4 + 0.000034 * time .^ 4.752
o Write a Matlab commands that plot the vector height over time.
(Hint, make sure that the vector time is on the x axis and the
vector height is on the y axis).
o Rewrite the previous command such that the printed line is
Transcribed Image Text:38) What is the benefit of the command close all? 39)Can we plot vector X = [3 9 27] over time t = | not? 40) Write the Matlab commands that plot the vector X = [11 43 127] over time t = [1 2 3]. Make sure that the vector t is on the x axis and the vector X is on the y axis. o Add a title to the figure that says "This is a plot of distance over time" [1 2 3 4]? Why or why o Add a title to the x axis that says "This is time(s)" o Add a title to the y axis that says "This is distance(m)" 41)When do we use a legend in Matlab? 42)Given the dependent vectors X, Y, and Z over the independent vector, if you know that X = [3 9 27], Y = [10 8 6], Z = [4 4 4], and t=[1 2 3], use legend to plot these multiple dependent vectors on the same plot. o Use green for X o Use blue for Y o Use red for Z o Add a title to the figure that says "This is a plot of distance over time" o Add a title to the x axis that says "This is time(s)" o Add a title to the y axis that says "This is distance(m)" o Print the legend box o Move the legend box to the south east 43) What command can we use to display multiple plots on the same figure? 44)Given that x = 0:0.1:2*pi do the following using the subplot function o Define a 2 by 3 subplot figure o In the first box, plot sine x o In the second box, plot cosine x o In the third box, plot negative exponential function of x o In the fourth box, plot x^3 o In the fifth box, plot 2*x o In the sixth box, plot x*x 45)Create a vector named time of numbers over the range from 0 to 5 with increment 0.5 every time (Hint, use the colon operator), and then do the following: o Create another vector named height and set it up equal to 2.13 * time .^2 - 0.13 * time .^4 + 0.000034 * time .^ 4.752 o Write a Matlab commands that plot the vector height over time. (Hint, make sure that the vector time is on the x axis and the vector height is on the y axis). o Rewrite the previous command such that the printed line is
Expert Solution
steps

Step by step

Solved in 5 steps with 3 images

Blurred answer
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