position of a signal in a vector I have 4 signals: $z,c,d$ and $r$. $r$ is defined by: $r=[c,z,d,z]$

I would like to find signal $d$. In Matlab I do this:

r2=r(size(c,2)+size(z,2)+(0:size(d,2)-1))


Do we have $r2=d$?
In case the four vectors are row vectors

r2=r(size(c,2)+size(z,2)+1:end-size(z,2))


In case the four vectors are column vectors

r2 = r(:,3)


PS: thanks @ThP