Concept explainers
Write a MATLAB function named sumTtUp that will accept three input variables and return two output variables. If the sum of the first two input variables is greater than 100, the function should display the inputs showing two decimal places in the following format. Assume in this formatting example that the numbers 55. 66, and 77 are the input variables:
The inputs are 55.00, 66.00 and 77.00.
Otherwise, if the sum of the first two input variables is less than or equal to 100, the function should display the formatted output using no decimal places, for example:
The inputs are 25, 10 and 13.
The first variable the function returns should be the sum of the first and second variables. The second variable the function returns should be the sum of the second and third variables.
Want to see the full answer?
Check out a sample textbook solutionChapter 18 Solutions
THINKING LIKE AN ENGINEER W/ACCESS
- 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 your matrix number by adding the last three digits to get the value of X on the velocityof plane A. The value of X will then need to be added with the digit of 150 as follows;Example; If your matrix number is AD190251,Velocity of plane A, VA = 150 + X km/hX = (2 + 5 + 1) = 8Therefore, the velocity of plane A, VA = 150 + X, = 150 + 8 = 158 km/h. SO MY LAST THREE DIGITS ARE: 008arrow_forwardPlease include a kinamatic diagram (for velocity) Please DO NOT solve this using velocity analysis (cartesian vector analysis). I would like it to be solved using scalar method. We dont use 3D in this course. We only use scalar analysis for the relative velocity equation as requested in the question (writing the x and y components of the equation and solving the equations for the unknowns). Below I have attached a sample question with solution in order to get an idea on how to use the scalar method to solve my question. I would like question this to be solved in a similar way. Thank you for your understanding. If you can solve it as soon as possible that would be great and I will give you a thumps up and positive feedback :)arrow_forward
- Matlab code please or just some stepping stones to help.arrow_forwardBriefly explain each of the following block (one sentence or less)a) G96 S200 M03b) G00G42X20.0Z2.0c) G92 X59.0 Z-50.0 R-2.5 F0.25 d) G72 P10 Q20 U1.0 W0.5 F0.2arrow_forwardEngineering Economy A company has determined the price and the monthly demand of its products are related by the equation D = √775 - p, where p is the price per unit in dollar and D, is the monthly demand. The associated fixed costs are $2,125 per month and the variable costs are $100/ unit. Use this information to answer the following: a)What is the optimal number of units that should be produced and sold each month? b) What is the maximum profit? c)Determine the value of D that represents the break-even point?arrow_forward
- Matlab code pleasearrow_forwardSuppose your CFD code can handle nonelementary blocks. Combine as many blocks of Fig. as you can. The only restriction is that in any one block, the number of i-intervals and the number of j-intervals must be constants. Show that you can create a structured grid with only three nonelementary blocks. Renumber all the blocks and indicate how many i- and j-intervals are contained in each block. Add up all the cells and verify that the total number of cells does not change.arrow_forwardA mercury thermometer, which has been on a table for some time, is registering the room temperature, 50°F. Suddenly, it is placed in a 395°F oil bath. The following data are obtained for the response of the thermometer. If after 10 seconds the thermometer reading is 176 F, determine the thermometer time constant. Round off the final ans to whole number Please show your complete solution and write readable.arrow_forward
- Please solve question 16-109 below this in the follwoing way: Please include a kinamatic diagram (one for velocity and one for acceleration). Please DO NOT solve this using velocity analysis (cartesian vector analysis). I would like it to be solved using scalar method. We dont use 3D in this course. We only use scalar analysis for the relative velocity equation (writing the x and y components of the equation and solving the equations for the unknowns). I have attached a sample question with solution in order to get an idea on how to use the scalar method to solve my question. I would like question 16-109 to be solved in a similar way. Thank you for your understanding. If you can solve it as soon as possible that would be great and I will give you a thumps up and positive feedback :)arrow_forwardMake a matlab codearrow_forwardSearch and define the following:(write each required formula - define its variables) 1. Impulse and Momentum2. Work Energy Principle3. Law of conservation of momentumarrow_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