MATLAB: I need to helpe to solve this equation x-y=12, 0

@yuiioMATLAB

I need to helpe to solve this equation by matlab x-y=12, 0<x<22, 0<y<100

Best Answer

As I said, there are infinitely many solutions.
As well, it is often the case that the solution set of a system of inequalities is a rather complicated region. For the simple problem you have posed, this seems to work.
syms x y
assume(0 <= x & x <= 22)
assume(0 <= y & y <= 100)
sol = solve(x-y == 12,x,'returnconditions',true);
sol.x
ans =
y + 12
sol.conditions
ans =
y <= 10
Related Question