I have to calculate this in Matlab:
$\operatorname{argmin}_{\lambda} \|a-\lambda b\|_1$,
where $a$ and $b$ vectors in $\mathbb{R}^n$. How can I minimize this in Matlab with a fixpoint iteration? I have to transform it to in equation like $f(\lambda)=\lambda$, but how can I do it with an argmin.
edit: I want to do it with an iteration because there will be another term for regularization. So I need to minimize this in the end:
$\operatorname{argmin}_{\lambda} \|a-\lambda b\|_1+ \beta|\lambda|$,
where $\beta\in [0,\infty)$.
$$f(\lambda)=\left\|a-\lambda b\right\|_1 = \sum_{k=1}^{n} \left| a_k -\lambda b_k \right| \tag{1}$$ and for any $a_k,b_k\in\mathbb{R}$, $\,f_k(\lambda)=\left|a_k-\lambda b_k\right|$ is a non-negative and convex function.
In particular $f(\lambda)$ is a non-negative and convex function as well. We may assume $b_k\neq 0$ without loss of generality, and the minimum of $f$ over $\mathbb{R}$ is attained at a point of the form $\lambda=\frac{a_k}{b_k}$ for some $k\in[1,n]$. The problem can be solved in a single $\textbf{for}$ cycle.