How to find exact function and minimum values in interpolated datasets

8 views (last 30 days)
assume that i have some matrix like
a=[1,2,3,4,5,6,7,8,9,10,11]
E=[2,4,6,8,10,12,14,16,18,20,22]
how can i find the exact function data like E=2*a ???
and i want to find the minimum value(local or anything)
in interpolated function...
x=cOverawithsameV(:,1); y=EV(:,1); xx=linspace(min(x),max(x),1000); fun1=spline(x,y,xx); fminsearch(fun1,min(y))
this doesn't work since the fun1 is not a function...
what should i do to find the local minimum values in this interpolated datasets..?
the function has a parabolic shape

Accepted Answer

Matt J
Matt J on 10 Dec 2012
fun1=@(z) spline(x,y,z);
fminsearch(fun1,min(y))
  2 Comments
Matt J
Matt J on 11 Dec 2012
Then why did you accept it?
My guess (that's all we can do without more info about "doesn't work") is that you're not initializing fminsearch where you need to:
fun1=@(z) spline(x,y,z);
[minval,idx]=min(y);
fminsearch(fun1,x(idx(1)));

Sign in to comment.

More Answers (0)

Categories

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!