I wanna write a code to solve multiple simultaneous equations,
Like this :
F1=(a-b)^2+(d-e)^2;
F2=(a-b)^2+(-d-e)^2;
F3=(a-b)^2+(2*g-d-e)^2;
F4=(-a-b)^2+(d-e)^2;
F5=(-a-b)^2+(-d-e)^2;
F6=(-a-b)^2+(2*g-d-e)^2;
F7=(2*c-a-b)^2+(d-e)^2;
F8=(2*c-a-b)^2+(-d-e)^2;
F9=(2*c-a-b)^2+(2*g-d-e)^2;
And F1~F9 I know values are f=[10 26 34 50 58 74 122 146 170];
But I need to assume that I don't know which value is F1~F9,
F1 might is a value among f[10 26 34 50 58 74 122 146 170],and so on.
I wanna know can these above multiple simultaneous equations be solved by Matlab?
Thank you in advance!

2 commentaires

Walter Roberson
Walter Roberson le 18 Mai 2015
The values a, b, c, d, e, g: are they real-valued? Are they integers? Is there a limited number of values they can be, and if so is it the same set of values for each of the variables?
Lin Che-Kuan
Lin Che-Kuan le 20 Mai 2015
Thanks for your comment. I'll describe my question clearly.

Connectez-vous pour commenter.

 Réponse acceptée

Torsten
Torsten le 20 Mai 2015
f=[10 34 58 26 50 74 122 146 170] and [a b c d e g]=[4 1 8 3 2 6]
or
f=[10 34 58 122 146 170 26 50 74] and [a b c d e g]=[7 4 8 3 2 6]
or
f=[10 58 34 26 74 50 170 122 146] and [a b c d e g]=[4 1 8 4 3 6]
or
f=[10 58 34 122 170 146 26 74 50] and [a b c d e g]=[7 4 8 4 3 6]
Nothing you should try with MATLAB - it's a brainteaser.
Best wishes
Torsten.

6 commentaires

Sorry, the third should read
f=[10 58 34 26 74 50 122 170 146] and [a b c d e g]=[4 1 8 4 3 6]
Best wishes
Torsten.
Lin Che-Kuan
Lin Che-Kuan le 20 Mai 2015
Modifié(e) : Lin Che-Kuan le 20 Mai 2015
Thanks a lot!! I wanna ask which tool you use to solve this question? Or you solve it by yourself?
Torsten
Torsten le 20 Mai 2015
Yes, it's a _brain_teaser.
Best wishes
Torsten.
Lin Che-Kuan
Lin Che-Kuan le 20 Mai 2015
Sorry, are you mean "a_brain_teaser" is a tool ? or you just solve this question by yourself?
If "a_brain_teaser" is a tool,can you provide the website or download link ?
Thanks a lot !
You may try integer linear programming to solve the system
sum_{j=1}^{9} x_1j * F_j =((a-b)^2+(d-e)^2)
sum_{j=1}^{9} x_2j * F_j =((a-b)^2+(-d-e)^2)
...
sum_{j=1}^{9} x_9j * F_j = ((2*c-a-b)^2+(2*g-d-e)^2)
sum_{j=1}^{9} x_ij = 1 (i=1,...,9)
sum_{i=1}^{9} x_ij = 1 (j=1,...,9)
0<=x_ij<=1 (i,j = 1,...,9)
x_ij integer
a,b,c,d,e,g integer
where
F=[10 26 34 50 58 74 122 146 170]
Best wishes
Torsten.
Lin Che-Kuan
Lin Che-Kuan le 20 Mai 2015
Thank you very much!!! That's really helpful to me. Many thanks!

Connectez-vous pour commenter.

Plus de réponses (2)

Torsten
Torsten le 11 Mai 2015

0 votes

Not clear what you mean.
Best wishes
Torsten.

1 commentaire

Lin Che-Kuan
Lin Che-Kuan le 18 Mai 2015
Thanks for your comment. I'll describe my question clearly.

Connectez-vous pour commenter.

John D'Errico
John D'Errico le 11 Mai 2015

0 votes

If you have no idea which of those values are assigned to F1 F2, etc., AND you have no idea what are the other parameters {a,b,c,d,e}, then no, you cannot solve a problem where you know absolutely nothing.

1 commentaire

Lin Che-Kuan
Lin Che-Kuan le 18 Mai 2015
Thanks for your comment. I'll make sure for my code.

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by