I would like to make a weight solver, such that:
If I am given three values A B C and a fourth value D, the script will calculate the best approximate weights of A B and C that will give D.
For example, given
A = 10
B = 5
C = 2
and
D = 6.136
I would like the script to calculate approximations such as:
wA = 0.4
wB = 0.31
wC = 0.29
or indeed the exact answer (if it exists):
wA = 0.4
wB = 0.312
wC = 0.288
Please help me! Anything would be appreciated.
If I am given three values A B C and a fourth value D, the script will calculate the best approximate weights of A B and C that will give D.
For example, given
A = 10
B = 5
C = 2
and
D = 6.136
I would like the script to calculate approximations such as:
wA = 0.4
wB = 0.31
wC = 0.29
or indeed the exact answer (if it exists):
wA = 0.4
wB = 0.312
wC = 0.288
Please help me! Anything would be appreciated.