Where's the bug in the following codes?
Show older comments
fun=@(x,y)100*(y-x^2)^2+(1-x)^2;
x=-10:1:10;
y=-10:1:10;
[z,val]=fminsearch(fun,3,3);
Accepted Answer
More Answers (1)
Stalin Samuel
on 9 Oct 2015
yrfun = @(x)100*(x(2)-x(1)^2)^2+(1-x(1))^2;
[z,val]=fminsearch(yrfun,[-10 10]);
1 Comment
Shawn Miller
on 9 Oct 2015
Edited: Shawn Miller
on 9 Oct 2015
Categories
Find more on MATLAB 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!