On 1/23/2013 11:14 AM, Mike wrote: ... > I have a vector (1x156) of dates in serial date format, these pertain to > a total series of sampling dates - a 'master_date' record, if you like. > I also have another vector (1x130) of dates that pertain to dates when a > specific parameter has been sampled sporadically throughout the total > sampling period. I will call this the parameter_date. > > What I want to do is compare the two vectors and at every instance the > parameter-date does not match the master_date, insert a rows of NaNs so > that the two vectors match. ...
T % master vector t % sample vector
tN=T; % start w/ a complete set tN(~ismember(T,t))=NaN; % insert Nan where no entry