I'm looking to extract the trend of a signal.
i've tried two methods for now, polynomial regression, and wavelet denoising
both methods don't respect the computation of the last values (meaning the last values computed will not be the same if we compute a longer buffer containing new values).
is there a way, excluding FIR/IIR filters to extract a trend that stay consistent across all the values in time ?
matlab code is welcome if possible