Rotate a line profile to remove the tilt (make it horizontal)

5 views (last 30 days)
I have a profile of a line like below
I want to rotate the file to horizontal like below
Any idea how I can do that?
Actually, the above situation is just a simple example; I want to rotate the below line to horizontal:
Any idea would be appreciated!

Accepted Answer

Star Strider
Star Strider on 16 Dec 2020
Use the detrend function. Specifically see the documentation section on Continuous Linear Trend , although other examples may be relevant, depending on the result you want.

More Answers (0)


Find more on Interpolation 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!