`x=rand(16,1301);y=rand(16,4);k=0:0.01:1;I=eye(size(x'*x));b=zeros(size(x'*x));for j=1:length(k) b(:,j)=(pinv(x'*x+k(j)*I)*x')*y;end`

It seems the size of b(:,j)= 1301 x 1 and the size for (pinv(x'*x+k(j)*I)*x')*y= 1301 x 4. How to write a code for output variable to get equal size? Please help.

## Best Answer