MATLAB: Making bigger matrix with smaller matrixes elements.

bigger matrix from smaller

I'm assembling a bigger matrix with elements of other smaller matrixes. in my method I build a connecting vector for example C=[1 5 6 7 8 9] when in each element like for example C(2)=5, 2 is a local dimension in smaller matrix and 5 is a global dimension in main matrix which is assembled.
If I want to use easy code writing I should use this kind of coding:
%for i=1:size(C,2)
for j=1:size(C,2)
B(C(i),C(j))=A(i,j)
but I'm trying to use Matlab special features in matrix calculations to put A with local dimension in B with global dimension. because Matlab features are fast and need less code writing.
Note: A and B are n*n and m*m matrixes.

Best Answer

B(C,C)=A;