필터 지우기
필터 지우기

How to use Simulated Annealing Algorithm with matrices in the function

조회 수: 2 (최근 30일)
Liaquat Ali
Liaquat Ali 2013년 5월 24일
I want to find the minimum of the function by Simulated Annealing Algorithm where the function invovles the matrices and FFT also
like this f = Em.*exp(angle(fftshift(ifft2(fftshift(sqrt(v1)*Emmf11a+sqrt(v2)*Emmf11b.*exp(-1i*(v3*pi))));
where Em, Emmf11a, Emmf11b are matrices of 1000x1000 and we have variables as v1, v2 and v3. and conditions are v1 + v2 = 1 and 0=< v3 >=2*pi
or is there any other algorithm that can determine the minimum or the maximum of the function ??

답변 (1개)

Alan Weiss
Alan Weiss 2013년 5월 24일
Optimization Toolbox and Global Optimization Toolbox minimize scalar functions. If your objective function f is a scalar, not a vector or matrix, then the toolbox functions can work.
simulannealbnd works only on bounded problems, so you would have to reformulate your problem from three decision variables to two as follows:
v2 = 1 - v1
Minimize over v1 and v3. Use the vector x = (v1,v3), a 2-D vector, with bounds
lb = [-Inf,0];
ub = [Inf,2*pi];
For details of the syntax for bounds, see the documentation.
Alan Weiss
MATLAB mathematical toolbox documentation
  댓글 수: 4
Liaquat Ali
Liaquat Ali 2013년 6월 4일
Actually f is not a scalar rather it is a 1000X1000 matrix and i want to find the values of V1, V2 and V3 for which the f is maximum ??
Alan Weiss
Alan Weiss 2013년 6월 4일
편집: Alan Weiss 2013년 6월 4일
What does it mean to find the maximum of a matrix? I know what it means to find the maximum of one element in a matrix. However, as soon as you have two or more elements, it can be that changing the V matrix causes one element to increase, another to decrease, and so there is a trade off. Therefore, there is no such thing as the maximum of a function that has two or more elements. There is multiobjective optimization (see my previous link) that explicitly deals with multiple objective functions.
It is possible you want to maximize the sum of squares of the elements of your matrix. In that case, sum the squares as your objective function, and maximize that.
Alan Weiss
MATLAB mathematical toolbox documentation

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Genetic Algorithm에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by