second-degree linear system

6 ビュー (過去 30 日間)
Francesco Gregorini
Francesco Gregorini 2018 年 9 月 28 日
編集済み: ANKUR KUMAR 2018 年 9 月 28 日
I want to solve a second-degree linear system, but I can not find anything. Want to resolve a system like this: {x^(2)−xy = y^(2)+1 ; 12x+4+y=0 is there any Matlab function that solves this type of system? I could have an example of a code?

採用された回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2018 年 9 月 28 日
編集済み: KALYAN ACHARJYA 2018 年 9 月 28 日
syms x y
[solx,soly]=solve(x^2-x*y-y^2-1==0, 12*x+4+y==0)

その他の回答 (1 件)

ANKUR KUMAR
ANKUR KUMAR 2018 年 9 月 28 日
編集済み: ANKUR KUMAR 2018 年 9 月 28 日
ly make all equation equal to 0. Write this in a function and save this as as first.m
function F = first(x)
F(1)=(x(1)^2)-(x(1)*x(2))-(x(2)^2)-1;
F(2)=12*x(1)+4+x(2);
end
Now type this in command window
fun = @first;
x0 = [0,0];
x = fsolve(fun,x0)
Type this to get the iterated result.
options = optimoptions('fsolve','Display','iter');
[x,fval] = fsolve(@first,x0,options)

カテゴリ

Help Center および File ExchangeEquation Solving についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by