for loop maximize variable system of equations PLS help!!

7 ビュー (過去 30 日間)
savannah Roemer
savannah Roemer 2015 年 8 月 26 日
回答済み: Torsten 2015 年 8 月 27 日
how do you use a for loop to maximize a variable in a system of equations?
such as 3x + 2y = cos phi
4x - 3y = 2cos phi
find a phi that maximizes x for instance

回答 (2 件)

Walter Roberson
Walter Roberson 2015 年 8 月 26 日
I would not use a for loop.
syms x y phi
[solx, soly] = solve(3*x+2*y == cos(phi), 4*x-3*y = 2*cos(phi), x, y);
bestphi = solve(diff(solx(1),phi),phi);

Torsten
Torsten 2015 年 8 月 27 日

カテゴリ

Help Center および File ExchangeNumeric Solvers についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by