Effacer les filtres
Effacer les filtres

how to solve 3 equations with 2 unknowns in matlab?

3 vues (au cours des 30 derniers jours)
vinod kumar govindu
vinod kumar govindu le 20 Jan 2017
Commenté : Andrei Bobrov le 20 Jan 2017
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?

Réponse acceptée

Torsten
Torsten le 20 Jan 2017
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 commentaires
vinod kumar govindu
vinod kumar govindu le 20 Jan 2017
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 le 20 Jan 2017
FG = A\b;
F = FG(1);
G = FG(2);

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by