Thinking Like an Engineer: An Active Learning Approach (3rd Edition)
Thinking Like an Engineer: An Active Learning Approach (3rd Edition)
3rd Edition
ISBN: 9780133593211
Author: Elizabeth A. Stephan, David R. Bowman, William J. Park, Benjamin L. Sill, Matthew W. Ohland
Publisher: PEARSON
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 20, Problem 9ICA

Write a function named EvenSum that will accept a matrix of unknown size and return the sum of all elements at the intersection of even numbered rows and even numbered columns. Note that your function must work with any sixe matrix. Also note that if the matrix is a scalar or a vector, the function will return zero since there are no even numbered rows or columns in those cases. Accomplish this using two methods:

a.    a for loop without using built-in functions like sum

b.    direct matrix operations, no loops

EXAMPLE: For the matrix shown, A=EvenSum(Test); will place the value 13 in A.

The numbers added together are shown in red.

     = [ 1 3 5 7 9 0 1 2 3 4 6 4 2 1 8 3 5 2 4 0 ]

Blurred answer

Chapter 20 Solutions

Thinking Like an Engineer: An Active Learning Approach (3rd Edition)

Knowledge Booster
Background pattern image
Mechanical Engineering
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, mechanical-engineering and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Text book image
Elements Of Electromagnetics
Mechanical Engineering
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Oxford University Press
Text book image
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:9780134319650
Author:Russell C. Hibbeler
Publisher:PEARSON
Text book image
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:9781259822674
Author:Yunus A. Cengel Dr., Michael A. Boles
Publisher:McGraw-Hill Education
Text book image
Control Systems Engineering
Mechanical Engineering
ISBN:9781118170519
Author:Norman S. Nise
Publisher:WILEY
Text book image
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:9781337093347
Author:Barry J. Goodno, James M. Gere
Publisher:Cengage Learning
Text book image
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:9781118807330
Author:James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:WILEY
Force | Free Body Diagrams | Physics | Don't Memorise; Author: Don't Memorise;https://www.youtube.com/watch?v=4Bwwq1munB0;License: Standard YouTube License, CC-BY