Concept explainers
Write a MATLAB statement that results in the input request shown in bold. The >> shows where your statement is typed, and the | shows where the cursor waits for input. The display must be correctly positioned. Each has a space before the cursor (shown as |). The input variable name and the variable type are shown at the right.
- a. >>
Enter the length of the bolt in inches: | (bolt, a number)
- b. >>
Enter the company’s name: | (Company, text)
- c. >>
(In this statement, the window displayed will appear for the user to choose a color, and the result will be stored in the Variable LineColor.)
a.
Write a MATLAB statement to show the given input.
Answer to Problem 1ICA
The MATLAB statement to show the given input is written.
Explanation of Solution
Given data:
The given input is written as follows.
Enter the length of the bolt in inches:
Description:
Write the MATLAB statement to show the given input as follows.
bolt = input('Enter the length of the bolt in inches: ')
Press the Enter and obtain the required objective as follows.
Enter the length of the bolt in inches:
Conclusion:
Thus, the MATLAB statement to show the given input is written.
b.
Write a MATLAB statement to show the given input.
Answer to Problem 1ICA
The MATLAB statement to show the given input is written.
Explanation of Solution
Given data:
The given input is written as follows.
Enter the company's name:
Description:
Write the MATLAB statement to show the given input as follows.
Company = input('Enter the company''s name: ','s')
Press the Enter and obtain the required objective as follows.
Enter the company's name:
Conclusion:
Thus, the MATLAB statement to show the given input is written.
c.
Write a MATLAB statement to show the given input.
Answer to Problem 1ICA
The MATLAB statement to show the given input is written.
Explanation of Solution
Given Data:
The given input is a pop up menu, which asks the user to choose a color from Red, Green, and Blue.
Description:
Write the MATLAB statement to show the given input as follows.
LineColor = menu('Choose a color','Red','Green','Blue')
Press the Enter and obtain the required objective as follows.
If the user presses red, it shows the line color as 1.
LineColor =
1
Conclusion:
Thus, the MATLAB statement to show the given input is written.
Want to see more full solutions like this?
Chapter 17 Solutions
THINKING LIKE AN ENGINEER W/ACCESS
- 4. The rod ABCD is made of an aluminum for which E = 70 GPa. For the loading shown, determine the deflection of (a) point B, (b) point D. 1.75 m Area = 800 mm² 100 kN B 1.25 m с Area = 500 mm² 75 kN 1.5 m D 50 kNarrow_forwardResearch and select different values for the R ratio from various engine models, then analyze how these changes affect instantaneous velocity and acceleration, presenting your findings visually using graphs.arrow_forwardQu. 7 The v -t graph of a car while travelling along a road is shown. Draw the s -t and a -t graphs for the motion. I need to draw a graph and I need to show all work step by step please do not get short cut from dtnaarrow_forward
- Elements Of ElectromagneticsMechanical EngineeringISBN:9780190698614Author:Sadiku, Matthew N. O.Publisher:Oxford University PressMechanics of Materials (10th Edition)Mechanical EngineeringISBN:9780134319650Author:Russell C. HibbelerPublisher:PEARSONThermodynamics: An Engineering ApproachMechanical EngineeringISBN:9781259822674Author:Yunus A. Cengel Dr., Michael A. BolesPublisher:McGraw-Hill Education
- Control Systems EngineeringMechanical EngineeringISBN:9781118170519Author:Norman S. NisePublisher:WILEYMechanics of Materials (MindTap Course List)Mechanical EngineeringISBN:9781337093347Author:Barry J. Goodno, James M. GerePublisher:Cengage LearningEngineering Mechanics: StaticsMechanical EngineeringISBN:9781118807330Author:James L. Meriam, L. G. Kraige, J. N. BoltonPublisher:WILEY