You can use a single solve to get an Interval that satisfies both inequalities -
Running
solve('6*kp+72>0, 18-kp>0')
will give an answer of Dom::Interval(-12, 18)
سؤال
I need to build a script in which i have to calculate the intersect solutions for some equations.
For example:
18 - Kp > 0 6Kp + 72 > 0
In matlab code:
syms kp solve('18-kp>0')
ans =
Dom::Interval(-Inf, 18)
solve('6*kp+72>0')
ans =
Dom::Interval(-12, Inf)
I know that the intersect of the solution is (-12, 18) but how do i write in Matlab? Can i take the boundary of the intervals? For example: max (-inf,-12) = -12 min (18, inf) = 18 so the intersection will be (-12, 18) I'm not running a MUPAD Interface! Thank you!
المحلول
You can use a single solve to get an Interval that satisfies both inequalities -
Running
solve('6*kp+72>0, 18-kp>0')
will give an answer of Dom::Interval(-12, 18)