hello
the trend is basically a low pass filtered version of the raw data
one method is to smooth the data , for example with smoothdata (try with 'gaussian' window)
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!