Hi, I have a 3D-matrix and I want to calculate differences between columns, fixed the first column (this column can have negative values), and the value be positive or zero, i.e., for each 3D dimension calculate: max ( column(i)-column(1), 0 ), but if values in columns i are zero, I don't want to calculate the difference anb the result be zero, i.e.,
I give you an example:
Any suggestion? Thank you!
Best Answer