Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
using "solve" and getting rid of arbitrary parameters
I am trying to solve a system of equations whose answer will depend on arbitrary values.
For example, consider the following system of 2 equations and 3 unknowns:
[code]syms x1 x2 x3
A=[a.x1 a.x2 a.x3][/code]
this gives me an answer that depends on an arbitrary value z. (infinitely many solutions).
I would like MATLAB to directly give me an answer (with no arbitrary values). So for instance, I would like to get an answer where the x1 value is positive. Is there a way to do that?
I am using "solve" in a subroutine, and after that, I would like to test the answer to see if it is a non negative array. But whenever the code reaches the answer, it tells me there is an error (obviously) because of the unknown parameter.