vector output from solve fun-- [sol1,sol2​]=solve([e​qns,[x,y])

Hi,
I am new user to Matlab. I have 2 vectors of linear equations. each vector has 3 equations.
Set_1=[f(x1,y1); f(x2,y2); f(x3,y3)] ;
Set_2=[g(x1,y1); g(x2,y2); g(x3,y3)];
the function f, and g are a simple linear equations form
The equations can be solved simultaneously. For exmple; I solved x1,y1 using solve ([f(x1,y1), g(x1,y1)], [x1,y1])
However, is there a way to solve for all the variables one time ? instead of repeating the step (using solve) for every line of the equations in Set_1, & Set_2.
I wish there is a way I can get the solutions in a vector from a for-loop or one step setting of the equations ...like [x1,x2,x3,y1,y2,y3] =solve ([Set_1==0,Set_2==0,[x,y])
can I do this in matlab, please
Thanks

Answers (0)

Asked:

on 30 Nov 2018

Edited:

on 30 Nov 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!