Chapra 5e PPT Ch02 MATLAB+Fundamentals
Chapra 5e PPT Ch02 MATLAB+Fundamentals
Steven C. Chapra
© McGraw Hill LLC. All rights reserved. No reproduction or distribution without the prior written consent of McGraw Hill LLC.
Part 1
Chapter 2
MATLAB Fundamentals
1 5 9
2 6 10
3 7 11
4 8 12
© McGraw Hill LLC 18
Accessing Array Entries, 2
Assuming some matrix C:
C =
2 4 9
3 3 16
3 0 8
10 13 17
C(2) would report 3
C(4) would report 10
C(13) would report an error!
Entries can also be access using the row and column:
C(2,1) would report 3
C(3,2) would report 0
C(5,1) would report an error!
© McGraw Hill LLC 19
Array Creation - Built In
www.mheducation.com
© McGraw Hill LLC. All rights reserved. No reproduction or distribution without the prior written consent of McGraw Hill LLC.