Sum of a function
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Olawale Kazeem
am 24 Jun. 2019
Kommentiert: Himanshu Rai
am 25 Jun. 2019
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:
is random for every
is random for every and
is random for every . I need to execute the following Quad program $c_j(x_j) = \frac{1}{2}x{_j}^{'} P_j x_j+ {q_j}^{'} x{_j}$. I will be glad if I can get a prompt help on this.
https://www.mathworks.com/matlabcentral/answers/uploaded_files/226241/Screenshot_20190625-093751.png
Thanks
0 Kommentare
Akzeptierte Antwort
Himanshu Rai
am 25 Jun. 2019
Bearbeitet: Himanshu Rai
am 25 Jun. 2019
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 Kommentare
Himanshu Rai
am 25 Jun. 2019
Well if is , then can't be calculated, because again the matrices are incompatible
Weitere Antworten (1)
Olawale Kazeem
am 25 Jun. 2019
10 Kommentare
Himanshu Rai
am 25 Jun. 2019
This is not x, but . is a vector but x is a matrix. And what you denote by c above is actually
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!