Advertisement
cardel

Punto4

Jul 29th, 2018
643
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scilab 0.45 KB | None | 0 0
  1. A = [10 -2;-3 12];
  2. b = [8 9]';
  3. lambda = 1.2;
  4. [x, ea, iter] = GaussSeidelR(A,b,lambda,0.0001,50)
  5.  
  6.  iter  =
  7.  
  8.    11.
  9.  
  10.  ea  =
  11.  
  12.    0.0000139
  13.    0.0000117
  14.  
  15.  x  =
  16.  
  17.    1.
  18.    1.
  19.  
  20. A = [0.8 -0.4 0; -0.4 0.8 -0.4; 0 -0.4 0.8];
  21. b = [41 25 105]';
  22. lambda = 1.2;
  23. [x, ea, iter] = GaussSeidelR(A,b,lambda,0.0001,50)
  24.  
  25.  iter  =
  26.  
  27.    11.
  28.  
  29.  ea  =
  30.  
  31.    0.0000169
  32.    0.0000091
  33.    0.0000098
  34.  
  35.  x  =
  36.  
  37.    173.74998
  38.    244.99998
  39.    253.74999
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement