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 =

   3.0244

   2.9512

   0.8049

>> x = A\b

x =

     3.0244

     2.9512

     0.8049

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
Function used in sound files: The MATLAB has numerous other functions which let you read and play sound or audio files. In the audio files, sampled data for each audio channel

Forward elimination: In forward elimination, we want to obtain a 0 in the a 21 position. To accomplish this, we can alter the second line in the matrix by subtracting from it

Finding a sting - function findstr: The function findstr receives two strings as input arguments. It finds all the occurrences of shorter string contained by the longer, and r

Replacing a string - function strrep: The function strrep finds all the occurrences of a substring within the string, and substitutes them with a new substring. The order of a

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

Binary Search: The binary search supposes that the vector has been sorted first. The algorithm is just similar to the way it works whenever looking for a name in a phone direc

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

Illustration of anonymous functions: Dissimilar functions stored in the M-files, when no argument is passed to an anonymous function, the parentheses should still be in the fu


Square Matrices: If a matrix has similar number of rows and columns, for illustration, if m == n, the matrix is square matrix. The definitions which follow in this part apply