# Minimising an Interpolation Function

Posted 11 years ago
3560 Views
|
2 Replies
|
0 Total Likes
|
 Hello all,If I have a list of points (in this case univariate) and I want an interpolation I use Interpolation[{1,2,3,4.....}], but what is the syntax to minimize such a function?Minimize and FindMinimum both require me to specify the variable with which to minimize my function, but I don't know how to specify a variable for the interpolation.I'm a Mathematica 9 beta tester and can't see Minimize as a suggestion in the Suggestion Bar after evaluation Interpolation.Thanks!
2 Replies
Sort By:
Posted 11 years ago
 Making a plot of an interpolation also requires that you give a variable. Examples of this are given in the documentation:f = Interpolation[{1, 2, 3, 5, 8, 5}]Plot[f[x], {x, 1, 6}]We can follow the same pattern with NMinmize. Because we are using an interpolation, I have included constraints for NMinimize to constrain it to the region of the iterpolation. In this case the interpolation is where the independant variable is between -1 and 1. data={{-1., 0.175194}, {-0.9, -0.026003}, {-0.8, -0.0807706}, {-0.7, -0.142006}, {-0.6, -0.250069}, {-0.5, -0.262721}, {-0.4, -0.271475}, {-0.3, -0.196399}, {-0.2, -0.301731}, {-0.1, -0.0954844}, {5.55112*10^-17, -0.0656419}, {0.1, 0.0820605}, {0.2, 0.204884}, {0.3, 0.420364}, {0.4, 0.551297}, {0.5, 0.74569}, {0.6, 0.837153}, {0.7, 1.14175}, {0.8, 1.3972}, {0.9, 1.59105}, {1., 1.73636}};f = Interpolation[data];NMinimize[{f[x],-1
Posted 11 years ago
 Thanks for this explanation, Sean.From your description of minimising an interpolation function I think what I was wanting to do should be solved in a different way...