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
Illustration of Passing arguments to functions: Here is an illustration of calling this function: >> printrand() The random # is 0.94 As nothing is passed to

I have a frequency response data. How do I convert that to state space? I am given a 6 row and 3 column data (steady state). How do i convert that to state space model?

Inverse of square matrix: The inverse is, hence the result of multiplying the scalar 1/D by each and every element in the preceding matrix. Note that this is not the matrix A,

Anonymous Functions: The anonymous function is a very easy, one-line function. The benefit of an anonymous function is that it does not have to be stored in an M-file. This ca

Use polyval to evaluate the derivative at xder. This will be the % slope of the tangent line, "a" (general form of a line: y = ax + b). % 4. Calculate the intercept, b, of t

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

function imread: The function imread can read an image file, for illustration a JPEG (.jpg) file. The function reads color images into a 3-dimensional matrix. >> myimage1

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

Application: Menu driven Modular Program Numerous longer, more involved programs which have interaction with the user are menu-driven, that means that the program prints a men

readlenwid function: function call: [length, width] = readlenwid; function header: function [l,w] = readlenwid In the function call, not any argument is passed; henc