function [k, X, Y, pasos, HESSIAN] = vnnolinealaux3(F, signoX, signoXF, k0, X0)
%vnnolinealaux3
%
%   Función auxiliar de vnnolineal. Lanza el problema con las versiones
%   superiores de Matlab.

%necesita vnnolinealaux4.m

[F, signoX, signoXF] = formaproblema(F, signoX, signoXF);
[filas, columnas, ancho] = size(F);
if isempty(k0), k0 = 1; end
if isempty(X0), X0 = ones(1, filas)/filas; end
LB = [0, zeros(1, filas)];
UB = [Inf, Inf*ones(1, filas)];
Aeq = [0, ones(1, filas)];
Beq = 1;
OPTIONS = optimset('Display', 'off', 'TolFun', 1e-12, 'TolX', 1e-12);
[V,FVAL,EXITFLAG,OUTPUT,LAMBDA,GRAD,HESSIAN] = fmincon(@(V) -V(1),[k0,X0],[],[],Aeq,Beq,LB,UB,@(V) vnnolinealaux4(V,F),OPTIONS);
k = V(1);
X = V(2:filas+1);
Y = LAMBDA.eqnonlin;
mu = LAMBDA.eqlin;
pasos = OUTPUT.iterations;
[X, Y] = formasolucion(X, Y, signoX, signoXF);