Reference Code for Positive Basis Pursuit Denoising
I assume you're after the following optimization problem:

$$\begin{align*}
\arg \min_{x} \; &amp; {\left\| x \right\|}_{1} \\
\text{subject to} \; &amp; A x = b \\
&amp; x \succeq 0
\end{align*}$$

This is pretty simple problem if we pay attention fo the fast that given $ x \succeq 0 $ then $ {\left\| x \right\|}_{1} = \boldsymbol{1}^{T} x $.

This means the above problem is equivalent of:

$$\begin{align*}
\arg \min_{x} \; &amp; \boldsymbol{1}^{T} x \\
\text{subject to} \; &amp; A x = b \\
&amp; x \succeq 0
\end{align*}$$

Now, this is a Linear Programming problem which can be easily solved using MATLAB or any other LP solver.

For instance, in MATLAB it will be something like that:

numRows = 10;
numCols = 100;

mA = randn([numRows, numCols]);
vB = randn([numRows, 1]);

vE = ones([numCols, 1]); %&lt;! Vector of ones to sum vX

vX = linprog(vE, [], [], mA, vB, zeros([numCols, 1]), inf([numCols, 1]));