function outm=rplc3d(orgm,cycm,timetab)
% *** Replace columns of 2D matrices ***
% Y. Matsuki, February, 2008
% Y. Matsuki, May, 2012
% usage:
% outm=rplc3d(orgm,cycm,timetab)
% ========================================================

% tic
nr=length(timetab(:,1));

outm=cycm;
for m=1:nr
%     m
    outm(:,timetab(m,1),timetab(m,2))=orgm(:,timetab(m,1),timetab(m,2));    
end
% toc

