필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

This code is working but in every run i am getting different value of x(1),x(2) and x(3)..kindly solve this problem...its very urgent

조회 수: 1 (최근 30일)
xdata =[ 10.^(-5) 10.^(-4) 10.^(-3) 10.^(-2) 10.^(-1) 1] ;
ydata=(0.2575./((xdata.^2)+(0.333.*xdata)+1));
parameterized_objective = @(x,xdata) x(1)./((x(2).*(xdata.^(1+0.9))) + x(3).*(xdata.^(0.9))+1);
ObjectiveFunction = @(x) sum((parameterized_objective(x,xdata) - ydata).^2);
X0 = [0; 0; 0 ];
lb = [0.2; 0.2; 0.2];
ub = [1; 1; 1];
x = simulannealbnd(ObjectiveFunction, X0, lb, ub)

답변 (1개)

the cyclist
the cyclist 2018년 5월 18일
Simulated annealing uses randomness as part of the algorithm. If you set the random seed before this code, for example with the line
rng default
then you should get reproducible results.
  댓글 수: 1
ash
ash 2018년 5월 18일
편집: Walter Roberson 2018년 5월 18일
rng default is working but if i am changing in parameterized_objective for example xdata.^(1+0.1) and xdata.^(0.1).still i am getting same as 0.9.kindly resolve this problem.
parameterized_objective = @(x,xdata) x(1)./((x(2).*(xdata.^(1+0.9))) + x(3).*(xdata.^(0.9))+1);

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by