Climate Data Toolbox: how can i calculate correctly a trend with trend function?
Show older comments
Hi! I'm trying to apply the trend function presents in the Climate Data Toolbox for calculating sea level anomaly for the interval 1993-2020. The data matrix has dimension 720x1440x366 (lat,lon,time), where 336 are the months in the studied period. The matrix contains a lot of Nans in the third colmun, especially in the higher latitudes. Is it correct to apply the trend function as follows in order to correctly calculate the trend taking into account in the proper manner the Nans?
[matrix_trend,p] = trend (matrix, 336, 'omitnan');
Is this the way to calculate trend for a 3-D matrix along the time dimension, whose values are stored in the third column?
Moreover, is it ok to use the detrend3 function as follows to subtract the trend to the original data?
detrend = detrend3 (matrix, 'omitnan');
Or, otherwise, does exist a more efficient manner to obtain such a result, i.e.e the subtraction the trend from the reference data?
Thank you in advance.
Accepted Answer
More Answers (0)
Categories
Find more on Climate Science and Analysis 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!