×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Equation solver

 Forum Search FAQs Links MVPs

Equation solver

(OP)
Dear all,

Hello !!

Eq.1 : a1X1+b1X2+c1X3+d1X4+.....+t1X20=3825;
..
..
..
Eq. 20 : a20X1+b20X2+c20X3+d20X4+......+t20x20=4520

where a,b,c ...t =coefficient are known; there are 20 such equations, is it possible to solve the equation and to find out X1 to X20 value through any software ? How ?

The data is available with as attached.Kindly refer sheet 1.

http://files.engineering.com/getfile.aspx?folder=c73ce005-334f-4a68-bed4-344c8002f130&file=Matlab_Analysis.xls
Replies continue below

\

- Steve

RE: Equation solver

Sure can!  With matlab of course.

You have a matrix A, vector X and solution vector b.
So you have A * X = b and you wanna know the vector X.
So in matlab, you fill in the matrix with your coefficients, then type on the following line B = inv(A);  This will inverse your matrix.
Then compute B*b';  (dont forget to put a ' behind the b, it indicates you take the transpose of your vector b so the rowvector becomes a columnvector)
The solution will be a vector with your solution, from x1 to x20 in order.

RE: Equation solver

Nah, try this

>> help \

or more verbosely

>> help mldivide

Computing the inverses of large matrices is pretty expensive.

- Steve

RE: Equation solver

(OP)
The attached data sheet is very typical ; because a*x does not equal to b in real practical scenario ;

actually, this b answer is nothing but we can say a1x1+b1x2+c1x3+.....+t1x20 = b ;where b is known,  a1,b1,...t20 is known but x1,x2 ,x3 are not known. like that equation is there.

similary , a2x1+b2x2+c2x3+.......+t2x20 = c ; where c is known, a2,x2...t2 are known but x1,x2,x3 ....are not known which is same as in section 1. basically, a1,a2...etc. are stream composition which is known through laboratery while x1,x2...x20 are 20 different streams flow is not known which is to be find out,ultimately all 20 streams mix to the main stream where composition and total flow is known that is why b,c..on right side is known. like this way.as attached in sheet.

RE: Equation solver

(OP)
yes..u r right steve.

RE: Equation solver

(OP)
While running Matlab,some of the X1,X2 values out of 20 sterams are coming negative which is practically not possible as these are all flow rates of streams , how to correct in Matlab , is there any provisition in Matlab so, that we can have postiive coefficient and not negative ?

RE: Equation solver

You'd need to study the Matlab help docs for options that can be used

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/linsolve.html

You may find something in there that's useful.  Alternatively, ask some of the specialists in the comp.soft-sys.matlab newsgroup.  There are many people well versed in linear equations and their nuances.

- Steve

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!