MATLAB: When I am using A(:,9)= [ ]; for deletion, an error is shown (Matrix index is out of range for deletion.). What might the problem be

resizing and reshaping matrices

The matrix in which I have to perform deletion is 1*18. how can I perform deletion of elements from 9-18 if A(:,9)= [ ];(This is particularly for 9th element) is wrong?

Best Answer

If the size your numeric array A is 1x18, simply A(9:18) = []; will delete 9th~18th elements from the array.