I was just wondering if there is a way to index using end
before knowing a vector's size? It should work for arrays with different sizes. Like this:
subvector = (2:end) % illegal use of end
A=[1 2 3];
B=[4 5 6 7];
A(subvector) % should be 2 3
B(subvector) % should be 5 6 7