- First try to clean the data by treating the NaN values. NaN values can be handled using many ways such as removing them, taking average of values etc. It is upto you to decide how to handle NaN values.
- Second is to create a Custom Mapping function as MATLAB inbuilt functions work on gregorian calendar. To create a custom map you have to decide on the number of months in a leap year, number of days in a month, cycle of a leap year etc and based on that try to convert gregorian date to lunar one. I have also provided a sample code to handle the same.
- Third, is now to plot these data with respect to water levels by converting the final resultant data into "timeseries" data.
- https://www.mathworks.com/help/matlab/data_analysis/missing-data-in-matlab.html
- https://www.mathworks.com/help/matlab/date-and-time-operations.html