필터 지우기
필터 지우기

How should I make A and b matrix in fmincon function?

조회 수: 5 (최근 30일)
Mateusz
Mateusz 2013년 10월 9일
댓글: Mateusz 2013년 10월 9일
Hello!
I have problem with minimization of my function. I would like to use fmincon function. To use it I need to make two matrix: A(coefficients befor variables in equetion) and b(free coefficient). It's my equetion: z=a+b*x1+c*x2+d*x3+e*x1x2+f*x1x3+g*x2x3+h*x1.^2+x2.^2+x3.^2 Can someone tell me how should I make these two matrix?
I'll really appreciate your help!
Mateusz

채택된 답변

Ahmed
Ahmed 2013년 10월 9일
편집: Ahmed 2013년 10월 9일
fmincon is for minimization of a function under linear constraints A*X<=b. As you gave no information about your constraints, no statement about A and b can be made. Do you have any constrains? If not, then you can use fminunc, for unconstrained optimization, or if you want to use fmincon, just use A=[]; and b=[];
  댓글 수: 1
Mateusz
Mateusz 2013년 10월 9일
I didn't thought that [] can be empty.It work. Thank you very much!

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

추가 답변 (1개)

Alan Weiss
Alan Weiss 2013년 10월 9일
Alan Weiss
MATLAB mathematical toolbox documentation

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by