%PAGELSQMINNORM  Page-wise minimum-norm solution of least-square system
%   X = PAGELSQMINNORM(A,B) computes the minimum-norm solution of the
%   least-square system for each page of the N-D arrays A and B:
%             X(:,:,i) = lsqminnorm(A(:,:,i),B(:,:,i))
% 
%   The pages of A and B must be valid inputs to lsqminnorm.
%
%   If A and B have more than 3 dimensions, then PAGELSQMINNORM implicitly
%   expands the extra dimensions to solve least-square systems of all page
%   combinations:
%             X(:,:,i,j,k) = lsqminnorm(A(:,:,i,j,k),B(:,:,i,j,k))
%
%   All dimensions beyond the first two must have compatible sizes. Two
%   inputs have compatible sizes if, for every dimension, the dimension
%   sizes of the inputs are either the same or one of them is 1.
%
%   X = PAGELSQMINNORM(A,B,TOL) additionally specifies a tolerance, which
%   is used to determine the rank of each page of A. TOL can either be a
%   scalar or an array with size [1 1 size(A,3:ndims(A))]. By default, TOL
%   is computed based on the QR decomposition of each page of A.
%
%   PAGELSQMINNORM(A,B,TOL) is a possible alternative to
%   pagemtimes(pagepinv(A,TOL),B). However, PAGELSQMINNORM is typically
%   more efficient. The two functions are not exactly equivalent, since
%   PAGELSQMINNORM uses the Complete Orthogonal Decomposition (COD) to find
%   a low-rank approximation of A, while pagepinv uses the Singular Value
%   Decomposition (SVD).
%
%   See also LSQMINNORM, PAGEPINV, PINV, DECOMPOSITION

%   Copyright 2023 The MathWorks, Inc.
%   Built-in function.