How to find exact function and minimum values in interpolated datasets
11 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
Matt J
2012-12-10
fun1=@(z) spline(x,y,z);
fminsearch(fun1,min(y))
2 个评论
Matt J
2012-12-11
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)));
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!