how to code the union or the intersection of different "Dom::Interval" MUPAD objetcts?

4 views (last 30 days)
I got this example of a symbolic matrix with an "ep" variable that is greater than zero:
[ 3, 2, 5]
[ 6, 4, 7]
[ ep, 3/2, 0]
[ (4*ep - 9)/ep, 7, 0]
[ -(ep*(7*ep - (3*(4*ep - 9))/(2*ep)))/(4*ep - 9), 0, 0]
[ 7, 0, 0]
Where I need to solve this inequation system:
ep>0
(4*ep - 9)/ep >0
-(ep*(7*ep - (3*(4*ep - 9))/(2*ep)))/(4*ep - 9) >0
The way im approaching this is doing first:
sol=solve((4*ep - 9)/ep >0,ep);
Where:
vpa(sol)=
Dom::Interval(-Inf, 0.0)
Dom::Interval(2.25, Inf)
Then I'm doing the following:
sol=solve(-(ep*(7*ep - (3*(4*ep - 9))/(2*ep)))/(4*ep - 9) >0,ep);
Which also produces an undesired answer:
solve([0.0 < -(1.0*ep*(7.0*ep - (0.5*(12.0*ep - 27.0))/ep))/(4.0*ep - 9.0)], [ep])
that should in fact be :
vpa(sol)=
Dom::Interval(2.25, Inf)
My questions are:
  1. Why does this happen?
  2. And supposing it worked, how could I code the union and intersection of this Dom::intervals objects?
For example, I need to intersect the solution intervals obtained from every row, considering the union of those rows that have more than one solution interval, something like this:
[Dom::Interval(2.25, Inf) U Dom::Interval(-Inf, 0.0) ] intersected with [ Dom::Interval(2.25, Inf)]
That should produce the answer:
Dom::Interval(2.25, Inf)
I'm creating a Routh Hurwitz stability criterion algoritm and I need to work with symbolic variables and intervals for the special case (first element zero). I need to compute the interval of the positive variable "ep" that keeps the system stable.
Thanks in advance.

Answers (0)

Products


Release

R2013a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!