I need to create a random vector $v$ of size $n$ with the condition that $\|v\|_1 = 10^{-8}$.
I was thinking of creating it like v = rand(n, 1) * 10e-8, but it does not seem to be robust, especially with large $n$s.
Is there a common way to do this?
If it's really the $\|\|_1$ you are thinking about, you have to divide aby the seum of coordinates :
BUT, doing that, you have only positive coordiantes. It would be better to consider ;
(please note the $abs(...)$).
Remark : you can also use norm(v,1).