Ask users to enter a matrix that could be any size but has a minimum of two columns. Check the matrix dimensions, and if there are fewer than two columns warn users of their error and ask them to enter the matrix again. If the user does not correctly enter the matrix a second time, use an error message to notify the user and terminate the program.
Using a matrix correctly entered by the user with two or more columns, create a new matrix containing the same number of rows and two columns. The first element in each row contains the smallest value in the odd-numbered columns of the corresponding row in the user matrix, and the second element in each row contains the largest value in the even-numbered columns of the corresponding row in the user matrix.
Use formatted output statements to print the results to the Command Window This program should run correctly for any size matrix entered by the user.
Test Case and Sample Output
The smallest value found in the odd-numbered columns:
Row 1 = –4
Row 2 = 1
Row 3 = 3
The largest value found in the even-numbered columns:
Row 1 = 8
Row 2 = 4
Row 3 = –2
Want to see the full answer?
Check out a sample textbook solutionChapter 18 Solutions
Thinking Like an Engineer: An Active Learning Approach (4th Edition)
- Fill in each of the following blanks with the appropriate word: If the displacement model used in the derivation of the element stiffess matrices is also used to derive the element mass matrices, the resulting mass matrix is called __ mass matrix.arrow_forwardmy matrix number is 8 , so choose EVEN matrix numbers sidearrow_forwardCreate an illustration or diagram of the amusement park ride called THE BUMPER CAR RIDE, then proceed to add labels based on the guidelines provided within the image. The screenshot is the example of the diagram BUT THAT IS A DIAGRAM OF THE GRAVITRON RIDE. I need an illustration DIAGRAM OF THE BUMPER CAR RIDE, do not answer using AI.arrow_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_forwardQuestion 4 List the steps in details to draw the shape below using AutoCAD commands 190 220 50 -90 - 50 114 81 R80 450 122 -R125 68 65 290 50 290 630arrow_forwardI am sorry but your values when plugging in are not the correct values. Not too sure where your values are from but can you please redo the question using the given values in this problem and not from a different problem please? (example, height is not 29, it is 22) all values do not correlate to this problem. I was also told when finding the area of triangle to use (1/2)*b*h*Ad^2 and not 1/36*b*h*Ad^2 Find the moment of inertia and radius of gyration of the section of this bar about an axis parallel to x-axis going through the center of gravity of the bar. The bar is symmetrical about the axis parallel to y-axis and going through the center of gravity of the bar and about the axis parallel to z-axis and going through the center of gravity of the bar. The dimensions of the section are: l=55 mm, h=22 mm The triangle: hT=12 mm, lT=19 mm and the 2 circles: diameter=8 mm, hC=6 mm, dC=8 mm. A is the origin of the referential axis. Provide an organized table and explain all your steps…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