matlab vector indexing code example Example: matlab matrix indexing v = [16 5 9 4 2 11 7 14]; v(3) % Extract the third element (ans = 9)