# Perform fit and can mathematica find a function dependent on n?

Would it be possible to fit the following

H = sum(qcB x AcB(i) x Fc(n)*OnOffB(i)) + sum(qcT x AcT(i) x Fc(n)*OnOffT(i))

i is index 1-3

Where AcT(i) and AcV(i) are fixed constants for i = 1 to 3.

qcB is single fitted value. qcT single fitted value.

OnOffB(i) is 1 or 0 (One or Zero)

n = Sum(OnOffB(i) + OnOffT(i)) is greater than equal to 1 or less that or equal to 4.

1 >= n <= 4

Fc is correction and is a function of n, Fc(1) = 1 (by assumption) Fc(2) = ?? Fc(3) = ?? Fc(4) = ??

That leaves 5 unknowns qcB, qcT, Fc(2), Fc(3) , Fc(4) , and have 15 values of H to fit to, under different combinations.

Here is the data set, first 3 columns (index i 1 to 3) are first sum involving qcB x AcB(i)..., and next three columns (index i 1 to 3) are sum involving second sum(qcT x AcT(i)...), and final column is H value.

{{0., 0., 0., 1.3, 0., 0., 1.1}, {0., 0., 0., 1.3, 0., 0.9, 1.7}, {1.3, 0., 0., 1.3, 0., 0.9, 2.5}, {1.3, 0., 0.9, 1.3, 0., 0.9, 2.5}, {1.3, 0., 0.9, 1.3, 0., 0.9, 2.6}, {1.3, 1.1, 0.9, 0., 1.1, 0., 3.}, {1.3, 1.1, 0.9, 0., 1.1, 0., 3.4}, {1.3, 1.1, 0.9, 0., 1.1, 0., 3.1}, {1.3, 1.1, 0.9, 0., 1.1, 0., 3.1}, {1.3, 1.1, 0.9, 0., 1.1, 0., 3.2}, {1.3, 0., 0.9, 1.3, 0., 0., 2.4}, {0., 1.1, 0., 1.3, 0., 0.9, 2.3}, {0., 1.1, 0.9, 0., 1.1, 0.9, 2.7}, {1.3, 0., 0., 0., 0., 0.9, 2.8}, {1.3, 1.1, 0.9, 0., 0., 0., 2.3}}

Do I need to specify a function for Fc in terms of n or can mathematica find a function for me?

• Please, follow the instructions in editing the post. Type the MMA code so we can help you in abetter way. – José Antonio Díaz Navas Nov 9 '17 at 17:35
• A couple of years ago I got the following comment from one of the experts here (somewhat paraphrased): "You've been a member for quite some time now. It's time you learned how to format code properly for this forum." – JimB Nov 9 '17 at 18:17