"Joerg Buchholz" <buchholz@hsbremen.de> wrote in message <jq5j7p$249$1@newscl01ah.mathworks.com>...
> As of R2012a, we can directly solve a vector of equations:
>
> >> syms x y
> >> g = [x^2 + 2*y == 3; 4*x + 5*y == 6]
>
> g =
>
> x^2 + 2*y == 3
> 4*x + 5*y == 6
>
> >> solve (g)
>
> ans =
>
> x: [2x1 sym]
> y: [2x1 sym]
>
> Could a Mathworker please tell us if we can rely on that undocumented(?) feature?
"Joerg Buchholz" <buchholz@hsbremen.de> wrote in message
<jq5j7p$249$1@newscl01ah.mathworks.com>...
> As of R2012a, we can directly solve a vector of equations:
>
> >> syms x y
> >> g = [x^2 + 2*y == 3; 4*x + 5*y == 6]
> >> solve (g)
I have 2011b. Cutting and pasting yields
>>close all, clear all, clc
>>syms x y
>>g = [x^2 + 2*y == 3; 4*x + 5*y == 6]
g =
0
0
solve (g)
Error using char
Conversion to char from logical is not possible.
Error in solve>getEqns (line 245)
vc = char(v);
Error in solve (line 141)
[eqns,vars,options] = getEqns(varargin{:});
Any of these work
solve( 'x^2 + 2*y = 3' , '4*x + 5*y = 6' )
solve( 'x^2 + 2*y = 3' , '4*x + 5*y = 6' )
solve( 'x^2 + 2*y = 3' , '4*x + 5*y = 6' , 'x' , 'y')
solve( 'x^2 + 2*y = 3' , '4*x + 5*y = 6', 'x , y' )
Same as above with " = 'replaced by '  '
>>syms x y
>>solve( 'x^2 + 2*y  3' , '4*x + 5*y  6' )
ans =
x: [2x1 sym]
y: [2x1 sym]
>>ans.x
ans =
31^(1/2)/5 + 4/5
4/5  31^(1/2)/5
>> ans,x, ans.y
Error using sym/subsref
Too many output arguments.
Definitely confusing.
Greg
