If we have a function $f$ in the form: $$f(x)=\sum_{j}^{N}c_j \min_i(a_{ij}x+b_{ij})$$ Question:
All of $ a_{ij}$ and $a_{ij}$ are known.
How can I find the slopes of $f$ as optimal as possible. $f$ also hase the form $f(x)=\min_i(A_i x+B_i)$. How to find all of $A_i$ and $B_i$ efficiently???
I am considering to do it in matlab. Actually I did it in matlab, but I am not sure with the result.