matlab code to obtain thenew right hand side b of a linear equation after transforming the matrix A to another matrix
1 view (last 30 days)
Show older comments
Solving linear equations Given a linear equation of the form Ax=b For example where A=[6 2 4;3 4 3; 3 1 2] and b=[26 19 13]' A =
6 2 4
3 4 3
3 1 2
b =
26
19
13
Case 1
The elements of A is multiplied by (-1) except the diagonal elements to give matrix G=[6 -2 -4;-3 4 -3;-3 -1 2] and the new b denoted by c =[-2 -11 -1]'
G =
6 -2 -4
-3 4 -3
-3 -1 2
c =
-2
-11
-1
I need matlab code to transform matrix A to matrix G and vector b to vector c
Case 2 I want to form another linear equation which is A’x=k how do I obtain my k from b after finding the transpose of A. A'= 6 3 3 2 4 1 4 3 2
0 Comments
Answers (0)
See Also
Categories
Find more on Operating on Diagonal Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!