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)
- I need a MATLAB code that uses image segmentation to take this photo and single out the weeds in the yard. It also needs to calculate the number of pixels/percentage of the pixels that are in the weeds. Please provide notes in the lines as well so it is easy to follow and understand. Thank you for your help!arrow_forwardAs the potential across the resistor increased, the current through the resistor increased. If the change in current is proportional to the voltage, the data should be in a straight line and it should go through zero. In these two examples how close is the y-intercept to zero? Is there a proportional relationship between voltage and current? If so, write the equation for each run in the form potential = constant x current. (Use a numerical value for the constant.)arrow_forwardMake the graphs shown on the picture exactly the same. Follow the directions in the other picture. Please make the graphs look exactly the same as the picture. Make them on MATLAB, please send code.arrow_forward
- .During the General Enhanced Community Quarantine, we were mandated to stay and work from home. We do a lot of walking as we do a lot of household chores at home. Applying vector addition, identify five displacements inside your house then calculate your total displacement. Use component method in finding your resultant displacement. Show your complete solution.arrow_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_forwardHartley Electronics, Inc., in Nashville, producesshort runs of custom airwave scanners for the defense industry.The owner, Janet Hartley, has asked you to reduce inventory byintroducing a kanban system. After several hours of analysis, youdevelop the following data for scanner connectors used in onework cell. How many kanbans do you need for this connector?Daily demand 1,000 connectorsLead time 2 daysSafety stock 12 dayKanban size 500 connectorsarrow_forward
- how is it calculated how many numbers in rows or columns should be the sum of when we place integers starting from 1 in a magic square of size NXN? develop the necessary formula depending on N. show that the sum for n=3 will be 15.arrow_forwardThe title of our study is "Design and Fabrication of an Agricultural Spraying Attachment for an Autonomous Rover" we need help in the machine design part of our study, specifically Pump selection, battery selection, and center of gravity computation I already sent you the image of the rover Rover weight capacity 35 kilo grams (payload) Rover measurements: Wheel distance - 14.5 inches and 8.5 inches Rover platform size (width & length) 14.4 inches x 10.4 inches Height- 15.8 inches. Water tank selection More or less 25 liters *For tank selection we need to justify the size with the center of gravity, proving that is the maximum dimension or liters of the tank because the center of gravity will be higher making the rover prone to toppling Pump selection *Our sprayer design has two nozzles which splits using a tee splitter, we need to find the size of the pump to obtain the same discharge rate of a normal sprayer. A normal sprayer has a 12V pump and a pressure from 0.2 to 0.45 mpa…arrow_forwardPlease help me solve for the correct answer. answer listed below are not correct . Thank you and I will upvote! Smaller pixels: a. Increase the ability to discern between two adjacent structures b. Increase signal c. Decrease scan time d. Decrease TEarrow_forward
- I wanted to create two spheres that overlap each other in MATLAB. The image has my code and results. I only see one sphere in the results. Why is that? Can you give me the code that will create two overlaying spheres in one plot?arrow_forwardSimulated Annealing How would Simulated Annealing perform if the temperature, T, is always equal or very close to 0, where we omit the termination test (except that we terminate the search when a goal node, either a local or global optimum, is met)? Please pick up one option from the following options and explain.(a) A random walk(b) Hill-Climbing(c) It would halt immediately(d) It would never haltarrow_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
- 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