I'm having trouble solving a system of the form Ax=B
The solution to the system should be
x = inv(A)*B
However, this doesn't work.
I get the following error message when I try the above line of code:
Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate. RCOND = 1.156482e-018.
It seems that matlab is having trouble inverting the matrix that I've specified. I tried to verify that the inverse function was working properly by typing in inv(A)*A
This should give the identity matrix, however I got the same error and some garbage numbers.
This is the A matrix that I'm using:
A = [5/2 1/2 -1 0 0 -1/2 -1/2 0 0
1/2 1/2 0 0 0 -1/2 -1/2 0 0
-1 0 5/2 -1/2 -1 0 0 -1/2 1/2
0 0 -1/2 1/2 0 0 0 1/2 -1/2
0 0 -1 0 3/2 -1/2 1/2 0 0
-1/2 -1/2 0 0 -1/2 2 0 -1 0
-1/2 -1/2 0 0 1/2 0 1 0 0
0 0 -1/2 1/2 0 -1 0 2 0
0 0 1/2 -1/2 0 0 0 0 1]
Any ideas as to why this isn't working? I also tried to convert A to a sparse matrix (sparse(A)), and then run the inverse command. No dice.