Advertisement
DMG

vjezbe_3

DMG
Oct 27th, 2014
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.59 KB | None | 0 0
  1. A = [1 3 2; 4 5 6; 8 7 6];
  2. b = [4; 1; 3];
  3. gauss_partial_pivoting(A, b)
  4.  
  5. A = [1 592; 592 4308];
  6. b = [437; 2251];
  7. gauss_partial_pivoting(A, b)
  8.  
  9. A = [3 4 1; 1 0 1; 2 3 2];
  10. b = [3; 3; 1.5];
  11. gauss_partial_pivoting(A, b)
  12.  
  13. A = [1 0.1 0.1^2 0.1^3; 1 0.3 0.3^2 0.3^3; 1 0.6 0.6^2 0.6^3; 1 1.2 1.2^2 1.2^3];
  14. b = [1.023; 1.261; 2.368; 9.064];
  15. gauss_partial_pivoting(A, b)
  16.  
  17. A = [1 3 -1; 4.2 2 1.7; 0.34 2.1 -1.9];
  18. B = [3.2; 1.8; 2.9];
  19. C = [1.1; 2.1; 4.2];
  20. D = [0.75; 1.25; 0.33];
  21. gauss_partial_pivoting(A', D-B+2.*C)
  22.  
  23. A = [3 -1 0.2; 0 1 -2; 3 0 -4];
  24. b = [5; 1; 2];
  25. gauss_partial_pivoting(A, b)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement