Missing value: Adding new row of NaN in a time series. Need some twist in code
Show older comments
Dear all,
I want to create some new rows of NaN (lets say NaN(1,:,:)) in gridded time series (e.g., A_matrix (200,40,50)) to fill up some missing months in between. I have identified the missing months using:
[missingvalues,id] = setdiff(actual_period,data_dates);
where id is the index of missing month OR
[locCol, loc] = ismember(actual_period,data_dates);
where loc is an index of logical values for 0=missing month.
Based on the index values I need to add extra rows (NaNs) to A_matrix so that I can interpolate them.
Kindly help me... Khandu
Accepted Answer
More Answers (0)
Categories
Find more on Resizing and Reshaping Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!