Answered step by step
Verified Expert Solution
Question
1 Approved Answer
matlab 2: The plot command Read the excerpt on the plot command from Understanding Matlab on pages 3-5 below. Example 1 a. Type the commands
matlab
2: The plot command Read the excerpt on the plot command from "Understanding Matlab" on pages 3-5 below. Example 1 a. Type the commands for Example 1 (p. 4) into an m-file, save the m-file (not to the computer or desktop), and execute the m-file in the command window. b. Using the formulas, calculate and write out on paper the first 5 values that should be stored in the t and d vectors. Name Lecture time (circle one): 10am 11:30am c. Add commands to your m-file to print the first five values in each vector to see if you are right. If your numbers do not agree, go back and figure out why and correct your calculations or your m-file. d. Publish the Example 1 m-file to a pdf document. EXAMPLE 1: Examples: The plot Command The format of this example page differs from the rest of the example pages because the plot command does not generate the normal output. Also the examples will be more useful if they are presented as the solutions to specific problems. Problem: Plot the distance a car travels, from t-0 (at rest) to -15 seconds, if the car has a constant acceleration of 6 ft/s. Program: Figure: Distance Traveled Time %Example t=0:0.5:15; a=6; d=0.5*a*t.^2; plot(t,d), title('Distance Traveled vs. Time'),xlabel('Time (sec.)') ylabel('Distance (ft.)'),grid Distance (ft.) Note the dot in the d equation for the dot product. 100
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started