2
$\begingroup$

I have to code a function in matlab (F1) whose values range from 0.740261423849103 to some where around 0.95. Then there is another function (F2) which is usually the square of F1. Is there any way I can replace F2 [ which is F1^2] by a linear form such as K*F1 so that F2 approximates F1 utilizing the fact that F1 lies between 0.74 to 0.95? If I need to put in different values of K for different ranges of F1 that would also be ok. I need to approximate few other complex expressions by simpler linear ones so is there any method I can follow to determine what would be the best approximation? As I mentioned, it would be feasible for me to use different values of K for different ranges of F1.

1 Answers 1

1

You can do this with a piecewise linear function.