You can start with zeros and use matrix indexing to create ones.
A = zeros(10);
rowInd = [1 2 3 4];
colInd = [5 7 8 9];
Ind = sub2ind(size(A),rowInd,colInd);
A(Ind) = 1;
If there's some pattern involved, you can probably do this more efficiently.