![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226243/image.png)
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/226178/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226179/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226180/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226179/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226248/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226179/image.png)
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226243/image.png)
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226237/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226238/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226239/image.png)
その他の回答 (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 ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226268/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226266/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226267/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226268/image.png)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!