I need an example for the use of GUI about simulated annealing !
1 view (last 30 days)
Show older comments
Greetings everyone: I am a student to learn matlab,and want to use the GUI about simulated annealing for my Optimization computation,so I want for an simple example for the use of GUI about simulated annealing to start my study. Thanks very much!
0 Comments
Answers (1)
Walter Roberson
on 2 Dec 2013
function GUI
uicontrol('Style', 'pushbutton', 'Units', 'norm', 'Position', [.1 .9 .05 .09], 'Callback', @anneal_it);
end
function anneal_it(src, evt)
X0 = rand(1,2);
[x, fval] = sa(@function_to_anneal, X0);
fprintf('Minimum value %g at location (%g, %g)', fval, x(1), x(2));
end
function y = function_to_anneal(X)
y = (4 - 2.1*x(1)^2 + x(1)^4/3)*x(1)^2 + x(1)*x(2) + ...
(-4 + 4*x(2)^2)*x(2)^2;
end
See Also
Categories
Find more on Simulated Annealing 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!