I want to add a vector to just a single column of a matrix.
For example:
a = zeros(5,5);
b = ones(5,1);
I want to add such b
only to the second column of a such that the resultant a
is
a= [ 0 1 0 0 0;
0 1 0 0 0;
0 1 0 0 0;
0 1 0 0 0;
0 1 0 0 0;]
How can I do this? I have tried doing a+b
but it adds one to all the columns.