How to Call simulannealbnd from a function
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi, I am trying to call simulannealbnd in a function. And I am getting the following error.
Error using simulannealcommon (line 42) You must provide an initial point.
When I call simulannealbnd from the workspace, it works fine. I wonder what is the problem. Here is the code snippet that I am using.
fitfunc=['@(w,X,T)mean(power(T-(' str1 '),2))']; parameterized_objective=str2func(fitfunc); ObjectiveFunction=@(w)parameterized_objective(w, X, T); LB=params.LB; UB=params.UB; W0=rand(1,5); [coefs,cost] = simulannealbnd(ObjectiveFunction,W0);
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Simulated Annealing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!