a
is an n
xn
matrix.
I have this code:
[m,n] = size(a);
x = zeros(m,1);
for j=1:1:n
if(j==1)
a(1,:) = [];
else
end
disp(a);
a(:,j) = [];
disp(x);
disp(a);
end
And it gives error on the line a(:,j) = [];
which says
Matrix index is out of range for deletion.
Why? I dont understand, help appreciated.