
[L,U,P] = lu(A)
%% 
% We can solve this as before by incorporating the permutation. 
%%
x = backsub( U, forwardsub(L,P*b) )
%% 
% However, if we use just two outputs with |lu|, we get $\mathbf{P}^T\mathbf{L}$ 
% as the first result.
%%
[PtL,U] = lu(A)
%% 
% MATLAB has engineered the backslash so that systems with triangular _or 
% permuted triangular_ structure are solved with the appropriate style of triangular 
% substitution.
%%
x = U \ (PtL\b)
%% 
% The pivoted factorization and triangular substitution