In my current code I am using the detrend function during plotting, to get rid of linear trends in the data. Yet, I only want to subtract the slope, not the mean value. I have seen, that in new Matlab versions there is a function like getTrend or [data_d,T] = detrend(data,Type), which allows to easily get access to the mean value and slope of the detrended data. However, I am using Matlab2012b, and changing this is not an option, so please do not suggest it, it will not happen. But my question would be if it is possible to use the newer code of this function in an older version? I am at a university, and we have the licenses for newer versions as well, but since I cannot find a possibility to download such functions separately, I was wondering if you could help. If that's not possible, I can ofc just use a different approach than detrend, but it would be very neat.
Thx for you help, Manuel