Start with, what can we do in symbolic form?
Eq(6) = atand(S/G) >= 30;
Eq(7) = atand(S/G) <= 45;
solve(Eq,S,G,'returnconditions',true)
Warning: Unable to find explicit solution. For options, see
help.
ans =
S: [0×1 sym]
G: [0×1 sym]
parameters: [1×0 sym]
conditions: [0×1 sym]
There are infinitely many real solutions. So solve cannot handle the problem.
Those inequalities are all just linear though, linear in S and G. Even the case of the atan is linear, sicne over a limited region, the tangent function is monotonic. So we know that if
atand(S/G) <= 45
then by taking the tangent of both sides, we do not change the sign of the inequality. That tells us:
S/G <= 1
or
S <= G
Likewise, we can infer that
S/G >= sqrt(3/3)
So we have
S >= sqrt(3)/3*G
There is a nice utility called plotregion, that lives on the file exchange for free download. If we represent this linear sytem of inequalities by the matrix A and vector b, where A*x >= b, we might do:
A = [2 1;-2 -1;-1 1;1 -sqrt(3)/3];
That region in the (S,G) plane is where your solutions live. There are infinintely many pairs of real solutions. It looks like Alpha was willing to generate some of them.
If you wish to show the integer solutions, a simple graphical way to do so is to overlay an integer lattice on top of that domain.
[s,g] = meshgrid(16:18,25:30);
Where you should see the six pairs of integer solutions that live in the solution locus. Five of them lie on the boundary, one is interior.