For the particular case
% preliminary setup
newData = [1:10; NaN(1,10)]';
% fill-in
newData(data(:,1),2) = data(:,2)
To make it a little more general
% preliminary setup
newData = [(data(1,1):1:data(end,1))' NaN(data(end,1)-data(1,1)+1,1)]
% fill-in
newData(data(:,1),2) = data(:,2)