I'm having a hard time figuring out what this code does, because googling square brackets doesn't yield appropriate results for the way the search engine works.
id2
is a 1x265
array (so basically a 1d vector with 265 values)
m
is a 1x245
array (so basically a 1d vector with 245 values)
id2 = id2([m m(end)+1]);
For what I've seen so far, there always is a comma between the first and second value in the square brackets.
If it was
id2 = id2[m, m(end)+1]
In my little Matlab experience I would have known its meaning but this is not the case, never seen this one before.
The square brackets are also enclosed in brackets ( )
after id2
so this makes me think that
id2 = id2([m m(end)+1])
and id2 = id2[m, m(end)+1]
are two completely different things.
Can you explain me what that code does please?