- #1
gfd43tg
Gold Member
- 950
- 50
Hello,
I am curious why the following concatenation is not working the way I thought it would.
I don't really understand what this command is extracting from the matrix and how it is arranging it. It looks like B([1 2]) gets the 1st and 2nd element of B, but then the [1 3] part is not the 1st and 3rd element.
I am curious why the following concatenation is not working the way I thought it would.
Code:
B = [0 5 1; 2 4 3]
B =
0 5 1
2 4 3
Code:
B([1 2], [1 3])
ans =
0 1
2 3
I don't really understand what this command is extracting from the matrix and how it is arranging it. It looks like B([1 2]) gets the 1st and 2nd element of B, but then the [1 3] part is not the 1st and 3rd element.