Chop out parts of a square matrix in Matlab

matlab, matrix

Solution

Here are two simple solutions:

x([1:k-1 k+1:end],[1:k-1 k+1:end])

or:

x(k,:)=[];x(:,k)=[];

Problem

Is there an inbuilt function that removes the Kth row and column of a square matrix in Matlab? Hope it's clear from the diagram: alt text http://img121.imageshack.us/img121/8145/cutmatrix.png

Original source