How to reshape a nonlinear curve into a linear curve?

44 Views Asked by At

I have this data:

A = [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24];
B = [0 3220 6500 9760 13030 16320 19590 22850 26130 29390 32630 35840 39000 42100 45100 47950 50590 53100 55380 57470 59430 61140 62720 64170 65500];

If I plot this data. It looks like this:

plot(A, B)

enter image description here

As you can see. At the end, its quite nonlinear. Is there any tool I can use so I can reshape this nonlinear curve to a linear curve? My goal is that when I have 24 at x-axis. I will have 65535 at y-axsis. And it must be linear.

The the questions are:

  1. Is there any mathematical function who can describe this behaviour?
  2. How can I shape this nonlinear line to a straight line?

My idea is that if I have a function that describe this nonlinear behaviour. Let's call it $y_n = f_n(x)$ and I what to shape that onto a linear line $y_l = f_l(x)$

Then I compute the error $e(x) = f_n(x) - f_l(x)$ and create the function $y = x - e(x)$

Is that one way to solve this problem?

1

There are 1 best solutions below

0
On

With arcsine function the last maximum point is not quite ok, elsewhere there is some linearization.

enter image description here