i try to describe the preconditions first
i have a number of images/matrices that can be imagined to be layers in an image manipulation program. these layers be will be added to form the final output. each layer has a factor from 0 to 1
x_1 * M_1 + x_2 * M_2 + ... = S
the M_i matrices are fix and does not change. The goal is to determine the x_i factors that best (not necessarily the best) approximates a given S
The 2-dimensionality of the matrices is irrelevant for solving the problem. they can be rearranged to form a linear equation system in matrix form.
each matrix M_i is a column of M and together they form an equation
M · x = S
M can be very large (several 10.000 rows, and 100 columns)
do you have suggestions on methods preferably based on libraries to solve this? I know there are many libraries that can solve least square problems but i could not find one that supports constraints. at first fulfilling the >= 0 condition would do it for me
Thanks in advance for your help