% -*- texinfo -*- % @deftypefn {Function File} {[ @var{x},@var{inf},@var{msg} ] =} symfsolve (...) % Solve a set of symbolic equations using fsolve. There are a number of % ways in which this function can be called. % % This solves for all free variables, initial values set to 0: % % @example % symbols % x=sym('x'); y=sym('y'); % f=x^2+3*x-1; g=x*y-y^2+3; % a = symfsolve(f,g); % @end example % % This solves for x and y and sets the initial values to 1 and 5 respectively: % % @example % a = symfsolve(f,g,x,1,y,5); % a = symfsolve(f,g,@{x==1,y==5@}); % a = symfsolve(f,g,[1 5]); % @end example % % In all the previous examples vector a holds the results: x=a(1), y=a(2). % If initial conditions are specified with variables, the latter determine % output order: % % @example % a = symfsolve(f,g,@{y==1,x==2@}); % here y=a(1), x=a(2) % @end example % % The system of equations to solve for can be given as separate arguments or % as a single list/cell-array: % % @example % a = symfsolve(@{f,g@},@{y==1,x==2@}); % here y=a(1), x=a(2) % @end example % % If the variables are not specified explicitly with the initial conditions, % they are placed in alphabetic order. The system of equations can be comma- % separated or given in a list or cell-array. The return-values are those of % fsolve; @var{x} holds the found roots. % @end deftypefn % @seealso{fsolve}