function [X,f] = alspgrad_2(A,T,tol,maxiter, lambda)
%Zheng Xia adapted from
% NMF by alternative non-negative least squares using projected gradients
% Author: Chih-Jen Lin, National Taiwan University

% W,H: output solution
% Winit,Hinit: initial solution
% tol: tolerance for a relative stopping condition
% timelimit, maxiter: limit of time and iterations
%lambda = 0;
[m,n] = size(A);
%Xinit = ones(n, 1); %%The initial values for \Theta, the parameter being estimaed
Xinit = ones(n, 1); %%The initial values for \Theta, the parameter being estimaed


[X, f] = nlssubprob(A,T,Xinit,tol,maxiter);

