Extract Elements From Matrix Matlab