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
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

Creating a cell array: The other method of creating a cell array is easy to assign values to particular array elements and build it up element by element. Though, as explained

Example of image processing: The other illustration generates a 5 × 5 matrix of arbitrary integers in the range from 1 to the number of colors; the resultant image is as shown

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

Technique to creating this structure: An alternative technique of creating this structure, that is not as efficient, includes using the dot operator to refer to fields in the

Sound Files: The sound signal is an illustration of a continuous signal which is sampled to result in a discrete signal. In this situation, sound waves traveling through the a

printrectarea function: function call: printrectarea(length, width) function header: function printrectarea(len, wid)   In the function call, there are two argume

Reading from a Mat-File: The load function is used to read from various types of files. As with save function, by default the file will be supposed to be a MAT-file, and load

Passing arguments to functions: In all these functions examples faraway, at least one of the arguments was passed in the function call to be the value(s) of the equivalent inp

Use of While loop: Here is an illustration of calling the function, passing 5000 for the value of the input argument high. >> factgthigh(5000) ans = 5040 The itera