MATLAB: What’s the best way to check if a system of one equation and one inequality has any solution

equationsolve

Hello
I've tried the solve function, but it gave me empty result:
syms x y
>> cond1 = x^2/25 + y^2/25 == 1;
>> cond2 = y <= x-4;
>> conds = [cond1 cond2];
>> sol = solve(conds, [x y], 'ReturnConditions', true);
Tried it on wolframalpha which shows that there is solution : https://www.wolframalpha.com/input/?i=x%5E2%2F25+%2B+y%5E2%2F25+%3D+1+and+y+%3C%3D+x-4
So what do you recommend if I'm not interested in the solutions only want to know if there is any solution or not?

Best Answer

Use "fmincon" with an arbitrary objective function (e.g. 0).