CAD/matlab

Advertisement


Question
how can i solve a 3 variable linear equations in matlab?
3x+z=9
x-y+3z=7
y+4z=6

Answer
Hi Stefanos,

every linear system can be written as Ax=b, where A is the system matrix (in your case its A=[3 0 1;1 -1 3;0 1 4]). Thus if A is invertible, i.e. det(A) is not null, the the solution of the system is x=inv(A)*b; where inv(A) is the inverse of A. Matlab computes the inverse of a matrix using the inv() function. For linear systems you can also use the \ operator.

Best
G.

CAD

All Answers


Answers by Expert:


Ask Experts

Volunteer


George Moustris

Expertise

I have extensive experience in MATLAB which is a CAD for engineers.I can answer many questions on the programming script as well as the use of many toolboxes Matlab uses.However DO NOT ask me about the underlying theory of your projects.I will only answer questions regarding the USE of Matlab.

Experience

I have written many scripts in Matlab utilizing many toolboxes and libraries such as Fuzzy Logic toolbox,Neural Nets,Image processing,Wavelets,Signal processing etc.

Organizations
Aristotle University of Thessaloniki

©2012 About.com, a part of The New York Times Company. All rights reserved.