how to solve 3 equations with 2 unknowns in matlab?

조회 수: 6 (최근 30일)
vinod kumar govindu
vinod kumar govindu 2017년 1월 20일
댓글: Andrei Bobrov 2017년 1월 20일
eqn1=F*125.9-G*355.4==12;
eqn2=-F*251.8-G*125.9==16;
eqn3=F*125.9+G*355.4==13;
i want to find out values of F and G from above equations. Is there any commands in matlab for solving this equations?. Help me to solve this in matlab?

채택된 답변

Torsten
Torsten 2017년 1월 20일
Of course you won't get a solution that exactly solves all three equations.
But you will get a "best" solution in the least-squares sense if you set
A=[125.9 -355.4;-251.8 -125.9; 125.9 355.4];
b=[12; 16; 13];
[F; G]=A\b;
Best wishes
Torsten.
  댓글 수: 2
vinod kumar govindu
vinod kumar govindu 2017년 1월 20일
Thank you for your response torsten. But it was showing error like
??? Error using ==> mldivide Too many output arguments.
Error in ==> G5 at 51
[F,G]=A\B;
Andrei Bobrov
Andrei Bobrov 2017년 1월 20일
FG = A\b;
F = FG(1);
G = FG(2);

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by