Bisection Method to find root

2 ビュー (過去 30 日間)
harley
harley 2013 年 9 月 4 日
im trying to write code using the Bisection method to find the max of F(w) like a have with the cubic spline method, any help would be appreciated.
w= -5:0.05:5;
F= 2*sin(5*w)./w;
% Cubic Spline Method
w_int=-5:0.01:5;
w_int(abs(w_int) < eps(1e3)) = [];
F_int=spline(w,F,w_int);
f = fittype('a2*sin(a1*x)./x');
ff = fit(w_int(:),F_int(:),f,'StartPoint',[1 1]);
out_3 = ff.a1;
disp(out_3)

回答 (1 件)

Matt J
Matt J 2013 年 9 月 4 日
編集済み: Matt J 2013 年 9 月 4 日
I was told once that fminsearch() applied to a 1D function is equivalent to bisection.

カテゴリ

Help Center および File ExchangeSplines についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by