MATLAB: How can i add column in matrix

matrix

A is a matrix:
0 9 8 4 6
9 0 8 4 3
0 6 4 8 9
8 0 4 6 9
9 0 8 4 3
0 9 4 8 6
9 0 8 4 6
how to add another column at the end of matrix A?

Best Answer

Depends what you want in that column but you could for example add a column of zeros as follows:
A = [A zeros(size(A,1),1)]
Related Question