Solving a constrained optimization problem

I am trying to solve an optimization problem in matlab:
minimize( sum_{i,j}(f(M(i,j))) + err )
subject to: - norm(M) < err
- err > 0
- if j == i+1: M(i,j) > 1
- if j == i-1: M(i,j) < -1
- else: -1 <= M(i,j) <= 1
where: - f is a non convex function in general
- M is an n by n matrix
I looked at the constrained optimization toolbox but could not find how to solve this problem.
Can anyone point me which function I should use?

 채택된 답변

Alan Weiss
Alan Weiss 2015년 4월 24일

1 개 추천

If you look in the Optimization Decision Table you see that for a constrained nonlinear problem you should use fmincon. The constraint norm(M) < err is a nonlinear inequality constraint. The other constraints on M(i,j) are bound constraints.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

댓글 수: 3

Erick
Erick 2015년 4월 30일
Thank you. so, to make sure, since I want to optimize overM and err, I need to create a vector A = [M(:),err], extract M and reshape it inside the objective function?
That sounds right, with the proviso that you make
A = [M(:);err];
I mean, make a column vector, using a semicolon before err.
Alan Weiss
MATLAB mathematical toolbox documentation
Erick
Erick 2015년 5월 1일
That works. Thank you for your help!

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

추가 답변 (0개)

태그

질문:

2015년 4월 23일

댓글:

2015년 5월 1일

Community Treasure Hunt

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

Start Hunting!

Translated by