function [solucionL] = comprobacion(sol,g1,g2,g3,g4) syms x1 x2 solucionL = "No se encuentra"; if ~any(structfun(@isempty, sol)) if subs(g1,{x1 x2},{sol.x1 sol.x2}) <= 0 if subs(g2,{x1 x2},{sol.x1 sol.x2}) <= 0 if subs(g3,{x1 x2},{sol.x1 sol.x2}) <= 0 if subs(g4,{x1 x2},{sol.x1 sol.x2}) <= 0 disp(sol) solucionL = sol; else solucionL = "No se encuentra"; end end end end end end