I know how to convert linear equations to matrix by using equationstomatrix function
syms x y z;
[A, b] = equationsToMatrix([x + y - 2*z == 0, x + y + z == 1, 2*y - z + 5 == 0], [x, y, z])
%solution of the equation set
A =
[ 1, 1, -2]
[ 1, 1, 1]
[ 0, 2, -1]
b =
0
1
-5
unfortunately,equationsToMatrix
can not be used for nonlinear equations. If I want to convert multiple nonlinear equations to matrix, is there any possible way to do this?
for example, I have three equations:
x^2 + y^2+ 1=0,
x - y + 1=0,
x^2+xy-2=0,
I want to get following result
A=
[1, 1, 1, 0, 0, 0 ]
[0, 0, 1, 1, -1, 0 ]
[1, 0, -2, 0, 0, 1 ]