How to determine which operand has type 'RootOf' in MuPad?
Show older comments
Hi All,
I have an expression which contains the multiply operands from Type 'solvelib::VectorImageSet', where one of the operands contains a 'RootOf'. I am trying to identify which operand contains the 'RootOf'.
Below is the matlab output from the mupad object 'test':
test =
({matrix([[Ct], [0], [0]])} union Dom::ImageSet(matrix([[(2*Ct)/3 - Ot/3 + Sit/3 - z/3], [Ct/3 + Ot/3 - Sit/3 - (2*z)/3], [z]]), z, RootOf(z1^4 + (z1^3*(- 6*Ct*R^2*T^2 + 3*Ot*R^2*T^2 + 6*R^2*Sit*T^2))/(3*R^2*T^2) - (4*Keq1*Vpore^2*z1^2)/(3*R^2*T^2) + (z1*(4*Ct*Keq1*Vpore^2 + 4*Keq1*Ot*Vpore^2 - 4*Keq1*Sit*Vpore^2))/(3*R^2*T^2) - (Ct^2*Keq1*Vpore^2 + Keq1*Ot^2*Vpore^2 + Keq1*Sit^2*Vpore^2 - 2*Keq1*Ot*Sit*Vpore^2 + 2*Ct*Keq1*Ot*Vpore^2 - 2*Ct*Keq1*Sit*Vpore^2)/(3*R^2*T^2), z1))) minus Dom::ImageSet(matrix([[z], [z1], [0]]), [z, z1], [C_, C_])
My goal is to isolate out the operand that has 'Dom::ImageSet' and contains the 'RootOf'. Is there anyway to identify it by type? Is 'RootOf' even a type that can be used for identification?
For this example I know that
op(op(test,1),2) =
Dom::ImageSet(matrix([[(2*Ct)/3 - Ot/3 + Sit/3 - z/3], [Ct/3 + Ot/3 - Sit/3 - (2*z)/3], [z]]), z, RootOf(z1^4 + (z1^3*(- 6*Ct*R^2*T^2 + 3*Ot*R^2*T^2 + 6*R^2*Sit*T^2))/(3*R^2*T^2) - (4*Keq1*Vpore^2*z1^2)/(3*R^2*T^2) + (z1*(4*Ct*Keq1*Vpore^2 + 4*Keq1*Ot*Vpore^2 - 4*Keq1*Sit*Vpore^2))/(3*R^2*T^2) - (Ct^2*Keq1*Vpore^2 + Keq1*Ot^2*Vpore^2 + Keq1*Sit^2*Vpore^2 - 2*Keq1*Ot*Sit*Vpore^2 + 2*Ct*Keq1*Ot*Vpore^2 - 2*Ct*Keq1*Sit*Vpore^2)/(3*R^2*T^2), z1)))
will give the operand from the main tree that I am seeking, but would like a better way than visual inspection to find where this operand is in the tree structure.
Thanks
Accepted Answer
More Answers (0)
Categories
Find more on Special Values in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!