I know that there are some well-known issues with indexing arrays in matlab. However, there is one in particular that I've never been able to understand:
This works just fine :
S =
1 3 4 2
4 5 24 1
v= S(1,:)
v =
1 3 4 2
v(1)
ans =
1
But this throws an error:
S(1,:)(1)
Error: ()-indexing must appear last in an index expression.
Why is this? I still don't understand from a high level why this doesn't work.
I am a CS student, so, if I could have the principle and/or concept driving this error, that'd be great. Thanks!