fminsearch for 2 inputs
Show older comments
I have my function f(TH,R) = @(TH,R) (abs((sqrt(2)/(81*sqrt(pi))).*(6.*R-R.^2).*exp(-R./3).*cos(TH))).^2
how would i set up another function to satisfy fminsearch while initial guess (0,1) and (pi,1)
Answers (2)
Walter Roberson
on 7 Nov 2017
f2 = @(THR) F(THR(1), THR(2))
fminsearch(f2, [0 1])
1 Comment
darlene yen
on 7 Nov 2017
KSSV
on 7 Nov 2017
fun = @(x) (abs((sqrt(2)/(81*sqrt(pi))).*(6.*x(1)-x(1).^2).*exp(-x(1)./3).*cos(x(2)))).^2 ;
x = fminsearch(fun,[0 1]) ;
Categories
Find more on Programming 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!