ENGRMAE 10 Lecture Notes - Lecture 4: Hayes Command Set, Array Data Structure, Matrix Multiplication

26 views7 pages

Document Summary

You can enter multiple values into an array by putting brackets around two or more numbers. If you use an array as an argument for a built-in function, the function will act on all elements in the array. There will be times where you will want to perform an operation on all the elements of an array. For example, multiply all the elements of an array by a constant. > a = [2, 3, 9 ; 4, 4, 7] a = * operator instead of just the * operator. > a = a + 1 a = 5 5 8 (we get the same result using . * and * in this case) (a is a 2x3 array) 1 (again, we get the same result using . * and * since 1 is a constant) > a = a . + 1 a =

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents