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)
- I need only MATLAB coding please.....arrow_forward6.1Complete the code please.arrow_forwardImportant instruction: This question uses the last three-digit value (L3D) of individual student matrix number. For example, if the matrix number is CD180264 then the L3D value is 264 (since the last three digits is 264). Some data require multiplication of the L3D value, for examAdditional instruction: These questions use the last three-digit value (L3D) of individual student matrix number. Example, if the matrix number is CD180264 then the L3D value is 264 (since the last three digits is 264). Some data require multiplication of the L3D value, for example 10(L3D) means 10 x L3D.ple 10(L3D) means 10 x L3D. subject name isarrow_forward
- The Pascal triangle can be displayed as elements in a lower-triangular matrix as shown on the right. Write a MATLAB program that creates a n × n matrix that displays n rows of Pascal’s triangle. Use the program to create 4 and 7 rows Pascal’s triangles. (One way to calculate the value of the elements in the lower portion of the matrix isarrow_forwardUse graphical method to solve (Resolution and Composition).arrow_forwardDavid is working on her farming business and faces the challenge of watering her plants daily,which is a tedious and time-consuming task, especially under the scorching sun. The path shefollows for watering the plants is illustrated in figure 1.David's son has taken on the task of designing a prototype to automate the watering process forher. Figure 2 depicts the design, featuring a set of rods. The curved path represents David'stypical watering route, and the straight rod AB AB is confined to move along the path due to the pinsat its ends. Water sprinklers will be positioned at points A and B to efficiently water the plants.At the instant shown in figure 2, point A has the motion shown while its at the edge of the path.Determine the velocity and acceleration of point B at this instant.arrow_forward
- Use the date that is shown and make the graph that is shown as well place make it exactly the same. Please use MATLAB. Please make the same graph with the data that is given. Please help me and make the code.arrow_forwardHello pls solve it fast and correctly, you can verify the answer by looking at the third answer which is correct so u can verify and pls do all the three parts and fast I'll ratearrow_forwardAssist with MATLAB coding for part carrow_forward
- Please write a matlab code to Solve thisarrow_forwardBriefly discuss how each of the following is used by CFD codes to speed up the iteration process: (a) multigridding and (b) artificial timearrow_forward2. Write a MATLAB script that computes the following sum while requesting the value of x and n from the user.arrow_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