The error is in the line in %…I got that the error is coming because of the unmatched dimension of left hand side and right hand side of that line. I want to assign the first element of the matrix A, a matrix value again . How can I possibly do that?

`c = input('c ');g = input('g ');st = input('st ');syms Lambda_n C_nrt a_rM = cell(c+1,1);a_t = min([1:c+1;repmat(c-g+1,1,c+1)]);for i = 1:c+1 if i <= c-g MCell = repmat({zeros(c+2-i)}, 1, a_t(i)); else ACell = zeros(c+2-i,c+2-i, 'sym'); if st==1 A(1,1) = Lambda_n; else A(1,1) = kron(C_nrt,eye(st)); %error line`

end MCell = repmat({A}, 1, a_t(i)) end M{i} = blkdiag(MCell{:}); endB=blkdiag(M{:})

## Best Answer