Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
tranlsate a matriciel expression in matlab language
조회 수: 1 (최근 30일)
이전 댓글 표시
I have the following equation, wich can be writted in matrciel form as :
R= w'C + w'βRm where Rm is a scalar, w C and β are column vector of n elements, this may be expressed as
R=
wici +
βiRm equation 1
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/197290/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/197291/image.png)
The second equation can be expressed in matriciel form as:
S= w’Σw equation 2 where Σ is (n,n) matrix
and i have a constraint
equation 3
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/197293/image.png)
I would like to write equations 1, 2 and 3 in matlab expression, i request help for that.
댓글 수: 0
답변 (1개)
Torsten
2018년 11월 28일
편집: Torsten
2018년 11월 28일
R = w.'*C + Rm*w.'*beta;
S = w.'*Sigma*w;
eqn3 = sum(w)-1.0;
댓글 수: 2
Torsten
2018년 11월 28일
I don't understand what you mean.
obj=@(w) w.'*Sigma*w + w.'*C + Rm*w.'*beta
works. e.g. to define the objective function if Sigma, C, Rm and beta are defined beforehand.
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!