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 18 Solutions
Thinking Like an Engineer: An Active Learning Approach (3rd Edition)
- Heat energy is transferred to 1.36 kg of air which causes its temperature to increase from 40" CO 468°C. Calculate, for the two separate cases of heat transfer at (a) constant volume, (b) constant pressure: the quantity of heat energy transferred, (ii) the external work done, (iii) the increase in internal energy. Take cv and cp as 0.718 and 1.005 kJ/kgK respectivelyarrow_forwardA flat circular plate is 500 mm diameter. Calculate the theoretical quantity or heat radiated per hour when its temperature is 215°C and the temperature of its surrounds is 45°C. Take the value of the radiation constant to be 5.67 × 10^11 kJ/m2s K4.arrow_forwardDescribe Atmospheric Air and how it reacts with carbon in combustionarrow_forward
- 0.5 kg of ice at —5°C is put into a vessel containing 1.8kg of water at 17°C and mixed together, the result being a mixture of ice and water at 0°C. Calculate the final masses of ice and water, taking the water equivalent of the vessel to be 0.148 kg, specific heat of ice 2.04 kilkg K and latent heat of fusion 335 kJ/kg.arrow_forwardA condenser vacuum gauge reads 715 mmHg when the barometer stands at 757 mmHg. State the absolute pressure in the condenser in kN/m2 and bars.arrow_forwardSketch and Describe a timing diagram for a 2 stroke diesel enginearrow_forward
- Manipulate the formula for converting temperature from Fahrenheit to Celsiusarrow_forwardDefine Temperature, Pressure, and Absolute Temperature.arrow_forwardAn air reservoir contains 20 kg of air at 3200 kN/m2 gauge and 16°C. Calculate the new pressure and heat energy transfer if the air is heated to 35°C. Neglect any expansion of the reservoir, take R for air = 0.287 kJ/kgK, specific heat at constant volume c, = 0.718 kJFg K, and atmospheric pressure = 100 kN/m2arrow_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