Illustration of matrix solutions, MATLAB in Engineering

Illustration of Matrix solutions:

For illustration, consider the three equations below with 3unknowns x1,x2, and x3:

12_Illustration of Matrix solutions.png

We can write this in the form Ax = b here A is a matrix of the coefficients, x is the column vector of the unknown xi, and b is the column vector of values on the right-hand side of the equations:

1364_Illustration of Matrix solutions1.png

The solution is then x = A-1 b. In a MATLAB there are two easy ways to solve this. The built-in function inv is used to get the inverse of A and then multiply this by b, or use the divided into operator.

>> A = [4 -2 1; 1 1 5; -2 3 -1];

>> b = [7;10;2];


>> x = inv(A)*b

x =




>> x = A\b

x =




Posted Date: 10/22/2012 2:48:28 AM | Location : United States

Related Discussions:- Illustration of matrix solutions, Assignment Help, Ask Question on Illustration of matrix solutions, Get Answer, Expert's Help, Illustration of matrix solutions Discussions

Write discussion on Illustration of matrix solutions
Your posts are moderated
Related Questions
Passing Structures to Functions: The whole structure can be passed to a function, or separate fields can be passed. For illustration, here are the two distinct versions of a f

Plotting from a Function: The following function creates a Figure Window as shown in figure, which shows various types of plots for similar y vector. The vector is passed as a

Scaling:   change a row by multiplying it by a non-zero scalar sri →  ri For illustration, for the matrix:

Example of Interpolation and extrapolation: The MATLAB has a function to do this, known as polyfit. The function polyfit finds the coefficients of the polynomial of the partic

Sort algorithm for Sorting vectors of structures: Note that only the price field is compared in the sort algorithm, but the whole structure is replaced. That is therefore each

Function call: In the function call, not any arguments are passed so there are no input arguments in the function header. The function returns an output argument, therefore th

Execution steps: Whenever the program is executed, the steps below will take place: The script calcandprintarea starts executing. The calcandprintarea calls the readr

analyzing traffic; determine motion of flow; calculate tracklets; detect abnormalities;

Symbolic Variables and expressions: The MATLAB has a type known as sym for the symbolic variables and expressions; these work with strings. The illustration, to generate a sym

Appending variables to the Mat-File: Appending to the file adds to what has been saved in a file, and is accomplished by using the -append option. For illustration, supposing