function writearq(options,nome)

fid = fopen(nome,'a');
[fpath,nvar]=fileparts(nome);

fprintf(fid,'%s.DerivativeCheck=''%0.5s'';\n',nvar,options.DerivativeCheck);  
fprintf(fid,'%s.Diagnostics=''%0.5s'';\n',nvar,options.Diagnostics);  
fprintf(fid,'%s.Display=''%0.5s'';\n',nvar,options.Display);  
fprintf(fid,'%s.GradConstr=''%0.5s'';\n',nvar,options.GradConstr);
fprintf(fid,'%s.GradObj=''%0.5s'';\n',nvar,options.GradObj);
fprintf(fid,'%s.Hessian=''%0.5s'';\n',nvar,options.Hessian);
fprintf(fid,'%s.HessUpdate=''%0.5s'';\n',nvar,options.HessUpdate);
fprintf(fid,'%s.Jacobian=''%0.5s'';\n',nvar,options.Jacobian);
fprintf(fid,'%s.LargeScale=''%0.5s'';\n',nvar,options.LargeScale);
fprintf(fid,'%s.LevenbergMarquardt=''%0.5s'';\n',nvar,options.LevenbergMarquardt);
fprintf(fid,'%s.LineSearchType=''%0.5s'';\n',nvar,options.LineSearchType);
fprintf(fid,'%s.MeritFunction=''%0.5s'';\n',nvar,options.MeritFunction);

if ~isempty(options.GoalsExactAchieve)
fprintf(fid,'%s.GoalsExactAchieve=%0.5e;\n',nvar,options.GoalsExactAchieve);  
end

if ~isempty(options.DiffMaxChange)
fprintf(fid,'%s.DiffMaxChange=%0.5e;\n',nvar,options.DiffMaxChange);  
end

if ~isempty(options.DiffMinChange)
fprintf(fid,'%s.DiffMinChange=%0.5e;\n',nvar,options.DiffMinChange);  
end

if ~isempty(options.HessPattern)
fprintf(fid,'%s.HessPattern=%0.5i;\n',nvar,options.HessPattern);
end

if ~isempty(options.JacobPattern)
   fprintf(fid,'%s.JacobPattern=%0.5e;\n',nvar,options.JacobPattern);  
end

if ~isempty(options.MaxFunEvals)
fprintf(fid,'%s.MaxFunEvals=%0.5e;\n',nvar,options.MaxFunEvals);  
end

if ~isempty(options.MaxIter)
fprintf(fid,'%s.MaxIter=%0.5e;\n',nvar,options.MaxIter);  
end

if ~isempty(options.MaxPCGIter)
fprintf(fid,'%s.MaxPCGIter=%0.5e;\n',nvar,options.MaxPCGIter);  
end

if ~isempty(options.MinAbsMax)
fprintf(fid,'%s.MinAbsMax=%0.5e;\n',nvar,options.MinAbsMax);  
end

if ~isempty(options.PrecondBandWidth)
fprintf(fid,'%s.PrecondBandWidth=%0.5e;\n',nvar,options.PrecondBandWidth);  
end

if ~isempty(options.TolCon)
fprintf(fid,'%s.TolCon=%0.5e;\n',nvar,options.TolCon);  
end

if ~isempty(options.TolFun)
fprintf(fid,'%s.TolFun=%0.5e;\n',nvar,options.TolFun);  
end

if ~isempty(options.TolPCG)
fprintf(fid,'%s.TolPCG=%0.5e;\n',nvar,options.TolPCG);  
end

if ~isempty(options.TolX)
fprintf(fid,'%s.TolX=%0.5e;\n',nvar,options.TolX);  
end

if ~isempty(options.TypicalX)
fprintf(fid,'%s.TypicalX=%0.5e;\n',nvar,options.TypicalX);  
end

fclose(fid);

endfunction
