Maximising the summation of a matrix elements along to generated trajectory by nonlinear global optimization

조회 수: 1 (최근 30일)
Hello every one,
I have a known matrix with n*m size that named fij.
I sum elements of this matrix along a trajectory (like below figure, blue element=1 and white element=0, the summation along red curve trajectory is equal to 10). I calculate this trajectory with a nonlinear function named t, which is a function of three unknown parameters (t(x1,x2,x3)). This function generates a 1*m vector.
I am going to find these 3 unknown parameters that generate a trajectory (or row index of elements for each column). t(j) is the row index of an element in the jth column. If I sum up these elements I will reach maximized value. My objective is that maximize the summation of fij elements along to generated trajectory (or (t(j),j) index) by nonlinear global optimization. If it is possible, please help me that how can I do this in Matlab. Please assume that we don't want to use error function such as least squares.
fij=[f(1,1) ... f(1,m)
.
.
.
f(n,1) ... f(n,m)], size (fij) = n*m
tm=[t(1) ... t(m)], size (tm) = 1*m
Maximze ---> sum(fij (t(j),j)), for j=1:m
Many thanks for your considerations in advance.
Best regards

답변 (1개)

Matt J
Matt J 2019년 1월 9일
편집: Matt J 2019년 1월 10일
If fij is always binary, it seems very peculiar not to pose this as a least squares curvefit.
If f is not binary (or even if it is), you could apply ga, in which case I would probably write the fitness function like this:
x=ga( @(x)objective(x,f) , ________________ );
function val = objective(x,f)
[n,m]=size(f);
tj=t(x);
j=1:m;
val = -sum( interp2(f,j,tj) );
end

카테고리

Help CenterFile Exchange에서 Nonlinear Optimization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by