very simple logic but im not getting
n=4K = [ 1, 2; 3, 4] K1=zeros(n+1);K1([1 2],[1 2])=KK2=zeros(n+1);K2([2 3],[2 3])=KK3=zeros(n+1);K3([3 4],[3 4])=KK4=zeros(n+1);K4([4 5],[4 5])=KL=K1+K2+K3+K4;
how to convert this into loop where we can add more Kn matrices
Best Answer