Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Mar 29th, 2020 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. A = [1,2,1,-3,2; 3,7,5,-7,10; -2,-2,3,13,0; -1,2,5,6,24; 4,10,9,-4,13];
  2. b = [-8; -24; 9; 28; -35];
  3.  
  4. A = [A b];
  5.  
  6. U1 = [A b];
  7.  
  8. #zamiana 1 i 5 wiersza
  9. U1([5 1], :) = U1([1 5], :);
  10.  
  11. #zerowanie kolumny 1
  12. U1(2, :) = U1(2, :) - (U1(2, 1) / U1(1, 1))*U1(1, :);
  13. U1(3, :) = U1(3, :) - (U1(3, 1) / U1(1, 1))*U1(1, :);
  14. U1(4, :) = U1(4, :) - (U1(4, 1) / U1(1, 1))*U1(1, :);
  15. U1(5, :) = U1(5, :) - (U1(5, 1) / U1(1, 1))*U1(1, :);
  16.  
  17. #wartość maksymalna w 2 kolumnie (od wartości bezwzględnej)
  18. maks = max(abs(U1(2:5, 2)));
  19. #zamiana 2 i 4 wiersza
  20. U1([2 4], :) = U1([4 2], :);
  21.  
  22. #zerowanie 2 kolumny:
  23. U1(3, :) = U1(3, :) - (U1(3, 2) / U1(2, 2))*U1(2, :);
  24. U1(4, :) = U1(4, :) - (U1(4, 2) / U1(2, 2))*U1(2, :);
  25. U1(5, :) = U1(5, :) - (U1(5, 2) / U1(2, 2))*U1(2, :);
  26.  
  27. #wartość maksymalna w 3 kolumnie (od wartości bezwzględnej)
  28. maks = max(abs(U1(3:5, 3)));
  29. #zerowanie kolumny
  30. U1(4, :) = U1(4, :) - (U1(4, 3) / U1(3, 3))*U1(3, :);
  31. U1(5, :) = U1(5, :) - (U1(5, 3) / U1(3, 3))*U1(3, :);
  32.  
  33. #wartość maksymalna w 4 kolumnie (od wartości bezwzględnej)
  34. maks = max(abs(U1(4:5, 4)));
  35. #zerowanie 4 kolumny:
  36. U1(5, :) = U1(5, :) - (U1(5, 4) / U1(4, 4))*U1(4, :);
  37.  
  38. b1 = U1(:, 6);
  39.  
  40. #majac macierz wspolczynnikow, mozna znalexc macierz L1
  41. #deklaracja macierzy jednostkowej
  42. L1 = eye(5, 5);
  43.  
  44. ##A1 = [1  2  1 -3  2
  45. ##      3  7  5 -7 10
  46. ##     -2 -2  3 13  0
  47. ##     -1  2  5  6 24
  48. ##      4 10  9 -4 13];
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top