passing an array value to fmincon

조회 수: 6 (최근 30일)
Kaiser Ahmed Bhuiyan
Kaiser Ahmed Bhuiyan 2020년 6월 22일
댓글: Kaiser Ahmed Bhuiyan 2020년 6월 22일
Hi , my objective function is shown above. I have to minimize this function for variable "K(capital)", "r" , "C"
however for "a_s" i have an array which i need to pass to the objective function.
My question is ...how can i pass "a_s" to the objective function ? I don't have a clear picture of fmincon function and finding it troubling for this equation.
It would be great ... if somebody can give me the sketch or outline of the code for this function !
  댓글 수: 2
Matt J
Matt J 2020년 6월 22일
편집: Matt J 2020년 6월 22일
What does it mean to you to "minimize" an array-valued function? Do you want N different minimizing values of K,r,C for each of the N elements a_s(i)? Or do you have a mathcing array of observed sigma values as well which you want are trying to curve fit? If the latter, you should probably use lsqcurvefit as opposed to fmincon.
Kaiser Ahmed Bhuiyan
Kaiser Ahmed Bhuiyan 2020년 6월 22일
I meant that , I have an array of variable "a_S" and i would like to pass the values into fmincon objective function

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

답변 (1개)

Matt J
Matt J 2020년 6월 22일
편집: Matt J 2020년 6월 22일
This page talks about passing known parameters. They apply to any variables you might wish to pass, be they arrays, scalars, or even non-numeric variables.

카테고리

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

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by