ENGR 111 Study Guide - Midterm Guide: Matlab

65 views1 pages

Document Summary

Check for understanding ceil(20. 19) = 21 mod(2019,15) = 9. Check for understanding 9. 2 - arrays. A(a > 19) selects the elements in a that are greater than 19. Objective: to demonstrate competence creating and manipulating arrays in matlab. You should work on this task individually. Here, divisible means the division has a remainder of 0. Your script should print a and output the number of elements in a. You may not use loops. You must use only array manipulations. Always plan your code before you write your code. The ceil function returns the least integer greater than the argument. Logical indexing allows you to select elements in a list that match a given condition. The mod function returns the remainder after division. >> cfu a: 5 b: 3 m: 1 n: 100. 14 numbers between 1 and 100 are divisible by 5 but not by 3: