MATLAB: Select certain matrix elements

MATLABmatrix index

hello,everyone
i just want to ask how to select eg the 1-10 and 20-30 rows elements in the first column.
like A(1:10 and 20:30,1)

Best Answer

You can simply concatenate your ranges using square brackets:
A([1:10 20:30],1)