Problem 423. System of equations
Find a solution to a system of equations represented by a n by n+1 matrix. For instance,
[ 2 0 4; => 2*x = 4 2 4 8 ] 2*x + 4*y = 8
Therefore, when given a=[2 0 4; 2 4 8] you should return a vector of solutions, v = [ 2 1 ]. Assume the system will always have a solution.
Solution Stats
Problem Comments
- 
		3 Comments
 
Consider using a small tolerance for the solution. My program coincides with your test cases up to 3e-16. That ought to be good enough, I think :)
My solution error was at 2.22e-16. Still not good enough, though.
it would be useful to say that you want solution in integer! (althougth I do not understand why)
Solution Comments
Show commentsProblem Recent Solvers393
Suggested Problems
- 
         
         
1764 Solvers
 - 
         
Project Euler: Problem 10, Sum of Primes
1936 Solvers
 - 
         
Back to basics 23 - Triangular matrix
1088 Solvers
 - 
         
"Low : High - Low : High - Turn around " -- Create a subindices vector
568 Solvers
 - 
         
Permute diagonal and antidiagonal
484 Solvers
 
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!