I have these two equations where x, y and z are variables and p1, p2 and p3 are parameter. Can MATLAB find parametric/symbolic solutions for x y z based on p1, p2, p3?
2(x−p1)+2(xy−p3)y = 02(y−p2)+2(xy−p3)x = 0
I have these two equations where x, y and z are variables and p1, p2 and p3 are parameter. Can MATLAB find parametric/symbolic solutions for x y z based on p1, p2, p3?
2(x−p1)+2(xy−p3)y = 02(y−p2)+2(xy−p3)x = 0Copyright © 2021 Jogjafile Inc.
Simply put yes. Take all of your variables, use
symsto define each of your variables so that they are symbolic variables, then usesolveto solve the equation for you. You specify the two equations as two parameters intosolve. The output (which we will store insol) will return a structure that contains anxfield and ayfield, as your equation is defined with respect to two variables, andp1,p2,p3are parameters. In other words, do this:You can access the solution of what
xandyare by accessing each of their respective fields:You will get a warning though, stating that the solution is parametrized by symbols, but that is to be expected. Specifically: