
Sum of a function
1 次查看(过去 30 天)
显示 更早的评论
Hello everyone, I am stucked on how to write particular code for a Nash-Cournout oligopolistic equilibrium problem. I have written everything correctly and it ran successfully. The only situation I am in presently is trying to vary a particular step. To be more precise
I need code for the following:






https://www.mathworks.com/matlabcentral/answers/uploaded_files/226241/Screenshot_20190625-093751.png
Thanks
0 个评论
采纳的回答
Himanshu Rai
2019-6-25
编辑:Himanshu Rai
2019-6-25
The expression below should solve your problem. Also write questions properly -
would be scalar, so c is a vector. P and x are normal matrices, and q is a vector. This should solve your problem.

PS - Also update your question, and attach the image file there
c = x' * P * x / 2 + q' * x
8 个评论
Himanshu Rai
2019-6-25
Well if
is
, then
can't be calculated, because again the matrices are incompatible



更多回答(1 个)
Olawale Kazeem
2019-6-25
10 个评论
Himanshu Rai
2019-6-25
This is not x, but
.
is a vector but x is a matrix. And what you denote by c above is actually 



另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!