just detrend
just detrend. Simple script for line-by-line detrending of a matrix. Useful for flattening topographic images such as from AFM or STM. Note that this is not a plane fit but a line-by-line flattening/detrending. This script makes use of the polyfit function and can detrend/flatten up to arbitrary expansion order.
jdetrend(Img,dimension,order)
Img = image data matrix. dimension = 1 or 2 - detrend along rows(1) or columns(2).
order = expansion order in polyfit.
Example:
To remove trends up to cubic order from an AFM image that was scanned horizontally:
dataOut=jdetrend(dataIn,2,3);
Cita come
Shawn Divitt (2025). just detrend (https://it.mathworks.com/matlabcentral/fileexchange/43834-just-detrend), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Compatibilità della piattaforma
Windows macOS LinuxCategorie
Tag
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
