Let's divide the problem to 2 parts, the second one is optional.
Part 1
I have 3 linear equtions with N variables where N usually bigger then 3.
- x1*a+x2*b+x3*c+x4*d[....]xN*p = B1
- y1*a+y2*b+y3*c+y4*d[....]yN*p = B2
- z1*a+z2*b+z3*c+z4*d[....]zN*p = B3
Looking for (a,b,c,d,[...],p), others are constant.
The standard Gaussian way won't work because the matrix will be wider then tall. Of course i can use it to eliminate 2 variables. Do you know an algorithm to find out a solution? (I only need one.) More 0s in the solution coefficients are better but not required.
Part 2
The coefficients in the solution must be non-negative.
Requirements: The algorithm must be fast enough to run real time. (1800 per sec on an avrage pc). So trial and error method is a no go. The algorithm will be implemented in C# but feel free to use pseudo language if you want to write code.