- #1
Agent M27
- 171
- 0
I have three n x n matrices for which I am try to compute the saturation of each element in the matrix. The function to find this is S:=1-3(Min r,g,b) where r,g,b are the color channel matrices. For my output I am trying to get it to return an n x n matrix with each element having the function S applied to it. When I run that code it returns a single value, not a matrix, that is between 0 & 1, which is not correct. If I change the function S for example, to be S:=1-3b, it returns the desired result of the original n x n matrix after the function has been applied. So what I think mathematica is doing is, it is comparing the elements of the three matrices and using the lowest value of all elements to compute, but what I need it to do is take the minimum valued matrix and then compute the saturation for it. Any assistance would be appreciated. Thanks.
Joe
Joe