How to solve 3 equation 2 variable system?

3 views (last 30 days)
I'm trying to solve these equations:
((((4330-4158)*0.000173-0)*x)+(((4330-4158)*0.000173-0)^(2)*y))28316.85=4.09945
((((4340-4158)*0.000173-0)*x)+(((4340-4158)*0.000173-0)^(2)*y))28316.85=4.1565
((((4513-4158)*0.000173-0)*x)+(((4513-4158)*0.000173-0)^(2)*y))28316.85=7.6936
But when I go with
[x y]=solve('((((4330-4158)*0.000173-0)*x)+(((4330-4158)*0.000173-0)^(2)*y))28316.85=4.09945', '((((4340-4158)*0.000173-0)*x)+(((4340-4158)*0.000173-0)^(2)*y))28316.85=4.1565', '((((4513-4158)*0.000173-0)*x)+(((4513-4158)*0.000173-0)^(2)*y))28316.85=7.6936')
I get and error message about my solve argumentL --> Check for missing argument or incorrect argument data type in call to function 'solve'.

Accepted Answer

Cris LaPierre
Cris LaPierre on 4 Dec 2020
b = [4.09945; 4.1565; 7.6936]./28316.85;
A = [((4330-4158)*0.000173-0) ((4330-4158)*0.000173-0)^2;
((4340-4158)*0.000173-0) ((4340-4158)*0.000173-0)^2;
((4513-4158)*0.000173-0) ((4513-4158)*0.000173-0)^2];
c = A\b % x=c(1), y=c(2)
c = 2×1
0.0051 -0.0110
btw, your expressions are missing a "*" before the 28316.85.
  4 Comments
Jorge Villarreal
Jorge Villarreal on 4 Dec 2020
Ok, I see.
I need to investigate how to plot eq then to analyze the data and get the correct solution. I just did a 20 minute video about overdetermined systems and I believe this one is inconsistent. If I plot the eq, I can then narrow my search for values.
Thanks!
Jorge Villarreal
Jorge Villarreal on 4 Dec 2020
I am so sorry! I misintepreted a value. Turns out the first answer you gave was the corret one.

Sign in to comment.

More Answers (0)

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!