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
Use of built-in colormaps: MATLAB has built-in colormaps, it is also possible to generate others by using combinations of any colors. For illustration, the following generates

Data structures: The Data structures are variables which store more than one value. In order to made sense to store more than one value in a variable, the values must in some

Storing Strings in Cell Arrays: The one good application of a cell array is to store strings of various lengths. As cell arrays can store various types of values in the elemen

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

Example to change the line width from the default: For illustration, to change the line width from the default of 0.5 to 1.5: >> set(hl,'LineWidth',1.5) As long as the

Illustration of Set operations: For illustration, given the vectors as shown below: >> v1 = 2:6 v1 = 2  3  4  5  6 >> v2 = 1:2:7 v2 = 1  3  5  7

Illustration of gauss-jordan elimination: An illustration of interchanging rows would be r1 ¬→ r3, that would results: Now, beginning with this matrix, an illustration of sc

Algorithm for appex subfunction: The algorithm for appex subfunction is as shown:  Receives x & n as the input arguments.  Initializes a variable for running sum of t

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

Forward substitution: The Forward substitution (done methodically by first getting a 0 in the a 21 place, and then a 31 , and lastly a 32 ): For the Gauss technique,