Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

You can do this with a piecewise linear function.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.