"Omkar PalsuleDesai" <omkardpd@iimahd.ernet.in> wrote in message <gbsph8$him$1@fred.mathworks.com>...
>
> Hi,
> I am trying to solve a system of linear equations simultaneously. The coeffients of each variables in these equations come from another *.m file, depending upon the values of parameters and other things. This makes it difficult for me to write the linear equations in the matrix form. Is there a way (or a matlab command) which I can use and solve the system of equations withouts explicitly writing it in the matrix form? For example:
>
> eq1: para1*x + para2*y = 0;
> eq2: para3*x + para4*y = 0;
>
> variables are x and y. the values of para1 to para4 are coming from some other .m files. I need to know if it possible to get value of x and y by a command such as
>
> solve_equations(eq1, eq2 for x and y)
>
> or any other simple way?
>
> Thank you,
>
> Omkar
yes, there are several ways. and if you would start by opening the matlab help, going to the search tab, and typing in 'solve simultaneous linear equations' it would give you several starting points. you may need to do a little bit of work to get your para* values into a matrix though, since many matlab methods use the Ax=b form of representing simultaneous linear equations.
